问题
I have a BAT file with this content:
"XYNTService.exe" "-i"
I am currently building up an installation package using Visual Studio Installer. I added this BAT file inside the Application Folder. Now I want to execute it during installation process. How can it be done?
I have surf a lot about custom actions, but still fail to understand how to do it. Need help.
Thank you.
回答1:
Ultimately, you can always run a batch file by doing ShellExecute or CreateProcess on cmd.exe with the relevant parameters.
However, rememeber that MSI custom actions run in a different user context from the user who is installing. You may struggle to get the batch file to do what you want to.
Martyn
来源:https://stackoverflow.com/questions/6658887/how-to-package-a-bat-in-visual-installer-and-how-to-run-a-bat-file-during-msi-in