|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Shell( ) inconsistency with actual windows interfacI 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:\Program Files (x86)\Sierra\FEAR\FEAR.exe", AppWinStyle.NormalFocus) 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 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). "Robinson" wrote: Your diagnosis definitely appears to be right; I moved the .exe to the /fear > > 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). directory and it worked like a charm. I'm using Shell because it returns the PID. Does "Process" also return the PID, or could I just call an attached function to retrieve it? Thanks, David
Retrieving info out of a MDB
Commercial copy protection? Need some help... Merging Java and VB for alert box Retrieve Hard Disk Serial Number or othe unique PC identifier - XP & 2K ERROR: The state information is invalid for this page and might be corrupted How to Add *AND* Process Checkbox Column in a DataGridView? WebBrowser BeforeNavigate2 - What is pDisp? How to create an IDE? Creating A Movie Player? |
|||||||||||||||||||||||