RUNAS /user

NetstudentNetstudent Member Posts: 1,693 ■■■□□□□□□□
I am trying to remotely manage some computers, but I don;t want to logoff the current user. Anyways I want to run the appwiz.cpl from command line but we have a GPO that blocks it for standard users. When I run appwiz.cpl from CMD, I get the sec. policy message as I should. But when I do a

runas /user:me@work.com "appwiz.cpl" it asks for my password and then I get a message stating:

Attempting to start appwiz.cpl as user "me@work.com" ...
RUNAS ERROR: Unable to run - appwiz.cpl
193: appwiz.cpl is not a valid Win32 application.

Does anyone know how to get around this or run appwiz from an administrative token on CMD?

I can navigate to c:\windows\sys32\appwiz right click and runas, but no command line. why?
There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!

Comments

  • BeaverC32BeaverC32 Member Posts: 670 ■■■□□□□□□□
    Try:
    runas /user:COMPUTERNAME\Administrator "control appwiz.cpl"
    MCSE 2003, MCSA 2003, LPIC-1, MCP, MCTS: Vista Config, MCTS: SQL Server 2005, CCNA, A+, Network+, Server+, Security+, Linux+, BSCS (Information Systems)
  • NetstudentNetstudent Member Posts: 1,693 ■■■□□□□□□□
    I tried that minus the "control" keyword. That worked, thanks beav!
    There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
  • blargoeblargoe Member Posts: 4,174 ■■■■■■■■■□
    If you have the icon in control panel, you can shift-rt click and get Run As in the menu
    IT guy since 12/00

    Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
    Working on: RHCE/Ansible
    Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands...
  • NetstudentNetstudent Member Posts: 1,693 ■■■□□□□□□□
    Our GPO security policy gives users a very limited amount of control panel tools. They do not appear as icons.
    There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
  • shednikshednik Member Posts: 2,005
    BeaverC32 wrote:
    Try:
    runas /user:COMPUTERNAME\Administrator "control appwiz.cpl"

    So why would the local admin account work but not a domain account with sufficient rights...i've run into this same issue as well before...just curious
  • sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    shednik wrote:
    BeaverC32 wrote:
    Try:
    runas /user:COMPUTERNAME\Administrator "control appwiz.cpl"

    So why would the local admin account work but not a domain account with sufficient rights...i've run into this same issue as well before...just curious

    I've seen this before too, and many times it's because RunAs is expecting to run an executable file. If you were to try RunAs with a domain account to run an executable, like cmd or mmc, it should work. Starting a *.cpl file by specifying "control" first works because you are calling "c:\windows\system32\control.exe" first, then that runs the *.cpl file. Ditto if you try to run a *.vbs with RunAs, it can fail. But if you specify:

    RunAs /user:domain\username cscript filename.vbs

    it will most often work.

    At least the above has been true in many cases I have seen, so take it FWIW. I can't tell if NetStudent did or did not successfully use it with the "control" keyword. At first I thought he meant that it worked minus the word "control", but then I wondered if he meant he had already tried it as a local admin w/o the word "control" unsuccessfully, but when he used "control" it worked. See my test below:
    C:\>runas /user:administrator appwiz.cpl
    Enter the password for administrator:
    Attempting to start appwiz.cpl as user "ComputerName\Administrator" ...
    RUNAS ERROR: Unable to run - appwiz.cpl
    193: appwiz.cpl is not a valid Win32 application.
    

    Then when I used "control" first -
    C:\>runas /user:administrator "control appwiz.cpl"
    Enter the password for chief:
    Attempting to start control appwiz.cpl as user "ComputerName\Administrator" ...
    
    C:\Program Files\Support Tools>
    

    And voila, it worked.
    All things are possible, only believe.
  • NetstudentNetstudent Member Posts: 1,693 ■■■□□□□□□□
    but then I wondered if he meant he had already tried it as a local admin w/o the word "control" unsuccessfully, but when he used "control" it worked. See my test below:

    exactly..

    BUt it did work with a domain admin account as well. Loading the Control console before appwiz was the trick.
    There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
  • AhriakinAhriakin Member Posts: 1,799 ■■■■■■■■□□
    Or use RunAs to launch cmd.exe as an admin., everything you do from this command prompt (incl. launched GUI tools) inherits the admin. privileges and permissions.
    We responded to the Year 2000 issue with "Y2K" solutions...isn't this the kind of thinking that got us into trouble in the first place?
  • NetstudentNetstudent Member Posts: 1,693 ■■■□□□□□□□
    hmmm...good idea! Never thought about that.
    There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
  • BeaverC32BeaverC32 Member Posts: 670 ■■■□□□□□□□
    Glad it worked out for ya!
    MCSE 2003, MCSA 2003, LPIC-1, MCP, MCTS: Vista Config, MCTS: SQL Server 2005, CCNA, A+, Network+, Server+, Security+, Linux+, BSCS (Information Systems)
Sign In or Register to comment.