Jump to content

Recommended Posts

Posted

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!

Posted

silliness on my part. It IS in system32 (my search criteria was too narrow). When I try to run this script, the root directory opens. Very weird.

I'll keep working on it.

Posted (edited)

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!

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
×
×
  • Create New...