+ Post New Thread
Results 1 to 7 of 7
How do you do....it? Thread, Startup/Shutdown batch not working in Technical; This week, being our easter hols, we are busy upgrading computer suites and installing new machines. In one room we've ...
  1. #1

    tmcd35's Avatar
    Join Date
    Jul 2005
    Location
    Norfolk
    Posts
    5,620
    Thank Post
    845
    Thanked 883 Times in 731 Posts
    Blog Entries
    9
    Rep Power
    326

    Startup/Shutdown batch not working

    This week, being our easter hols, we are busy upgrading computer suites and installing new machines. In one room we've had a request to hide the computers behind the desks where the poor little darlings can't break them. This has the unfortunate side effect that they can't reach the on/off button.

    So, we decide to use iTALC and have the teacher turn the computers on/off as needed. Then we realise that this is a suite that can be used by anyone. If it was just the ICT teacher using the room iTALC would be fine. But we can't expect certain other teachers to be able to fined the on/off switch for the teachers machine let alone use iTALC to turn the pupils machines on/off. We've set iTALC to automatically launch when anyone logs into the teachers machine, still even with on/off buttons clearly marked on the screen some teachers would have problems.

    So, I decide to write startup/shutdown scripts to automatically turn the computers on/off in that suite when the teachers computer is turned on/off.

    Now the problem...

    The batch files run 100% fine. If I call up a command prompt on the teachers machine, cd to the dir containing the bat's and run them, they work.

    I added the scripts to the local machines GPO under computer conf/windows settings/scripts . When I turn off/turn on the teachers machine, nothing happens. The rest of the suite stays turned/off/which ever state they were in prior to cycling the teachers machine.

    I added a 5sec pause to the start and end of both batch files. When you turn the teachers computer on/off you can see the scripts running. See the 10 sec pause. But the pupils machines in the suite do not respond to the start up/shutdown commands.

    Go back to the command line on the teachers machine and manually run the exact same scripts, and it all works as it should!

    Whats wrong? Anyone had similar problems before? Can anyone give me a pointer or two to get this working? Or perhaps another way of automatically turning the computers on and off as needed.

    Thanks

    Terry.

  2. #2

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    A shutdown script runs in the context of the local machine, not an administrator which I think it needs to be to remote shutdown (take it you're using shutdown /s ?) I think shutdown scripts run as their domain account IIRC.

  3. #3

    tmcd35's Avatar
    Join Date
    Jul 2005
    Location
    Norfolk
    Posts
    5,620
    Thank Post
    845
    Thanked 883 Times in 731 Posts
    Blog Entries
    9
    Rep Power
    326
    Mmm, Interesting. I'm using a third party WOL program to start the machines. I guess that also need to run as Admin to work?

    Yep using 'shutdown /s' to kill the machines.

    Am toying with the idea of using BIOS to turn the machines on first thing in the morning and leaving shutdown to our regular end of day shutdown script. Forcing us/teachers to use iTALC if a computer(s) needs turning off/on during the school day.

    Still, I'd prefer to get this working. Is there a way of getting these scripts to run as administrator. Perhaps another place/way to automatically run them?

    What about 'Scheduled Tasks'? I noticed an option there for running a task as the computer turns on. What about as the computer turns off?

  4. #4

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Well WOL will only depend on whether the user in question has permission to create the special packets (which I think on Windows most people do). The destination machine doesn't care.

    As far as shutdowns, why not have your script shut down all the room machines, wait a few seconds to let it finish, and then shut itself down with shutdown /s? Bung it on the desktop and the pinned area of the start menu, so it cant be missed, and then remove the normal shut down command with group policy.

    Of course, I'm on a vanilla network, so I don't know if you'll have that kind of control, but even with Ranger/CC you should be able to get close.

  5. #5
    stratisphere's Avatar
    Join Date
    Apr 2007
    Posts
    295
    Thank Post
    33
    Thanked 87 Times in 31 Posts
    Rep Power
    30
    The other considuration is, is the batch files local to the teachers machine?

    If it's on a mapped path, i've found sometimes drives will get unmapped (or wont have got mapped yet) on login and logout events.

    If you provide me details of what your batch script does (a copy of prehaps?) I can write a quick windows service which will WOL them all on start (hence on machine start) and then shutdown /s on stop (local machine shutdown).

  6. #6
    Heebeejeebee's Avatar
    Join Date
    Nov 2006
    Location
    Intergalactic Cruise
    Posts
    1,050
    Thank Post
    68
    Thanked 75 Times in 59 Posts
    Rep Power
    34
    Wouldn't it be a bit iffy to have all the machine shutdown when the teacher's PC closes? What if they decide to to reboot it during a lesson?

    HBJB

  7. #7
    tomscaper's Avatar
    Join Date
    Jul 2006
    Posts
    814
    Thank Post
    118
    Thanked 29 Times in 15 Posts
    Rep Power
    22
    we use lanview to shut the machines down at the end of the day. I usually run it manually one the student machines, but it does also shut them down incase anyone turns them back on.

SHARE:
+ Post New Thread

Similar Threads

  1. Batch shut down
    By steve_nfi in forum Wireless Networks
    Replies: 8
    Last Post: 11th March 2008, 09:18 AM
  2. Windows Startup & Shutdown sounds
    By sLiDeR in forum Windows
    Replies: 3
    Last Post: 10th November 2007, 09:38 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. batch file to shutdown PCs
    By macca in forum Windows
    Replies: 5
    Last Post: 3rd May 2007, 09:20 AM
  5. batch file help
    By beeswax in forum Scripts
    Replies: 9
    Last Post: 3rd March 2006, 07:48 PM

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
  •