Using shell function

Hi,

I want to create a simple form with a button which when clicked it starts msconfig.exe

Using shell function:

Dim procID As Integer

procID = shell ("C:\WINDOWS\PCHEALTH\HELPCTR\Binaries\msconfig.exe", AppWinStyle.NormalFocus)

It works this way, but say on the target machine Windows XP is installed on a drive other than C:

How do you program Shell to open msconfig.exe without knowing the drive letter.

e. rudder

[531 byte] By [e.rudder] at [2007-12-25]
# 1

First of all I would consider using the .NET Process class instead of the shell function

As far as your question is concerned...If the file executable is not in the system path or setup in the registry (ie ms office products or registered file extensions) you will have to know the complete path to the exe in order to use the shell command, process class, or any other means of running the file

DMan1 at 2007-8-31 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...
# 2

Thank you

e. rudder

e.rudder at 2007-8-31 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...