chamakits
23rd October 2007 18:16 UTC
Executing a shell program
I'm currently having trouble executing a program located inside a folder I'm installing as the installer goes.
The program that the installer is for depends on SQL Server, and the program i'm trying to execute has the sole purpose of attaching the database to SQL Server.
The thing is, whenever I execute the program outside the installer, as in double clicking on it, it works just fine, and attaches the database without the slightest problem. However, whenever I try to execute it from within the installer, either its not actually executing, or its not working.
I have tried all of the following:
ExecShell "" "$INSTDIR\attach.exe"
nsExec::Exec "$INSTDIR\attach.exe"
ExecWait '"$INSTDIR\attach.exe"'
Exec '"$INSTDIR\attach.exe"'
None have worked so far. Any recomendations...please?
Any help would be appreciated.
Afrow UK
23rd October 2007 18:27 UTC
Make sure you have the path 100% correct (i.e display it in a MessageBox) and make sure you have the correct working directory set (use SetOutPath).
Stu
chamakits
23rd October 2007 18:37 UTC
Hey Stu. Thanks for the recommendation, but the path is correct :( (how much i wished that had been the mistake >.<)
And about the correct working directory, the executable i want to execute has to be in the current Directory? (as in the one currently set on SetOutPath)
Because i'm indicating exactly where the .exe is (its in the root folder of the directory i'm installing to), even then it has to be in the current working directory?
Thanks in advance
chamakits
23rd October 2007 18:54 UTC
THANKS ALOT STU!
I didn't know that to use ExecShell it needed to be in the Directory set out with SetOutPath.
When you told me that "...and make sure you have the correct working directory set (use SetOutPath)." I noticed that no...I wasn't quite doing that.
Oh man, you have no idea how grateful I am. Thanks alot!