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
778 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 250 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 250 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now