Programmatically open compmgmt.msc

G

Guest

Thank you in advance for any and all assistance. I'm building a technician's
tool and I'm trying to create a Jump Panel of buttons to the Windows System32
folder to open files programmatically. I have the majority of the program
files opening except the Microsoft Computer Management console.

I've tried in the button click event
Shell("C:\WINDOWS\system32\compmgmt.msc")

and nothing happens. No open program, no errors nothing.

Michael
 
T

tomb

eSolTec said:
Thank you in advance for any and all assistance. I'm building a technician's
tool and I'm trying to create a Jump Panel of buttons to the Windows System32
folder to open files programmatically. I have the majority of the program
files opening except the Microsoft Computer Management console.

I've tried in the button click event
Shell("C:\WINDOWS\system32\compmgmt.msc")

and nothing happens. No open program, no errors nothing.

Michael
Try this:

Shell("C:\WINDOWS\system32\compmgmt.msc /s")

T
 
G

Guest

or you could try using the Process Class

Dim proc as new Process
Dim procSI as new ProcessStartInfo("C:\WINDOWS\system32\compmgmt.msc /s")

proc.StartInfo = procSI
proc.Start()


that should work too
 
G

Guest

looking at my post, i think i made a typo....there shouldnt be a "/s" after
the process name...try this instead

Dim proc as new Process
Dim procSI as new ProcessStartInfo("C:\WINDOWS\system32\compmgmt.msc")

proc.StartInfo = procSI
proc.Start()
 
G

Guest

Thank you everyone, but especially thank you Theo. What you suggested worked.

Michael
 
M

Michel Posseth [MCP]

Well it only has one flaw

what if the user does not have a path

C:\WINDOWS\system32\compmgmt.msc

on one of Computers for instance the windows path is

C:\WIN\system32\compmgmt.msc

And on another one it is

D:\WIN\system32\compmgmt.msc

you would better use

System.Diagnostics.Process.Start("compmgmt.msc")


This will always work ( unless someone messed with the evironment variabels
, however this is not your problem

regards

Michel Posseth [MCP]


"eSolTec, Inc. 501(c)(3)" <[email protected]>
schreef in bericht
 
T

Theo Verweij

Or to be completely sure:
System.Diagnostics.Process.Start(Environ("SystemRoot"&"\system32\compmgmt.msc")

Which will work as long as windows works, so you don't have the
discussion who's problem it is.

Well it only has one flaw

what if the user does not have a path

C:\WINDOWS\system32\compmgmt.msc

on one of Computers for instance the windows path is

C:\WIN\system32\compmgmt.msc

And on another one it is

D:\WIN\system32\compmgmt.msc

you would better use

System.Diagnostics.Process.Start("compmgmt.msc")


This will always work ( unless someone messed with the evironment variabels
, however this is not your problem

regards

Michel Posseth [MCP]


"eSolTec, Inc. 501(c)(3)" <[email protected]>
schreef in bericht
Thank you everyone, but especially thank you Theo. What you suggested
worked.

Michael
 
G

Guest

well ...... :)

the path environment variabel always points to system32

start , configuration , system , advanced tab , environment variabels

otherwise all executables that are located there wouldn`t start withoput
explicitly calling them with there full location

cmd , msconfig , ping etc etc etc etc etc

so in my opinion it is not necesary to call them with there full path as
someone has then messed so much with windows that it wouldn`t even run
properly ( maybe cripled )

I wonder what will happen with Environ("SystemRoot") when you change the
path settings :)


regards

Michel Posseth [MCP]









Theo Verweij said:
Or to be completely sure:
System.Diagnostics.Process.Start(Environ("SystemRoot"&"\system32\compmgmt.msc")

Which will work as long as windows works, so you don't have the
discussion who's problem it is.

Well it only has one flaw

what if the user does not have a path

C:\WINDOWS\system32\compmgmt.msc

on one of Computers for instance the windows path is

C:\WIN\system32\compmgmt.msc

And on another one it is

D:\WIN\system32\compmgmt.msc

you would better use

System.Diagnostics.Process.Start("compmgmt.msc")


This will always work ( unless someone messed with the evironment variabels
, however this is not your problem

regards

Michel Posseth [MCP]


"eSolTec, Inc. 501(c)(3)" <[email protected]>
schreef in bericht
Thank you everyone, but especially thank you Theo. What you suggested
worked.

Michael

:

use:
System.Diagnostics.Process.Start("C:\WINDOWS\system32\compmgmt.msc")


eSolTec wrote:
Thank you in advance for any and all assistance. I'm building a
technician's
tool and I'm trying to create a Jump Panel of buttons to the Windows
System32
folder to open files programmatically. I have the majority of the
program
files opening except the Microsoft Computer Management console.

I've tried in the button click event
Shell("C:\WINDOWS\system32\compmgmt.msc")

and nothing happens. No open program, no errors nothing.

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top