Shutdown help?

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
9 posts Page 1 of 1
Contributors
User avatar
CodenBoy
Top Poster
Top Poster
Posts: 103
Joined: Sun Jul 15, 2012 4:06 pm

Shutdown help?
CodenBoy
Hi Guys,

If i want to shutdown i use
Code: Select all
Shell("shutdown -s")
but i forgot the code to make it timed, like if i want it after 1 minute ( 60seconds )
Code: Select all
Shell("shutdown -s time:60")
' but it didnt work? any other codes? i dont know if this is right but ? any ideas?

Thanks
User avatar
codedrive
VIP - Donator
VIP - Donator
Posts: 28
Joined: Tue Jul 17, 2012 5:25 pm

Re: Shutdown help?
codedrive
Get a timer and set it on enabled and add this code and add 1 label and make it say the text 0
Code: Select all
Label1.text=label1.text + 1
If Label1.text="60" then
Shell("shutdown -s")
Image
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

Re: Shutdown help?
muttley1968
isn't it just -t 60
User avatar
CodenBoy
Top Poster
Top Poster
Posts: 103
Joined: Sun Jul 15, 2012 4:06 pm

Re: Shutdown help?
CodenBoy
#codedrive , i cant use ur code since i need it on many durations,
#muttley1968 im leaving home now when im back i will check,
#people u can post more codes if u wanna :D
User avatar
CodenBoy
Top Poster
Top Poster
Posts: 103
Joined: Sun Jul 15, 2012 4:06 pm

Re: Shutdown help?
CodenBoy
Thanks #muttley1968 worked great, but now instead of new topic shutdown -s for shutdown, -r for restart -l for logoff what is for the "sleep"?
thanks
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

Re: Shutdown help?
muttley1968
As far as I am aware there is not one for sleep
User avatar
CodenBoy
Top Poster
Top Poster
Posts: 103
Joined: Sun Jul 15, 2012 4:06 pm

Re: Shutdown help?
CodenBoy
Okay, thanks anyway maybe someone else knows it XD?
(Sleep time!)
User avatar
AnoPem
VIP - Donator
VIP - Donator
Posts: 441
Joined: Sat Jul 24, 2010 10:55 pm

Re: Shutdown help?
AnoPem
For sleep mode use this
Code: Select all
Shell("cmd /c rundll32.exe powrprof.dll,SetSuspendState 0,1,0")
https://t.me/pump_upp
User avatar
CodenBoy
Top Poster
Top Poster
Posts: 103
Joined: Sun Jul 15, 2012 4:06 pm

Re: Shutdown help?
CodenBoy
#AnoPem , thank you ,
9 posts Page 1 of 1
Return to “Coding Help & Support”