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
808 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
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.
Suggested Courses

628 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