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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pawan KumarDatabase ExpertCommented:
Use a batch file. --> after @echo off..
add->shutdown -s -t 7200

or
are you open for a third party tool..
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Pawan KumarDatabase ExpertCommented:
Another option could be from the Power options from the control panel.
0
arnoldCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.