View Full Version : LaunchAppAndWait not working on Win2003 Server

05-18-2004, 11:38 AM
InstallScript MSI project.

I am using LaunchAppAndWait to launch another install app (setup.exe built with ISPro6) silently. The command works fine on a Win2K server, but on Win2003 the LAAW call returns <0, and LAAW_PARAMETERS.nLaunchResult = 3. I am logged in locally as Administrator when I run this.

I was unable to find the error code list for nLaunchResult.

Any ideas what is wrong and how I fix it?

05-18-2004, 04:36 PM

The error code is a windows error code:

0x00000003 indicates:
The system cannot find the path specified.

(Found using the "Error Lookup" tool or MSDN help.)

For the next step I would double check that the path in question actually exists on the system in question.

Devin Ellingson
InstallShield Software Corporation

05-19-2004, 12:20 PM
This is odd.

I am using vmware workstation 4.05 to provide the Win2k and Win2003 test servers. The setup I am testing is being copied to a shared folder area on the host machine at the end of the media build. Both virtual machines map a drive to the root of that shared folder as "Z:" - so the resulting path for the calls on both machines is identical. None of the code is OS-specific. The path being used in both cases is Z:\D Drive\3_0_Full\asa8oem_cd\. The main setup.exe is in the folder Z:\D Drive\3_0_Full.

I added a FindFile call just before the LAAW call and FindFile can't locate the second setup.exe on the Win2003 machine, either - but the call works on the Win2000 machine.

The path is valid on both machines - but FindFile and LAAW both fail on the Win2003 machine when using this path. However, FindFile works fine if the path fed to it is SUPPORTDIR - I put the response file for a silent install of asa8 in the Support Files and I use a FindFile call to make sure it is there before proceeding to the next section, which is where I have my problem. This first FindFile call works fine.

Perhaps short file names have something to do with this? SUPPORTDIR is in short filename format. The path to the asa8 setup.exe is in long format. I tried calling LongPathToShortPath and it also fails on Win2003 (but works on Win2000). I opened a command prompt and did a dir /x in Z: and its subfolders - there were no short file names.

05-20-2004, 02:20 AM

It could be a problem with short path support being disabled, the registry key that enables/disables this is:


DWORD Value: NtfsDisable8dot3NameCreation, either 0 or 1.

Note that I believe this change only affects files/folders created after this is changed, and a reboot may be needed, after changing this, I'm not sure.

Also, we do call 'LongPathFromShortPath' internally before calling CreateProcess, so it would be interesting to see what this function does on the system in question.

You might also want to try (as a test) calling CreateProcess directly from script, this is pretty simple, as we predefine most of the structures that you need (i.e.)

if ( !CreateProcess(NULL, &szComplete, LAAW_PARAMETERS.lpProcessAttributes, LAAW_PARAMETERS.lpThreadAttributes, LAAW_PARAMETERS.bInheritHandles, LAAW_PARAMETERS.dwCreationFlags, LAAW_PARAMETERS.lpEnvironment, LAAW_PARAMETERS.lpCurrentDirectory, &LAAW_STARTUPINFO, &LAAW_PROCESS_INFORMATION)) then

szComplete is a string variable that has the path that you want to launch in it.

Devin Ellingson
InstallShield Software Corporation

05-20-2004, 11:29 AM
On the Win2003 server, NtfsDisable8dot3NameCreation was 0

Run setup from mapped drive - failed.
Copy setup files to local drive and run it - works (guess I should've tried that before).

Reset server to original config (gotta love vmware)

Changed NtfsDisable8dot3NameCreation to 1 and rebooted.
Run setup from mapped drive - failed.
I added the provided code to my setup to run if the LAAW call failed. Using the strings from the LAAW call, I set szComplete = szProgLine+" "+szCommandLine. It failed.
Copied the setup files to local drive on the Win2003 server - works.

Upgraded vmware to latest release - no difference.

Mapped a drive through Windows Explorer instead of the vmware shared folder - no difference.

So it appears to have someting to do with using a mapped drive vs local drive. Can't rule out vmware, but I don't have a 'real' win2003 server to try it on.

07-27-2004, 09:35 PM
It appears to be a problem not specific to Win 2003 or vmware.

I have an Installscript MSI installer trying to launch an app from a support directory using LaunchAppAndWait.

The application launch consitently fails when I launch the app from a network drive (mapped or otherwise) and succeeds when launched from a local drive. the length of the path doesnt seem to have any effect on this behaviour. Havent tried this in other OS versions yet.

Any ideas why this could be happening? any work around? In our dev. environment, ability to launch the installer from a network drive is very vital....


11-18-2004, 10:01 AM
If you got a solution share please. I have the same problem, right now I am using single exe build but is it too big ...

11-18-2004, 10:49 AM

No, I havent found a solution for this yet. Currently we are copying this exe to the temp directory of the target machine and launching from there. This is not a clean solution as it involves a lot of file copying and then cleanup, but it works.

I am still working on it. Just converted to 10.5. Will see if anything has changed in this area.

11-23-2004, 05:26 PM

Are you launching this during file transfer in the ISMSI setup? (i.e.) during a feature event?

Does it work if launched from OnBegin or when launched from a pure InstallScript setup?

Devin Ellingson
InstallShield, A Macrovision Company

Stefan Krueger
11-24-2004, 11:27 AM
Can you insert a MessageBox to display the full path to the file? I suspect there's something wrong with it. For instance I have seen paths with a duplicate backslash (which is not valid) work on some operating systems and fail on others. Like

05-11-2005, 02:42 PM
Did anyone ever get to the bottom of this?

I have just run into this problem now that we're supporting Windows Server 2003. My setup runs no problems against Windows 2000, but just won't call the batch file under Windows Server 2003.

szProgram = "cmd.exe";
szBatch = "MyBatch.bat";
szCmdLine = "MyParameters";
szBatch = "/c " + szBatch + " " + szCmdLine;

szScriptPath = INSTALLDIR ^ "MyFolder";

nChkResult = LaunchAppAndWait(szProgram, szBatch, LAAW_OPTION_WAIT);

I've checked all the noddy things like, paths etc.

Any help gratefully received!