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.

[SOLVED] Run cmd as admin

If you have a question or need help, this is the place to be.
Post Reply
r1kkie
Posts: 16
Joined: Wed Aug 26, 2015 7:19 pm

[SOLVED] Run cmd as admin

Post by r1kkie »

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?
Attachments
Capture.PNG
Capture.PNG (4.21 KiB) Viewed 2990 times
Last edited by r1kkie on Tue Sep 01, 2015 8:55 am, edited 1 time in total.
Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

Re: Run cmd as admin

Post by Dragon470 »

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.
r1kkie
Posts: 16
Joined: Wed Aug 26, 2015 7:19 pm

Re: Run cmd as admin

Post by r1kkie »

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.
Sry, misstyped it, its was supposed to be win+s and I had to insert a time delay before the shit+ctrl+return event.

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?
Meartan
Posts: 1
Joined: Sat Aug 29, 2015 1:34 am

Re: Run cmd as admin

Post by Meartan »

I thought that the cmd command for starting as an administrator was something like:
runas /user:administrator cmd.exe
kkl
Experienced User
Posts: 317
Joined: Wed May 04, 2011 9:32 pm

Re: Run cmd as admin

Post by kkl »

This thread should help you. See Mar 4 post by bskchaos; it worked for me.
r1kkie
Posts: 16
Joined: Wed Aug 26, 2015 7:19 pm

[SOLVED] Re: Run cmd as admin

Post by r1kkie »

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. :)
Post Reply