Executing a script file from a Windows Installer Custom Action

前端 未结 6 1600
时光取名叫无心
时光取名叫无心 2021-01-13 10:45

I need to execute a batch file as part of the un-install process in a Windows installer project (standard OOTB VS 2008 installer project-vdproj). One cannot execute a bat f

6条回答
  •  执念已碎
    2021-01-13 11:11

    I've run into this same problem and the issue is that you can't call WScript within the vbs file - you will need to JUST call CreateObject

    ie.

    Set WshShell = CreateObject( "WScript.Shell" )
    command = "uninstall-windows-serivce.bat"
    msgbox command
    WshShell.Run ("cmd /C " & """" & command & """")
    Set WshShell = Nothing
    

提交回复
热议问题