Programmatically open compmgmt.msc

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
 
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()
 
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)" <eSolTecInc501c3@discussions.microsoft.com>
schreef in bericht
 
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)" <eSolTecInc501c3@discussions.microsoft.com>
schreef in bericht
Thank you everyone, but especially thank you Theo. What you suggested
worked.

Michael
 
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)" <eSolTecInc501c3@discussions.microsoft.com>
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
 
Back
Top