Autohotkey script, to open elevated command prompt on host pc, connected via TeamViewer or AnyDesk Topic is solved

Ask gaming related questions (AHK v1.1 and older)
vikasgandhi
Posts: 34
Joined: 03 Jul 2021, 20:28

Autohotkey script, to open elevated command prompt on host pc, connected via TeamViewer or AnyDesk

17 Apr 2024, 23:25

The following script is not working, please help to resolve the issue

Code: Select all

#SingleInstance, Force

; Define a hotkey to trigger the command prompt
^!c::  ; Press Ctrl + Alt + C to trigger

; Send the shortcut to open the Run dialog
Send, #r

; Wait for the Run dialog to open
Sleep, 500

; Send the command to open an elevated command prompt
Send, powershell -Command "Start-Process cmd -Verb RunAs"

; Send Enter to execute the command
Send, {Enter}

return
Last edited by vikasgandhi on 18 Apr 2024, 07:00, edited 1 time in total.
User avatar
boiler
Posts: 17120
Joined: 21 Dec 2014, 02:44

Re: Autohotkey script, to open elevated command prompt on host pc, connected via TeamViewer or AnyDesk  Topic is solved

18 Apr 2024, 02:52

@vikasgandhi — As asked before, please do not put your own text inside of quote tags. Thank you!

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], EUPHORlCc and 38 guests