473,466 Members | 4,869 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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:\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

Dec 10 '06 #1
1 980

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).
Dec 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dennis Gaida | last post by:
Hi there, I want to upload some exported reports to a FTP Server, for this I use a command line FTP utility. My Database sits in C:\Documents and Settings\Dennis\My Documents\Database The FTP...
0
by: Frans Bouma | last post by:
Hello, It seems VS.NET 2003 locks up itself and the complete shell (mouse locks also) when entering a breakpoint in a special situation. Below is the code to reproduce this behavior. It...
69
by: Peter Olcott | last post by:
Does JavaScript represent its controls internally as Microsoft Windows controls, or does it build them from scratch like Java?
1
by: weston | last post by:
So, the following apparently works as a method of grafting a method onto an object (using the squarefree JS shell): obj = { x: 1, inc: null } result obj.inc = function () { this.x++ } result...
2
by: wileyregister22 | last post by:
When rightclicking a, for example, pdf file on windows, one normally gets a screen with three or four tags. Clicking on one of the summary tag one can get some info like "title", "Author",...
25
by: dennijr | last post by:
ok, shell always used to be easy for me, now its starting to get annoying cause i dont know wats wrong heres the simplist code possible: Private Sub IExplorer_Click() a = Shell("C:\Program...
4
by: nagar | last post by:
On certain occasions I get COM exceptions errors when enumerating the Windows Explorer active windows Some customers reported the error System.OutOfMemoryException: Retrieving the COM class...
15
by: lixinyi.23 | last post by:
Hi! I'm currently working on a scientific computation software built in python. What I want to implement is a Matlab style command window <-> workspace interaction. For example, you type...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.