Solved

VBscript to log off local machine

Posted on 2008-06-19
3
4,504 Views
Last Modified: 2010-04-21
Looking for a simple VBscript that can be launched from any local WinXP workstation that will log off the user that is logged on.  I don't want to have to specify the machine name; just log off the session.

Thanks!
0
Comment
Question by:azstbzimms
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Expert Comment

by:Andre412
ID: 21827431
0
 
LVL 24

Accepted Solution

by:
purplepomegranite earned 400 total points
ID: 21827454
The attached should do it.
Set objOS = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem")
 
for each objSys in objOS
	objSys.Win32Shutdown 0
next

Open in new window

0
 

Author Closing Comment

by:azstbzimms
ID: 31469015
Perfect...Thanks!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question