Discussion:
running vbs-Script in x86 or x64 Mode?
(too old to reply)
r***@gmail.com
2015-02-23 10:56:37 UTC
Permalink
Hello vbscript forum,

my Problem seems to me very currious.
Years ago I've written a script which get file(s) by Mouse-Drag&Drop and compress into a winwar archiv.
Day before Yesterday I have modified a little Bit Code which the call of Winrar has not affected! Everythings works fine. Yesterday I want to test the script at last (onto another Computer) without modify anything and I get the error Message:
Skript... Code 800700C1 WshShell.exec ... is not a valid Win32-Application (translated as best I can from Germany error Message)
I'm wondering if now the vbs code runs in x64 Mode or whatever...
As I mentions the script get file(s) via Mouse Drag&Drop and cannot be used as "normal" vbs script.
There is a code part which was n o t modified!:
...
Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
...
RarP="C:\Program Files\WinRAR\WinRAR.exe a -afzip -ep1 -p" & Passwd & " " & DFile & " @" & ScriptPath & "FileList.tmp"
...
WSHShell.Exec RarP
Set WSHShell = Nothing

Whats my mistake?

Thx
reredok
Mayayana
2015-02-23 13:19:10 UTC
Permalink
WSH defaults to 64-bit on 64-bit, and the Program Files
folder is 32-bit on a 32-bit machine but 64-bit on a 64-bit
machine. So unless you have 64-bit winrar the path
will be invalid.

Microsoft made a mess of the folder structure in
64-bit. When they moved from 16-bit to 32-bit they
added a system32 folder. But with 64-bit they switched
folders around and gave ridiculous names to the 32-bit
folders.

So now on 64-bit:
Program Files is 64-bit program installs, while 32-bit
programs are in Program Files (x86). Worse, 64-bit
system files are in System32 while 32-bit system files
are in SysWOW64!
By hardcoding the path you're calling 64-bit winrar
on 64-bit Windows.
Wally W.
2015-04-08 12:46:25 UTC
Permalink
Post by Mayayana
WSH defaults to 64-bit on 64-bit, and the Program Files
folder is 32-bit on a 32-bit machine but 64-bit on a 64-bit
machine. So unless you have 64-bit winrar the path
will be invalid.
Microsoft made a mess of the folder structure in
64-bit. When they moved from 16-bit to 32-bit they
added a system32 folder. But with 64-bit they switched
folders around and gave ridiculous names to the 32-bit
folders.
And let's not forget: They made it more difficult to use, and/or
crippled in important ways, a wide array of DOS programs that worked
fine under WinXP.
Post by Mayayana
Program Files is 64-bit program installs, while 32-bit
programs are in Program Files (x86). Worse, 64-bit
system files are in System32 while 32-bit system files
are in SysWOW64!
By hardcoding the path you're calling 64-bit winrar
on 64-bit Windows.
Excellent information.

Thank you for this insight on how Windows, which is claimed to be
intuitive, actually works.
Dave "Crash" Dummy
2015-04-08 19:40:04 UTC
Permalink
Post by Mayayana
WSH defaults to 64-bit on 64-bit, and the Program Files
folder is 32-bit on a 32-bit machine but 64-bit on a 64-bit
machine. So unless you have 64-bit winrar the path
will be invalid.
Microsoft made a mess of the folder structure in
64-bit. When they moved from 16-bit to 32-bit they
added a system32 folder. But with 64-bit they switched
folders around and gave ridiculous names to the 32-bit
folders.
Program Files is 64-bit program installs, while 32-bit
programs are in Program Files (x86). Worse, 64-bit
system files are in System32 while 32-bit system files
are in SysWOW64!
By hardcoding the path you're calling 64-bit winrar
on 64-bit Windows.
Some problems can be avoided by using environment variables.
--
Crash

A line in the sand doesn't mean much if it disappears at high tide.
Loading...