I have one project that when the "Run Program" checkbox is checked at the end of the install, tries to run the program from the temp directory rather than from the "target directory". I have checked the code, and it is: $TARGETDIR$\\AppName.exe.
Any ideas on what I can do to fix this issue?
Thanks,
Eric
Run Program error
That is a workaround. What I want to know is why this works correctly in other setups, but not this one. From my understanding, using $TARGETDIR$\\AppName.exe should execute the program in $TARGETDIR$, not the temp directory the app is extracted to.
Is this not a correct understanding?
Thanks,
EricB
Is this not a correct understanding?
Thanks,
EricB
Why not use the Run Program As command, which lets you specify a startup directory? Maybe the problem is that the startup directory is wrong (temp), but the program is actually being launched from the correct folder. I believe this would explain what we're experiencing, in fact some users reported this, so we provided the Run Program As command, that lets you specify the startup directory, which would have to be $TARGETDIR$ in this case.
I tried using the "Run Program As" function and get this code in the script window:
Run Program $TARGETDIR$\\AppName.exe , startup in folder $TARGETDIR$
When I click the "Finish" button, the .NET "Just-In-Time Debugging" dialog is shown with the following:
An exception 'System.TypeInitializationException' has occured in AppName.exe
To find out what "$TARGETDIR$" is set to, I inserted this code in the script window:
MessageBox: , $TARGETDIR$
When the message box is displayed, the text of the message box is:
D:\\Program Files\\\\My App Path
Can you tell me what is going on here?
Thanks,
Eric
Run Program $TARGETDIR$\\AppName.exe , startup in folder $TARGETDIR$
When I click the "Finish" button, the .NET "Just-In-Time Debugging" dialog is shown with the following:
An exception 'System.TypeInitializationException' has occured in AppName.exe
To find out what "$TARGETDIR$" is set to, I inserted this code in the script window:
MessageBox: , $TARGETDIR$
When the message box is displayed, the text of the message box is:
D:\\Program Files\\\\My App Path
Can you tell me what is going on here?
Thanks,
Eric
Who is online
Users browsing this forum: No registered users and 84 guests