N
ngeluis
Hello every one..
Im having problems to send a command to Windows - Run...
I want to send a command to Windows - Run to the people only have to
press the Enter Key...
The text that i want to send to Windows - Run is like this -> B:
\setup.exe +uAEKLX +pc:\TEAMSTM
I can do it but if i use my .net code and Vbs... but i wanted to use
only .net
Sorry for my english and my poor explanation... im 3 days looking for
solution and till today nothing found...
Thanks in advance...
Here it is the code...
Const VK_STARTKEY = &H5B
Const VK_M = 77
Const KEYEVENTF_KEYUP = &H2
Const VK_R = Asc("r") '&H52
Const VK_LWin = &H5B
Const VK_CTRL = 17
Const VK_ESQ = 27
keybd_event(VK_STARTKEY, 0, 0, 0)
keybd_event(VK_M, 0, 0, 0)
keybd_event(VK_M, 0, KEYEVENTF_KEYUP, 0)
keybd_event(VK_STARTKEY, 0, KEYEVENTF_KEYUP, 0)
''<--- CTRL + ESQ ---->
keybd_event(VK_CTRL, 0, 0, 0)
keybd_event(VK_ESQ, 0, 0, 0)
keybd_event(VK_CTRL, 0, KEYEVENTF_KEYUP, 0)
keybd_event(VK_ESQ, 0, KEYEVENTF_KEYUP, 0)
keybd_event(VK_R, 0, 0, 0)
Im having problems to send a command to Windows - Run...
I want to send a command to Windows - Run to the people only have to
press the Enter Key...
The text that i want to send to Windows - Run is like this -> B:
\setup.exe +uAEKLX +pc:\TEAMSTM
I can do it but if i use my .net code and Vbs... but i wanted to use
only .net
Sorry for my english and my poor explanation... im 3 days looking for
solution and till today nothing found...
Thanks in advance...
Here it is the code...
Const VK_STARTKEY = &H5B
Const VK_M = 77
Const KEYEVENTF_KEYUP = &H2
Const VK_R = Asc("r") '&H52
Const VK_LWin = &H5B
Const VK_CTRL = 17
Const VK_ESQ = 27
keybd_event(VK_STARTKEY, 0, 0, 0)
keybd_event(VK_M, 0, 0, 0)
keybd_event(VK_M, 0, KEYEVENTF_KEYUP, 0)
keybd_event(VK_STARTKEY, 0, KEYEVENTF_KEYUP, 0)
''<--- CTRL + ESQ ---->
keybd_event(VK_CTRL, 0, 0, 0)
keybd_event(VK_ESQ, 0, 0, 0)
keybd_event(VK_CTRL, 0, KEYEVENTF_KEYUP, 0)
keybd_event(VK_ESQ, 0, KEYEVENTF_KEYUP, 0)
keybd_event(VK_R, 0, 0, 0)