Sign in to follow this  
Followers 0
MadSc13ntist

Run() for Computer Managment (compmgmt.msc)

6 posts in this topic

I have become used to typing compmgmt.msc in the run bar in start as opposed to right clicking My Computer and clicking manage...

When i try any of the following it bombs and doesn't load:

Run('compmgmt.msc')

Run('compmgmt.msc /s')

Run('"compmgmt.msc /s"')

Run('%SYSTEMROOT%\system32\compmgmt.msc /s')

Run('"%SYSTEMROOT%\system32\compmgmt.msc /s"')

I also made a link to it that loads when clicked and tried Run('linkpath\link.lnk') (not literally) and that wouldn't load either (figured it wouldn't but what the hey...)

Any suggestions?

Share this post


Link to post
Share on other sites



Try

Run("cmd /c compmgmt.msc", "", @SW_HIDE)

Run only works with true "executable files" like EXE and BAT ....

If you are using the latest beta version of AutoIt, there is also a DllCall(... "shellexecute" ....) solution. Search the forum for ShellExecute if interested.


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

i would suggest:

Run(@ComSpec & ' /c compmgmt.msc', '', @SW_HIDE)

but it's nearly the same as cyberslugs method.

Greetings,

ZeD

Share this post


Link to post
Share on other sites

I bet the above all work.

Here is an alternative:

Run("mmc compmgmt.msc", @SystemDir)

Share this post


Link to post
Share on other sites

You all rock! thanks again guys!

Props: CyberSlug, ZeDMIN, Larry (the Super-Mod) and SlimShady...

Hi Larry! thanks again... you are a very useful mammal...

Share this post


Link to post
Share on other sites

i would suggest:

Run(@ComSpec & ' /c compmgmt.msc', '', @SW_HIDE)

but it's nearly the same as cyberslugs method.

Greetings,

ZeD

<{POST_SNAPBACK}>

Yeah, the only reason I didn't say that was because I was feeling lazy and didn't want to mess up the spaces and quote marks :idiot:

I figured "compmgmt.msc" does not come with Windows 9x/Me, so @ComSpec will always be cmd


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0