+ Post New Thread
Results 1 to 4 of 4
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 ...
  1. #1
    kennysarmy's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    1,286
    Thank Post
    80
    Thanked 45 Times in 31 Posts
    Rep Power
    30

    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.

  2. #2
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,998
    Thank Post
    120
    Thanked 280 Times in 258 Posts
    Rep Power
    106

    Re: Shutdown script that ignores logged on users....comments?

    Please do not cross post. I have deleted your other post.

  3. #3
    kennysarmy's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    1,286
    Thank Post
    80
    Thanked 45 Times in 31 Posts
    Rep Power
    30

    Re: Shutdown script that ignores logged on users....comments

    Sorry posted then spotted this scripting forum.....very confusing with so many forums....

  4. #4
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,998
    Thank Post
    120
    Thanked 280 Times in 258 Posts
    Rep Power
    106

    Re: Shutdown script that ignores logged on users....comments?

    No problem

SHARE:
+ Post New Thread

Similar Threads

  1. List of users logged on a workstation
    By sLiDeR in forum Windows
    Replies: 6
    Last Post: 4th December 2007, 12:40 PM
  2. Moodle - Slow when more than a few users are logged in
    By wesleyw in forum Virtual Learning Platforms
    Replies: 18
    Last Post: 21st September 2007, 02:34 PM
  3. Shutdown batch script stalls if 1 PC is shut down
    By PrimaryTech in forum Scripts
    Replies: 8
    Last Post: 7th July 2007, 06:04 PM
  4. Change start page for logged on users
    By ajbritton in forum Comments and Suggestions
    Replies: 7
    Last Post: 12th April 2006, 08:48 AM
  5. 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
  •