how to log off computer windows 8.1 or windows 10 (64 bit) in vb6 application.

i want to log off computer after each 2 hours of processing how can i log off in windows 8.1 or windows 10 ( 64 bit)  node.
i have try  Shell "shutdown -l -t 00" but it is not working,

Thanks in advance.
Nitin ShahAsked:
Who is Participating?
 
Pawan KumarConnect With a Mentor Database ExpertCommented:
Use a batch file. --> after @echo off..
add->shutdown -s -t 7200

or
are you open for a third party tool..
0
 
Pawan KumarDatabase ExpertCommented:
Another option could be from the Power options from the control panel.
0
 
arnoldConnect With a Mentor Commented:
try shutdown /l /f /t 5

/f to force the logoff without that option, running items will ...
0
 
Nitin ShahAuthor Commented:
Thanks for Kind Help
I have made batch file as follows

@echo off
c:
cd\windows\system32
shoutdown /l

exceuted above batch file shell mode.

Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.