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
799 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Measure time after installing Antivirus 8 104
Add local user to local administrator group 3 64
WSUS Update on Window 7 client 6 58
Backup Software for Windows 7 9 65
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
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 give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

739 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