Launching 32 bit executable from command prompt in Win 7 64 bit OS

randominstanceOfLivingThing picture randominstanceOfLivingThing · Aug 23, 2012 · Viewed 11k times · Source

I am working on Windows 7 64 bit and have a wierd problem. I installed installAnywhere(a 32 bit application) in c:\Programs(x86) since I did not want to install it in the regular "c:\Program Files(x86)" to avoid the hassles of space in directory.

When I attempted to call the installanywhere from command prompt using the syntax: cmd /c "c:\Programs(x86)\InstallAnywhereEnterprise\build\build.exe" ... I get the error "c:\Programs" is not a command. The reason being it is attempting to look to installAnywhere in c:\Programs ignoring the (x86) part.

I did some investigation on launching 32 bit programs vs 64 bit programs from command prompt and tried using %windir%\SysWow64\cmd.exe. When I used "%windir%\SysWow64\cmd.exe", the %programfiles% correctly points to "c:\Programs Files(x86)" but launching the command I mentioned just gives the same error. The FileSystemRedirector of Windows still keeps pointing to c:\Programs. I reinstalled InstallAnywhere in the default location "C:\Programs Files(x86)" but I dont know why it does not work with "C:\Programs(x86)".

Does anyone know of a workaround?

Answer

jebar8 picture jebar8 · Aug 23, 2012

Escape the parentheses.

"C:\Programs^(x86)\..."

Why exactly are you not ok with putting it in the regular Program Files directory? Space shouldn't be an issue.