VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Shut down or restart the computer with a single line of code. No declarations required.

by Jatinder Pal Singh (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 19th October 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Shut down or restart the computer with a single line of code. No declarations required.

Rate Shut down or restart the computer with a single line of code. No declarations required.



To shutdown:- "c:\windows\rundll.exe user.exe,exitwindows"
To restart:- "c:\windows\rundll.exe user.exe,exitwindowsexec"

'If you want to use it in VB, type as:
shell "c:\windows\rundll.exe user.exe,exitwindows", vbHide
or 
shell "c:\windows\rundll.exe user.exe,exitwindowsexec", vbHide


Download this snippet    Add to My Saved Code

Shut down or restart the computer with a single line of code. No declarations required. Comments

No comments have been posted about Shut down or restart the computer with a single line of code. No declarations required.. Why not be the first to post a comment about Shut down or restart the computer with a single line of code. No declarations required..

Post your comment

Subject:
Message:
0/1000 characters