Azmaeus
Flexera beginner

Setup.exe parameter for use in Install Conditions

Jump to solution

It was requested of me to allow bypassing the Install Condition that limits installing to specific operating systems for internal engineers. I created a public property named OSCHECK, and set the value to True. I also added to my Install Condition, "Or (OSCHECK=False)". I then try to run Setup.exe /v"OSCHECK=False" but I'm still getting the error that I'm trying to run the installer on an unsupported operating system. Is what I'm trying to do possible? I read in this forum someone else had gotten it to work using a file, I feel a parameter would be idea, but a file, registry key, or environment variable would be perfectly acceptable as well. Thanks in advance!

Labels (1)
0 Kudos
1 Solution

Accepted Solutions
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

Re: Setup.exe parameter for use in Install Conditions

Jump to solution

You could but Parentheses around the whole condition and then add : Or SKIP right at the end.

For example the following condition is auto-built  from the project assist to only allow installs on Windows 7:

(Not Version9X) And (Not ((VersionNT>=400 And VersionNT<=500) Or VersionNT=600 Or (VersionNT=601 And MsiNTProductType>1) Or (VersionNT>=602 And VersionNT<=603)))

Add Parentheses at the start and the end and then add "Or SKIP" - this is essentially saying, do all the condition normally but if the property "SKIP" exists then ignore it:

((Not Version9X) And (Not ((VersionNT>=400 And VersionNT<=500) Or VersionNT=600 Or (VersionNT=601 And MsiNTProductType>1) Or (VersionNT>=602 And VersionNT<=603)))) Or SKIP

Now to use this you need to have your internal engineers run the installer via a command prompt and add the SKIP property, for example:

msiexec.exe /i "C:\Location\Your.Msi" SKIP=YES

This should run the installer and now bypass the install condition.

 

View solution in original post

0 Kudos
2 Replies
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

Re: Setup.exe parameter for use in Install Conditions

Jump to solution

You could but Parentheses around the whole condition and then add : Or SKIP right at the end.

For example the following condition is auto-built  from the project assist to only allow installs on Windows 7:

(Not Version9X) And (Not ((VersionNT>=400 And VersionNT<=500) Or VersionNT=600 Or (VersionNT=601 And MsiNTProductType>1) Or (VersionNT>=602 And VersionNT<=603)))

Add Parentheses at the start and the end and then add "Or SKIP" - this is essentially saying, do all the condition normally but if the property "SKIP" exists then ignore it:

((Not Version9X) And (Not ((VersionNT>=400 And VersionNT<=500) Or VersionNT=600 Or (VersionNT=601 And MsiNTProductType>1) Or (VersionNT>=602 And VersionNT<=603)))) Or SKIP

Now to use this you need to have your internal engineers run the installer via a command prompt and add the SKIP property, for example:

msiexec.exe /i "C:\Location\Your.Msi" SKIP=YES

This should run the installer and now bypass the install condition.

 

View solution in original post

0 Kudos
Azmaeus
Flexera beginner

Re: Setup.exe parameter for use in Install Conditions

Jump to solution

Thank you, @shunt, that did the trick! I'm going to continue using it as you explained, but for anyone else who stumbles across this thread here's what I learned I did wrong: After learning a lot more about conditions, I learned the reason mine wasn't working was because in the condition I was checking OSCHECK=False, but it being a string I should have been checking OSCHECK="False". I did decide to stick with simply OSCHECK because if they set it to anything it'll accept the option to skip (e.g. if they specify "OSCHECK=false" instead of "False" it'll still work, whereas the way I was trying wouldn't have accepted it because it's case-sensitive).

0 Kudos