Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

In a VBS installation script, how do I use the 32 bit version of Wscript on a 64 bit machine?

Posted on 2011-03-04
6
Medium Priority
?
823 Views
Last Modified: 2012-05-11
I have this line in an installation script that was designed for use with 32 bit machines.
set wshshell=wscript.createobject("wscript.shell")

Its my understanding that when I run this in a 64 bit environment that the 64 bit version of wscript will be used by default.  How do I force it to use the 31 bit version in VBscript?

Thank you!
0
Comment
Question by:RichardRiga
  • 3
  • 2
6 Comments
 
LVL 14

Accepted Solution

by:
Tribus earned 1000 total points
ID: 35036668
You could try using compatibility mode for the program...

Right-click on the application .exe and select Windows 98 or XP not sure if this will work but I know there was no x64 version of 98...?

What I would do really though is get a copy of Virtual PC and install a 32-bit version of the OS of choice and run the application from the VM as needed.

Important info reguarding this from MS:

What do I have to do with my 32-bit Windows applications so they will run?

Most 32-bit Windows applications just work. The application does not need to be changed and nothing needs to be configured in the OS.

Occasionally an application may complain that it runs only on Windows 95 or one of the other Windows OSs. The "Compatibility mode" of that program can be modified by opening the program Properties, select the Compatibility tab, and set the "Compatibility mode" to the requested OS. This will "fool" the application into thinking it is running on one of the other OSs. Note this does not always work, see below.

What are some common Windows 32-bit application compatibility issues?

Some applications require a 32-bit driver. The software can install but the driver can not. For example, most anti-virus software uses a file system filter driver. On x64 all drivers, including file system filters, must be 64-bit. The 32-bit antivirus software can not install their file system filter driver and will not function. Note that 64-bit anti-virus software exists today and other vendors will have solutions later in 2005 or 2006.

Some applications may be coded to only run on a specific version of the OS. If the detected OS is not one of the allowable types the application will not execute. Sometimes adjusting the "Compatibility mode" described above will work around this. If "Compatibility mode" does not work the software vendor must provide an updated application that allows the application to run.

Many application installers include a 16-bit stub to identify the machine type and start a 32-bit install engine. The 16-bit portion of the installer will fail since none of the Windows 64-bit OSs can execute 16-bit code. Microsoft has identified this as a critical blocker to x64 adoption. To overcome this 64-bit Windows detects specific 16-bit installers and transparently instantiates an equivalent 32-bit version if one is available. Note that the 64-bit Windows Installer can seamlessly install 32-bit MSI-based applications on 64-bit Windows.

Links:

http://www.microsoft.com/windows/virtual-pc/

http://h71028.www7.hp.com/Hpsub/cache/286707-0-0-225-121.html (The info from this link is what I posted above)

Hope this helps!

-Tribus
0
 
LVL 10

Assisted Solution

by:Martin_J_Parker
Martin_J_Parker earned 1000 total points
ID: 35036682
Use C:\Windows\Syswow64\wscript.exe to start 32bit wscript.exe on Win64.

Strictly speaking it should be %windir%\SysWoW64\wscript.exe just in case you aren't booting from C: in a multi-boot environment - but for most people that will be the same as C:\Windows\Syswow64\wscript.exe anyway.
0
 
LVL 14

Expert Comment

by:Tribus
ID: 35036698
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:Tribus
ID: 35036714
The article I posted above is basically saying the same thing as Martin's post, but in a bit more detail.  We must have been typing at the same time...sorry...lol.

-Tribus
0
 
LVL 10

Expert Comment

by:Martin_J_Parker
ID: 35036737
That's often the case with this site - several people give the same answer in quick succession because they were typing it up at the same time.  As the French would say, That's life!
0
 
LVL 1

Author Closing Comment

by:RichardRiga
ID: 35074161
Thank you guys.  Sorry it took a while, but there you have it.  Both posters pointed me in the direction that ultimately help me solve my specific proglem.  Take care!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question