Hi!
Im trying to run cmd as admin in EG, I have seen something about making a pyhton script or so but havent locked in to it. I was hoping to make it in an easier way and thought I had it.
To run cmd as admin you can just type win+r "cmd" and press ctrl+shift+enter and it will start it as admin so I thought that I could do it in EG with the emulate keystrokes, should be simple enough but somehow it wont work.
I have added a screenshot on the macro that in my mind should be the same as doing it manually.
Can someone enlighten me on why this method dosent work?
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
[SOLVED] Run cmd as admin
[SOLVED] Run cmd as admin
- Attachments
-
- Capture.PNG (4.21 KiB) Viewed 2988 times
Last edited by r1kkie on Tue Sep 01, 2015 8:55 am, edited 1 time in total.
Re: Run cmd as admin
On windows 10 I can't get your to work. I have to use just {win} not {win+r} then I can get it to work.
On windows 7 it works as you had it.
I don't have any windows 8 VMs to test.
On windows 7 it works as you had it.
I don't have any windows 8 VMs to test.
Re: Run cmd as admin
Sry, misstyped it, its was supposed to be win+s and I had to insert a time delay before the shit+ctrl+return event.Dragon470 wrote:On windows 10 I can't get your to work. I have to use just {win} not {win+r} then I can get it to work.
On windows 7 it works as you had it.
I don't have any windows 8 VMs to test.
But now I have the next problem, the reson why I want to get in to cmd as admin is to restart my graphics card using devcon by using these two commands:
- cd C:\Program Files (x86)\Windows Kits\10\Tools\x64
- devcon restart =display *ven_10de*
The problem is I cant get eventghosts emulate keystrokes to type in cmd, instead nothing happens when those events is triggerd. Has anyone encountered that problem?
And last, is there another way to get eventghost to restart the graphicscard?
Re: Run cmd as admin
I thought that the cmd command for starting as an administrator was something like:
runas /user:administrator cmd.exe
runas /user:administrator cmd.exe
Re: Run cmd as admin
This thread should help you. See Mar 4 post by bskchaos; it worked for me.
[SOLVED] Re: Run cmd as admin
Thank you for your inputs, got it to work.
Approached it another angel and got it to work.
Made a batch file with the cmd commands I wanted to run and then started the batch file as admin.
EDIT: Wrote it without looking at your link, that thread helped me get it working.
Approached it another angel and got it to work.
Made a batch file with the cmd commands I wanted to run and then started the batch file as admin.
EDIT: Wrote it without looking at your link, that thread helped me get it working.