Jump to content

RunAsSet to open network properties


Recommended Posts

I'm working on trying to put together a small little script that will enable the end user to runas admin when opening network properties in control panel.

I tried this:

RunAsSet("administrator", "machine name", "password")

run("control powercfg.cpl")

and even

Run("RUNDLL32 SHELL32.DLL,Control_RunDLL ncpa.cpl")

which works fine on my machine, but it just isn't working on the user machine. I noticed that the ncpa.cpl file is in C:\i386 on the user PC whereas on my PC it's in c:\windows\system32\.

am I missing something really easy here?

Also wondered if there was a way in which we could use the runasset command without the machine name to save having to modify the au3 file every time it needs to be used on a different machine.

Any advice would be greatly appreciated. I'm afriad I'm very new to this. Thank you!

Link to comment
Share on other sites

I can confirm the behavior on XP SP2. Most *.cpl files EXCEPT ncpa.cpl work....

Try right-clicking ncpa.cpl and doing a Run As... that also fails. I imagine that the "Network Connections" actually references some funky shell folder

ASIDE: Prior to SP2 I was able to use ShellObject Editor to put "My network places" and "Recycle Bin" inside "My Computer" instead of on the desktop. SP2 broke the special "My network places" shortcut :)

Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

You need the full path to Internet Explorer :)

Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe" & " ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}")

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...