Hi,
I have created a setup project, and also a vbscript to execute the file after installation. My problem is, how do I pass the installed directory path to the vbscript, and also, how should I read the argument from the script?
At present, after adding the .vbs to the Commit node of the Custom Actions, I have entered "[TARGETDIR]<file>.exe" into the CustomActionData field, and in my script, use WScript.Argument to obtain the 2nd argument. The script runs correctly from a command line, however, when run from the setup file, an error message pops up indicating failure to run the script. I have tried to comment out the WScript.Argument and hard-code the executable path, and it works, so, the issue lies with that line.
In this case, how should I go about this as I do not want to hardcode the executable path in case the installed directory is changed. Thanks in advance.
I have created a setup project, and also a vbscript to execute the file after installation. My problem is, how do I pass the installed directory path to the vbscript, and also, how should I read the argument from the script?
At present, after adding the .vbs to the Commit node of the Custom Actions, I have entered "[TARGETDIR]<file>.exe" into the CustomActionData field, and in my script, use WScript.Argument to obtain the 2nd argument. The script runs correctly from a command line, however, when run from the setup file, an error message pops up indicating failure to run the script. I have tried to comment out the WScript.Argument and hard-code the executable path, and it works, so, the issue lies with that line.
In this case, how should I go about this as I do not want to hardcode the executable path in case the installed directory is changed. Thanks in advance.