Desktop productivity for business analysts and programmers

EG 6.1 scripting

Reply
Contributor ckx
Contributor
Posts: 55

EG 6.1 scripting

I'm testing Enterprise Guide 6.1 (64-bit) at our site but ran into a really weird problem trying to run programs in batch mode. Chris Hemedinger explains how to use VBScript to do this ( Using SAS Enterprise Guide to run programs in batch - The SAS Dummy) and that worked fine using EG 4.3. Adapting the script for EG 6.1 was simple enough, just change CreateObject("SASEGObjectModel.Application.4.3") to CreateObject("SASEGObjectModel.Application.6.1"). The modified script worked if I ran it from a command line. Problem was, I wanted to use it in a text editor (PSPad) to run the current SAS file in batch. Using PSPad, I kept getting errors "Could not create object named "SASEGObjectModel.Application.6.1"". Using “c:\windows\system32\wscript.exe” or “c:\windows\sysWOW64\wscript.exe” made no difference.


It turned out I had to use “C:\WINDOWS\sysnative\wscript.exe”. That is weird, since there is no “C:\WINDOWS\sysnative” directory.


This issue is due to the fact that PSPad is a 32-bit application but EG 6.1 is 64-bit. “%windir%\system32” on 64-bit systems is actually reserved for the 64-bit version of wscript and similar programs and dlls. “%windir%\sysWOW64” contains 32-bit versions. If a 32-bit application attempts to access “%windir%\system32”, it is redirected to “%windir%\sysWOW64”. Usually, that would be fine, but not for EG 6.1. In that case, “%windir%\sysnative” should be used. WOW64 recognises sysnative as a special alias to indicate that the file system should not redirect the access.

See Microsoft, File System Redirector for further details.

At least that's my explanation! Hope this helps other as well.

John Hendrickx

Community Manager
Posts: 2,884

Re: EG 6.1 scripting

John, thanks for sharing that tip.  "Sysnative" is new to me!

And I'm glad you're able to use EG in your batch processing.

Chris

Ask a Question
Discussion stats
  • 1 reply
  • 1760 views
  • 1 like
  • 2 in conversation