Launch Admin CMD by using User and Password Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
NateHarul

Launch Admin CMD by using User and Password

21 Oct 2017, 05:40

I am looking to launch cmd as admin, I obviously have my user and password.

I looked it up and saw Run *RunAs and also saw the task sched idea but wondering if anyone knows a way to script it so it launches the admin cmd using the user and pass I place in the script.

Thanks
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Launch Admin CMD by using User and Password

23 Oct 2017, 00:46

Check out the sample that is given in the help for RunAs.
NateHarul

Re: Launch Admin CMD by using User and Password

23 Oct 2017, 02:56

I spent a good 2 hours trying what is written in the documentation and nothing worked.

All I need to do is to launch administrator CMD using my username and pw, just open the cmd window as admin using my credentials.

I had no luck trying all types of combinations.

Can you help please?
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Launch Admin CMD by using User and Password

23 Oct 2017, 04:06

NateHarul wrote:I am looking to launch cmd as admin, I obviously have my user and password.

I looked it up and saw Run *RunAs and also saw the task sched idea but wondering if anyone knows a way to script it so it launches the admin cmd using the user and pass I place in the script.

Thanks
You've meant that? https://autohotkey.com/board/topic/9736 ... -as-admin/
NateHarul

Re: Launch Admin CMD by using User and Password

23 Oct 2017, 05:30

BoBo wrote:
NateHarul wrote:I am looking to launch cmd as admin, I obviously have my user and password.

I looked it up and saw Run *RunAs and also saw the task sched idea but wondering if anyone knows a way to script it so it launches the admin cmd using the user and pass I place in the script.

Thanks
You've meant that? https://autohotkey.com/board/topic/9736 ... -as-admin/
Hi, saw that, that is why I mentioned the task sched in my OP. So im wondering if there is a way to launch admin cmd using my username and pass?
User avatar
Tomer
Posts: 366
Joined: 21 Aug 2016, 05:11

Re: Launch Admin CMD by using User and Password

23 Oct 2017, 06:29

Code: Select all

runas, username, password, domain
run, cmd
?
NateHarul

Re: Launch Admin CMD by using User and Password

23 Oct 2017, 06:52

Tomer wrote:

Code: Select all

runas, username, password, domain
run, cmd
?
opens regular cmd not admin cmd, try it
User avatar
Tomer
Posts: 366
Joined: 21 Aug 2016, 05:11

Re: Launch Admin CMD by using User and Password

23 Oct 2017, 08:16

if you run it with user who has admin rights on the machine,
the cmd probably runs as admin
NateHarul

Re: Launch Admin CMD by using User and Password

23 Oct 2017, 08:26

Tomer wrote:if you run it with user who has admin rights on the machine,
the cmd probably runs as admin
That is not correct, try it and see
NateHarul

Re: Launch Admin CMD by using User and Password

23 Oct 2017, 11:27

Xtra wrote:

Code: Select all

runas, username, password, domain
run *runas cmd
thanks, saw that in documentation, tried it but got an error "system verbs unsupported " I tried cmd.exe as well

If someone has any code that I could test that would not be a system verb to launch the admin cmd let me know

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Frogrammer, gongnl and 283 guests