Scripts Thread, Shutdown script that ignores logged on users....comments? in Coding and Web Development; I have found and adapted a script....
Wondered if those with more scripting knowledge than me can cast their eye ...
-
22nd March 2007, 05:46 PM #1 Shutdown script that ignores logged on users....comments?
I have found and adapted a script....
Wondered if those with more scripting knowledge than me can cast their eye over it and see if there is any reason why this should nt work....
@echo off
setlocal
for /f "Tokens=1" %%c in ('net view^|Find "\\"') do (
for /f "Tokens=1,2*" %%i in ('psloggedon -L %%c^|find "/"') do (
if /i "%%c" EQ "\\%ComputerName%" PsShutdown -s -c -t 60 -f %%c
)
)
endlocal
Thanks.
-
-
IDG Tech News
-
22nd March 2007, 06:13 PM #2 Re: Shutdown script that ignores logged on users....comments?
Please do not cross post. I have deleted your other post.
-
-
23rd March 2007, 10:24 AM #3 Re: Shutdown script that ignores logged on users....comments
Sorry posted then spotted this scripting forum.....very confusing with so many forums....
-
-
23rd March 2007, 10:36 AM #4 Re: Shutdown script that ignores logged on users....comments?
No problem
-
SHARE:
Similar Threads
-
By sLiDeR in forum Windows
Replies: 6
Last Post: 4th December 2007, 01:40 PM
-
By wesleyw in forum Virtual Learning Platforms
Replies: 18
Last Post: 21st September 2007, 02:34 PM
-
By PrimaryTech in forum Scripts
Replies: 8
Last Post: 7th July 2007, 06:04 PM
-
By ajbritton in forum Comments and Suggestions
Replies: 7
Last Post: 12th April 2006, 08:48 AM
-
By eejit in forum Windows
Replies: 18
Last Post: 14th October 2005, 09:28 AM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules