%ComSpec% is not working on AnyDesk/TeamViewer

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
gregster
Posts: 8886
Joined: 30 Sep 2013, 06:48

Re: %ComSpec% is not working on AnyDesk/TeamViewer

Post by gregster » 28 Mar 2023, 10:30

@vikasgandhi: Your posting behaviour seems a bit odd. I now have deleted the duplicate topic (which was in the wrong forum, btw), since you decided to continue here anyway, although boiler allowed the new thread. :problem:

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: %ComSpec% is not working on AnyDesk/TeamViewer

Post by swagfag » 28 Mar 2023, 10:45

well, while i may not be as trusting (because for all i know ur support services could entail being a bloody benchod scammer looking for a fast and easy way to launch an elevated prompt and syskey old vulnerable grannies in Minnesota as soon as they join ur TeamViewer session. believe me, ive seen enough of these "tech supporter" videos on youtube to know), i would defer to... "doing the thing ive told u to do twice already", which (again, 3rd time's a charm i guess) is:
  • if ur_script.ahk/exe is currently launched on ur PC, give up (since no ahk command can interact with someone else's PC via a TeamViewer session. beyond sending raw keypresses, i suppose)
  • if ur_script.ahk/exe is currently launched on the remote PC, first check if ur hotkey is getting triggered correctly when u press it. if its not, then we can start thinking about why that might be the case. and if it is, then check if the Run command succeeds
all of which ive already explained how to do earlier. this is getting stale, yawn

vikasgandhi
Posts: 31
Joined: 03 Jul 2021, 20:28

Re: %ComSpec% is not working on AnyDesk/TeamViewer

Post by vikasgandhi » 28 Mar 2023, 11:28

swagfag wrote:
28 Mar 2023, 10:45
well, while i may not be as trusting (because for all i know ur support services could entail being a bloody benchod scammer looking for a fast and easy way to launch an elevated prompt and syskey old vulnerable grannies in Minnesota as soon as they join ur TeamViewer session. believe me, ive seen enough of these "tech supporter" videos on youtube to know), i would defer to... "doing the thing ive told u to do twice already", which (again, 3rd time's a charm i guess) is:
  • if ur_script.ahk/exe is currently launched on ur PC, give up (since no ahk command can interact with someone else's PC via a TeamViewer session. beyond sending raw keypresses, i suppose)
  • if ur_script.ahk/exe is currently launched on the remote PC, first check if ur hotkey is getting triggered correctly when u press it. if its not, then we can start thinking about why that might be the case. and if it is, then check if the Run command succeeds
all of which ive already explained how to do earlier. this is getting stale, yawn
Below are three types of scripts, which have one thing in common in nature that, on pressing a combination of keys, they open a window.

But what is the problem, only Google's page opening command (Win key + i) is the only command that will work on your system as well as on the client system (which is connected to TeamViewer / AnyDesk).
Script: 1)

Code: Select all

#i::
Run, https://www.google.com/
return
Script: 2)

Code: Select all

!i::
Run, c:/windows/system32/notepad.exe
return
Script: 3)
#SingleInstance Force
SetWorkingDir `%A_ScriptDir`%
if not A_IsAdmin
Run *RunAs "%A_ScriptFullPath%" ; (A_AhkPath is usually optional if the script has the .ahk extension.) You would typically check first.
^t::
Run, *runas %ComSpec%
return
Solution required from forum:-
Can anyone, make script no 2 & 3 in such a way that both these scripts also work on client's system exactly like script 1 is doing?

vikasgandhi
Posts: 31
Joined: 03 Jul 2021, 20:28

Re: %ComSpec% is not working on AnyDesk/TeamViewer

Post by vikasgandhi » 28 Mar 2023, 11:35

gregster wrote:
28 Mar 2023, 10:30
@vikasgandhi: Your posting behaviour seems a bit odd. I now have deleted the duplicate topic (which was in the wrong forum, btw), since you decided to continue here anyway, although boiler allowed the new thread. :problem:
I am still unfamiliar with the rules and regulations, give some time and some support, so that I can learn the ways here, my intention is right and if my behavior hurts someone, I apologize for that.

vikasgandhi
Posts: 31
Joined: 03 Jul 2021, 20:28

Re: %ComSpec% is not working on AnyDesk/TeamViewer

Post by vikasgandhi » 28 Mar 2023, 11:37

vikasgandhi wrote:
28 Mar 2023, 11:35
gregster wrote:
28 Mar 2023, 10:30
@vikasgandhi: Your posting behaviour seems a bit odd. I now have deleted the duplicate topic (which was in the wrong forum, btw), since you decided to continue here anyway, although boiler allowed the new thread. :problem:
I am still unfamiliar with the rules and regulations, give some time and some support, so that I can learn the ways here, my intention is right and if my behavior hurts someone, I apologize for that.
And I also have to take support of translation to understand English language, due to which communication gap can also come between us, I hope you will be able to understand me.

off
Posts: 176
Joined: 18 Nov 2022, 21:54

Re: %ComSpec% is not working on AnyDesk/TeamViewer

Post by off » 28 Mar 2023, 18:23

First of all, what the other who helped you trying to say you need to test each key if its working or not. By using msgbox in each hotkeys

Code: Select all

#i::
MsgBox, pressed Win + i
Run, https://www.google.com/
return

!i::
MsgBox, pressed Alt + i
Run, c:/windows/system32/notepad.exe
return

^t::
MsgBox, pressed Ctrl + t
Run, *runas %ComSpec%
return
My Creations
IMG2HotString - Send image file easily with your hotstring!
CtrlSend - A small solution for sending keys to window in background that doesn't accept ControlSend's key
ControlProcess

vikasgandhi
Posts: 31
Joined: 03 Jul 2021, 20:28

Re: %ComSpec% is not working on AnyDesk/TeamViewer

Post by vikasgandhi » 28 Mar 2023, 20:59

Thanks for reply
Last edited by vikasgandhi on 28 Mar 2023, 21:03, edited 1 time in total.

vikasgandhi
Posts: 31
Joined: 03 Jul 2021, 20:28

Re: %ComSpec% is not working on AnyDesk/TeamViewer

Post by vikasgandhi » 28 Mar 2023, 21:03

off wrote:
28 Mar 2023, 18:23
First of all, what the other who helped you trying to say you need to test each key if its working or not. By using msgbox in each hotkeys

Code: Select all

#i::
MsgBox, pressed Win + i
Run, https://www.google.com/
return

!i::
MsgBox, pressed Alt + i
Run, c:/windows/system32/notepad.exe
return

^t::
MsgBox, pressed Ctrl + t
Run, *runas %ComSpec%
return


Thanks for help,
Findings are mentioned below :-


Position to open "message box" in all three scripts :-
1.) In our system = " YES "
2.) in Client system (accessed via AnyDesk/TeamViewer) = " No "

Note:
1.) in client's system and in our system the script (Win+i) google page is running well, while message box is not visible on client system

2.) While Message box is visible on our system

Thanks & Regards
Vikas

vikasgandhi
Posts: 31
Joined: 03 Jul 2021, 20:28

Re: %ComSpec% is not working on AnyDesk/TeamViewer

Post by vikasgandhi » 29 Mar 2023, 23:45

Waiting for solution......

Post Reply

Return to “Ask for Help (v1)”