Advertisement

12.07.2007 at 01:11PM PST, ID: 23009787
[x]
Attachment Details

Shelling cmd.exe with additional commands

Asked by troehm in MS DOS, Miscellaneous Programming, Visual Basic Programming

Tags: Microsoft, Visual Basic, 6

I'm trying to shell a program that isn't an executable. I'm trying to do this in VB without the use of an extra batch file, but the only way I can seem to get this to run in cmd.exe is by changing to the directory first, then running the file. For instance in the batch file I do something like this to execute it.

cd c:\Program Files\Packages\1837SCS\
win32.simcfg

So in VB i've been playing around with this command:

Shell "cmd.exe /k cd c:\Program Files\Packages\1837SCS\ ????", vbNormalFocus

is there anyway I can run that file after changing to that directory? BTW, I can't shell the full path or cmd.exe with the full path either. Start Free Trial
 
Loading Advertisement...
 
[+][-]12.07.2007 at 01:22PM PST, ID: 20431008

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.07.2007 at 01:24PM PST, ID: 20431025

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS DOS, Miscellaneous Programming, Visual Basic Programming
Tags: Microsoft, Visual Basic, 6
Sign Up Now!
Solution Provided By: PaulHews
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628