Shell( ) inconsistency with actual windows interfac

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Kanter

    #1

    Shell( ) inconsistency with actual windows interfac

    Hi,

    I have some VB scripts which start by opening an application, in this case
    it is a game called FEAR (some of you may be familiar). I am using Visual
    Studio 2005 Professional Edition running on Windows XP x64. I am using the
    script on the same system.

    I can open FEAR manually on the system; I just double click the short cut
    and everything is good. However, the following line in my application does
    not appear to produce the same results:

    ProcID = Shell("C:\Progr am Files (x86)\Sierra\FE AR\FEAR.exe",
    AppWinStyle.Nor malFocus)

    AFAIK, this should do the trick. However, it gives me a strange error
    (something about being unable to initialize because it cannot get some game
    resources).

    Does anyone have any ideas why the shell command is giving me different
    results than simply opening the app manually? I've never seen that before.
    Could it be the result of some funky copy protection on the game?

    Thanks in advance,


    David

  • Robinson

    #2
    Re: Shell( ) inconsistency with actual windows interfac


    Yes, the "working directory" of the process expects to be in \FEAR but it is
    actually the directory of your program. Use the "Process" object to launch
    it, setting the working directory (via. the StartInfo property).


    Comment

    Working...