Archive: ExecShell not detecting program already installed


ExecShell not detecting program already installed
I'm currently having a problem with ExecShell.

The thing is, the progamming i'm making an installer for depends on SQL Server 2005 and SQL Manager.

My installer installs SQL Server 2005 silently, and SQL Manager as well. When SQL Server gets installed, the sqlcmd command can be accessed, because the SQL Server installer automatically includes its ..Tools\Binn folder into the path. However, i'm trying to access sqlcmd through NSIS and its just not working. I made an .exe that was solely in charge of using sqlcmd for a couple of commands, and when the window pops up with the .exe running, the message appears that "sqlcmd is not a valid command...", as if sqlcmd wasn't available through the system path. However, when I execute the program after the whole instalation is through, it works perfectly.
Anybody has any idea why this could be happening?

PS. I THINK, that it could be that it takes it a while to include sqlcmd into the path, so i should maybe wait a bit after the SQL server 2005 installer is done. Is there any way to wait an amount of x seconds with the NSIS installer? I'm already waiting for the whole installer to finish with ExecWait, but is there a way to wait more?

Thanks in advance.


Sleep [milliseconds]

Perhaps you need to set a different working directory first with SetOutPath.

Stu


Environment variables are loaded when the program (your NSIS installer) starts and won't be updated when the SQLServer installer changes them. You probably need to use the complete path for the sqlcmd you want to run.

It executes OK after the whole installer is done because you start a new program that gets the current environment variables which now include ...\Tools\Binn.

Don


I don't believe the setout path affects it really, because i'm trying to execute something thats a system variable, and I'll try the whole path to see my Luck with that.