Using Run as ...
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Using Run as ...

Hybrid View

  1. #1
    Senior Member
    Join Date
    Oct 2004
    Posts
    183

    Using Run as ...

    I have XP Pro SP2 which is fully updated. I use a limited account for general use and have disabled fast switching.

    If I want to make any configuration changes or examine anything which requires Admin rights, I either shift-right click or open a CMD screen (using "runas /user:<Admin name> cmd") and then run the appropriate .exe, .cpl etc.

    I've noticed that I can access Control Panel applets in this way except Network Connections (to gain access to TCP/IP properties etc.). Is there any way to access this from a limited user account? If not, what's special about this? I can access Administrative Tools, Security Centre, Windows Firewall, User Accounts etc. in this way but it's infuriating that I can't access Network Connections. The Security settings for ncpa.cpl are such that my limited account can Read & Execute.

    I know that I can get at what I want using the command line (netsh interface ...) but it's not quite as easy as using the GUI.

    Thanks for your time.

  2. #2
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,403
    Quote Originally Posted by Ignatius
    I have XP Pro SP2 which is fully updated. I use a limited account for general use and have disabled fast switching.

    If I want to make any configuration changes or examine anything which requires Admin rights, I either shift-right click or open a CMD screen (using "runas /user:<Admin name> cmd") and then run the appropriate .exe, .cpl etc.

    I've noticed that I can access Control Panel applets in this way except Network Connections (to gain access to TCP/IP properties etc.). Is there any way to access this from a limited user account?
    runas /user:<admin name> "c:\Program Files\Internet Explorer\iexplore.exe"
    Then type "Control Panel" in the addressbar
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  3. #3
    Senior Member
    Join Date
    Oct 2004
    Posts
    183
    Thanks for the tip SirDice, but it doesn't work!

    When I typed "Control Panel" in the address bar (with or without the quotes), it defaulted to searching the 'net for Control Panel. I entered c:\ and it worked like Windows Explorer but it wouldn't allow me access to the Administrator's files (even though I'd used the correct <admin name> and password in the runas command). It seems that the Admin privileges aren't transferred to iexplore.exe (I'd seen something about this before). Needless to say, when I navigated to Control Panel and Network Connection Properties, it reported:

    "Some of the controls on this property sheet are disabled because you do not have sufficient privileges to access or change them"

    Any other ideas?

  4. #4
    Senior Member t34b4g5's Avatar
    Join Date
    Sep 2003
    Location
    Australia.
    Posts
    2,391
    Have you tried right clicking on the icon and just choose the "Run As" option select admin type in the password and open it that way?

  5. #5
    Senior Member
    Join Date
    Oct 2004
    Posts
    183
    Quote Originally Posted by t34b4g5
    Have you tried right clicking on the icon and just choose the "Run As" option select admin type in the password and open it that way?
    That option isn't available - either from right click or shift-right click. It seems to affect ONLY Network Connections and the result is the same if I navigate to ncpa.cpl

  6. #6
    THE Bastard Sys***** dinowuff's Avatar
    Join Date
    Jun 2003
    Location
    Third planet from the Sun
    Posts
    1,250
    Have you tried

    runas /user:<admin name> "%SYSTEMROOT%\ncpa.cpl
    09:F9:11:02:9D:74:E3:5B8:41:56:C5:63:56:88:C0

  7. #7
    Senior Member
    Join Date
    Oct 2004
    Posts
    183
    Quote Originally Posted by dinowuff
    Have you tried

    runas /user:<admin name> "%SYSTEMROOT%\ncpa.cpl
    I tried it (with and without the double quotes) and the CMD screen opens, awaiting my Admin password but then it closes. ncpa.cpl is in c:\windows\system32 so I tried changing %systemroot% but still no joy.

    I'm coming round to the idea that this behaviour might be by design, although I have no reason why it should only affect this applet.

  8. #8
    THE Bastard Sys***** dinowuff's Avatar
    Join Date
    Jun 2003
    Location
    Third planet from the Sun
    Posts
    1,250
    Quote Originally Posted by Ignatius
    I tried it (with and without the double quotes) and the CMD screen opens, awaiting my Admin password but then it closes. ncpa.cpl is in c:\windows\system32 so I tried changing %systemroot% but still no joy.

    I'm coming round to the idea that this behaviour might be by design, although I have no reason why it should only affect this applet.
    OK I may be reading this wrong, but you have to open the command prompt and then type in the command. That is to say you can't do this from the windows run command.
    09:F9:11:02:9D:74:E3:5B8:41:56:C5:63:56:88:C0

  9. #9
    Senior Member
    Join Date
    Mar 2004
    Posts
    557
    Hi

    Unfortunately, ncpa.cpl is the only control panel item that cannot
    be started with runas, neither with

    Code:
    runas /user:administrator ncpa.cpl
    nor with

    Code:
    runas /user:administrator test.bat
    where test.bat includes
    Code:
    rundll32.exe shell32.dll,Control_RunDLL ncpa.cpl

    The following, however, will work[1,2]:
    Code:
    runas /user:administrator "explorer.exe ::{7007ACC7-3202-11D1-AAD2-00805FC1270E}"
    Cheers


    [1] http://msdn2.microsoft.com/en-us/lib...17(VS.85).aspx
    [2] http://msdn2.microsoft.com/en-us/lib...18(VS.85).aspx
    Last edited by sec_ware; January 14th, 2008 at 09:56 PM.
    If the only tool you have is a hammer, you tend to see every problem as a nail.
    (Abraham Maslow, Psychologist, 1908-70)

  10. #10
    THE Bastard Sys***** dinowuff's Avatar
    Join Date
    Jun 2003
    Location
    Third planet from the Sun
    Posts
    1,250
    *bows to secware*Cheers mate - another thing learned today!
    09:F9:11:02:9D:74:E3:5B8:41:56:C5:63:56:88:C0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides