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

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

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

@echo off
shoutdown /l

exceuted above batch file shell mode.

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.