Squirrel / Squirrel.Windows

An installation and update framework for Windows desktop apps
MIT License
7.35k stars 1.03k forks source link

Can squirrel install others .exe with specific argument? #1802

Closed UnnecessaryPunctuation closed 2 years ago

UnnecessaryPunctuation commented 2 years ago

May I drop other .exe in the nugget package, and have them installed with a specific argument?

For example if I add Vs_Code.exe can I call it with the /verysilent and /Lang=fr argument?

caesay commented 2 years ago

If you mark your binary as SquirrelAware, then it will be executed during install. In the onInitialInstall hook, you can execute any other binary you want, with any arguments you want, using Process.Start for example.

A couple things you need to know:

UnnecessaryPunctuation commented 2 years ago

The solution was for me in a Squirrel Aware app:

. In onInitialInstall, Simply install the main application. And create Main shortcut. . The other exe will be in the "%localappdata%/ApplicationName/". . Grab somehow the custom command and execute from the application with Process.Start but outside of the onInitialInstall. This way you can escape the 15 sec restriction.

Thanks for the direction. For the "not expected" apps, It's an application deployed on our domain. Users have no right nor say. We will gladly duel any annoyed users.