I have a program that will be ran as a windows service, so I have a batch script made that will run commands to install the .exe as a service. Since the custom actions can't run batch files I made a simple VBScript that I put in the 'Commit' folder of custom actions that will simply execute the batch file post-install. The problem is that it's not finding the batch file, however, I've tested it outside of the install process and it seems to find the file just fine so I'm unsure where the issue is.
Here is the batch file (InstallService.bat):
sc create "ServiceName" binPath="%~dp0pathToExE"
sc start ServiceName
VBScript:
Set Shell = CreateObject("Shell.Application")
Shell.ShellExecute "InstallService.bat", , , "runas", 0