Run batch file in Windows Installer Commit

后端 未结 5 1017
梦如初夏
梦如初夏 2020-12-06 03:18

I am having no success in modifying a Windows Installer MSI to run a batch file after the primary output has been installed. I have searched for this and found many suggesti

5条回答
  •  旧时难觅i
    2020-12-06 03:43

    What you said above is incorrect:

    Custom actions can only be executable files. A batch file is not executable.

    Custom Actions (even without tools like InstallShield) can be .EXE, VBScript, JScript, or DLL based. If you write a DLL, you can write whatever code you want to call a batch file or make any changes you want to the system -- there is no limit.

    Update: an example that worked for me: (entry in CustomAction table)

    Action Test
    Type 34
    Source SystemFolder
    Target cmd.exe /c c:\test.bat
    ExtendedType 
    

提交回复
热议问题