Jump to content


Stop Feature upgrade if precheck fails

Recommended Posts

I'm using an action custom script to run a Powershell script to check for a few things before running the feature upgrade on a machine but even the machine is not compliant it still running the upgrade.


for example, I have this code in preinstall.cmd/preinstall.ps1

if(-not (Test-path $path))
write-error "Stop"
exit 1


this should stop the upgrade but its not happening.

Does anyone know how I can stop the upgrade if it doesnt meet my preinstall checks

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...