Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Installing a program only if folder exist

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. 

 

0

Comments

1 comment
Date Votes
  • 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

    0