Installing a program only if folder exist

0

I am trying to install a program but only if the folder exists, if it does not then stop install. So far I have this.

IF EXIST "C:\Program Files\Folder" \ (
start \\filesahre\software\installer\widget.msi

)

IF NOT EXIST "C:\Program Files \Folder\" (
go to end
)

With the above the push just keep on running. Is the above correct? Any suggestions to sort it. 

 

Cancel
login to comment
0

I would recommend creating a scanning profile in PDQ Inventory to look for that folder, then create a collection of computers that have the folder. That way you can deploy to the collection.

Option 2 is fixing your install string. msiexec /i \\fileshare\software\installer\widget.msi ALLUSERS=1 /qn /norestart /log output.log

Cancel
login to comment

Reply