This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- you should Disable(WOW64FSREDIRECTION) before callint to the LaunchAppAndWait
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 25, 2009
12:11 PM
Can't execute ServerManagerCmd.exe from InstallScript
Hi,
Project type is InstallScript project (IS 2009).
I use LaunchApplication-function for execute "ServerManagerCmd.exe" in Windows 2008 64bit environment.
It always returns -1.
If I run a same command line manually all works.
In case of other applications LaunchApplication() works perfect.
Code:
_app = "ServerManagerCmd.exe";
_params = "-inputPath "+ SUPPORTDIR^"answerfile.xml";
_workfolder = SUPPORTDIR;
nResult = LaunchApplication(
_app, _params, _workfolder,
SW_SHOW, 1000000, LAAW_OPTION_USE_SHELLEXECUTE|LAAW_OPTION_WAIT|LAAW_OPTION_SHOW_HOURGLASS);
Any ideas?
Thank you
Project type is InstallScript project (IS 2009).
I use LaunchApplication-function for execute "ServerManagerCmd.exe" in Windows 2008 64bit environment.
It always returns -1.
If I run a same command line manually all works.
In case of other applications LaunchApplication() works perfect.
Code:
_app = "ServerManagerCmd.exe";
_params = "-inputPath "+ SUPPORTDIR^"answerfile.xml";
_workfolder = SUPPORTDIR;
nResult = LaunchApplication(
_app, _params, _workfolder,
SW_SHOW, 1000000, LAAW_OPTION_USE_SHELLEXECUTE|LAAW_OPTION_WAIT|LAAW_OPTION_SHOW_HOURGLASS);
Any ideas?
Thank you
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 26, 2009
01:39 AM
I guess the space or quotes in the command line parameter of the LaunchAppAndWait could be a problem. Because this function is sensitive to this. May be carefully examining this could solve your problem. Check the other parameters too...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 30, 2009
02:46 AM
Hi,
After a little research:
Function LaunchApplication() in win2008 64bit environment can't find number of applications in System32.
I have executed the same DIR command in batch file manually and using LaunchApplication().
Results you can see in attached files. (ServerManagerCmd.exe exists only in the first case)
ServerManagerCmd.exe utility exists under WinSxS folder and like I know Windows creates something like "link" from System32-folder to its real location.
But I don't think this is a right way to use a direct path to ServerManagerCmd.exe (c:\Windows\winsxs\amd64_servermanagercmd_31bf3856ad364e35_6.0.6001.18000_none_610667c7b0c19f0b\ServerManagerCmd.exe).
So, the question is still open:
How can I execute ServerManagerCmd.exe-utility on Windows 2008 64bit using InstallScript (InstallScript project)?
or
Which limitations does LaunchApplication()-function have on Windows 2008 64bit (InstallScript project)?
Thanks
After a little research:
Function LaunchApplication() in win2008 64bit environment can't find number of applications in System32.
I have executed the same DIR command in batch file manually and using LaunchApplication().
Results you can see in attached files. (ServerManagerCmd.exe exists only in the first case)
ServerManagerCmd.exe utility exists under WinSxS folder and like I know Windows creates something like "link" from System32-folder to its real location.
But I don't think this is a right way to use a direct path to ServerManagerCmd.exe (c:\Windows\winsxs\amd64_servermanagercmd_31bf3856ad364e35_6.0.6001.18000_none_610667c7b0c19f0b\ServerManagerCmd.exe).
So, the question is still open:
How can I execute ServerManagerCmd.exe-utility on Windows 2008 64bit using InstallScript (InstallScript project)?
or
Which limitations does LaunchApplication()-function have on Windows 2008 64bit (InstallScript project)?
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 31, 2009
03:00 AM
Hi,
The problem was because of setup.exe is a 32-bit application (you can see in Task Manager "setup.exe *32").
"cmd.exe" was executed from InstallScript like 32-application too - this explains difference between DIR commands (you can see in Task Manager "cmd.exe *32").
My solution is:
ServerManagerCmd.exe may be executed from WINDIR^"Sysnative" folder.
see MSDN:http://msdn.microsoft.com/en-us/library/aa384187(VS.85).aspx
Other solution is described here (I didn't verify it):
http://community.acresso.com/showthread.php?t=186415&highlight=64BIT
If you have any comment or correction - please respond.
Thank you
The problem was because of setup.exe is a 32-bit application (you can see in Task Manager "setup.exe *32").
"cmd.exe" was executed from InstallScript like 32-application too - this explains difference between DIR commands (you can see in Task Manager "cmd.exe *32").
My solution is:
ServerManagerCmd.exe may be executed from WINDIR^"Sysnative" folder.
see MSDN:http://msdn.microsoft.com/en-us/library/aa384187(VS.85).aspx
Other solution is described here (I didn't verify it):
http://community.acresso.com/showthread.php?t=186415&highlight=64BIT
If you have any comment or correction - please respond.
Thank you
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2009
10:22 AM
Hi,
Because the ServerManagerCmd.exe is located on the system32 fodler and there is no similar file for 32bit application at the syswow64 you should disable the automatic redirection in order to be able to run applications from the system32 folder.
Therefore you should do:
Disable(WOW64FSREDIRECTION);
szProgram =WINSYSDIR64^"ServerManagerCmd.exe";
szParam= " -install myComponent" ;
nReturn= LaunchAppAndWait(szProgram,szParam,LAAW_OPTION_WAIT | LAAW_OPTION_SET_BATCH_INSTALL | LAAW_OPTION_SHOW_HOURGLASS );
Enable(WOW64FSREDIRECTION);
Regards
Dror
BTW:
You can use the ocsetup.exe command instead of ServerManagerCmd.exe
🙂
Because the ServerManagerCmd.exe is located on the system32 fodler and there is no similar file for 32bit application at the syswow64 you should disable the automatic redirection in order to be able to run applications from the system32 folder.
Therefore you should do:
Disable(WOW64FSREDIRECTION);
szProgram =WINSYSDIR64^"ServerManagerCmd.exe";
szParam= " -install myComponent" ;
nReturn= LaunchAppAndWait(szProgram,szParam,LAAW_OPTION_WAIT | LAAW_OPTION_SET_BATCH_INSTALL | LAAW_OPTION_SHOW_HOURGLASS );
Enable(WOW64FSREDIRECTION);
Regards
Dror
BTW:
You can use the ocsetup.exe command instead of ServerManagerCmd.exe
🙂
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)