hiteksoftware.com Forum Index hiteksoftware.com
User discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Windows 2008 R2 & WOW64 / 32 vs 64-Bit issues / please h

 
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions
View previous topic :: View next topic  
Author Message
vinva



Joined: 05 Oct 2010
Posts: 2

PostPosted: Tue Oct 05, 2010 3:35 am    Post subject: Windows 2008 R2 & WOW64 / 32 vs 64-Bit issues / please h Reply with quote

We're running Automize on Windows server 2008R2, and i am having problems running a VBScript (via Automize) which instantiates a 64-Bit COM object. It is failing on the line of code which instantiates the ActiveX control.

------------------------------------------

This is what i did to test my approach, in an effort to emulate what AUTOMIZE would do..

I ran this from the console on the 2008 R2 machine:

START->RUN->%WINDIR%\SysWOW64\Cmd.exe

This gives me the 32-Bit command prompt (on a 64-Bit machine), if i then run the following command in the same command window:

cscript.exe SCRIPT_A.vbs

- assume SCRIPT_A.vbs contains code something like this:

oShell.Run("%WINDIR%\sysnative\cscript.exe SCRIPT_B.vbs", 1, true)

This then runs 64-Bit cscript.exe ("sysnative" is a virtual directory to get around windows 32/64-bit file redirection). So it should then run SCRIPT_B.vbs under a 64-bit context, right?, even though it was initiated originally from a 32-bit cmd.exe as explained above.

Anyway it all works fine when run this way, perfectly... SCRIPT_B.vbs instantiates the 64-Bit COM object fine. I ran this test in order to emulate what AUTOMIZE would do, given it is a 32-Bit application...

------------------------------------------

HOWEVER

Running "cscript.exe SCRIPT_A.vbs" as a task in AUTOMIZE results in SCRIPT_B.vbs failing (it fails at the code which instantiates the 64-Bit COM object). I assume running cscript.exe under AUTOMIZE means it will run as a 32-Bit app (from SysWOW64).. so then running the subsequent SCRIPT_B.vbs script (as above) should then run SYSTEM32\cscript.exe, and it should all work fine. But it doesnt work.

Any idea what's going on?

Has anyone had experience launching 64-bit apps from AUTOMIZE?

Any tips/tricks?
Back to top
View user's profile Send private message
vinva



Joined: 05 Oct 2010
Posts: 2

PostPosted: Tue Oct 05, 2010 4:11 am    Post subject: Reply with quote

I think i have the solution,

if i just set up a task in AUTOMIZE which runs something like thi

c:\windows\sysnative\cscript.exe <somescript.vbs>

It runs it under 64-Bit context, and it all works.

In all my frantic testing i missed this test, duh.

Anyway this may help someone run the 64-Bit versions of cscript or cmd.exe in future.
Back to top
View user's profile Send private message
melvin
Site Admin


Joined: 25 May 2006
Posts: 631
Location: Santa Barbara, california

PostPosted: Tue Oct 05, 2010 7:43 pm    Post subject: Reply with quote

thanks for the feedback. I would have had no clue, but this will definitely help other users with similar issues.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group