开发者

How to package a BAT in Visual installer and how to run a BAT file during MSI installation?

开发者 https://www.devze.com 2023-03-19 07:50 出处:网络
I have a BAT file with this content: \"XYNTService.exe\" \"-i\" I am currently building up an installation package using Visual Studio Installe开发者_StackOverflow中文版r. I added this BAT file ins

I have a BAT file with this content:

"XYNTService.exe" "-i"

I am currently building up an installation package using Visual Studio Installe开发者_StackOverflow中文版r. 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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消