Problem with shutdown script.

G

Guest

Our company has pushed out a shutdown script via a GPO. Unfortunately, users
who are remote that use VPN cannot run this script at shutdown due to not
having a path to the NETLOGON share. While this isn't a real problem, the
fact that some of the machines are taking up to 6 minutes to shutdown is.
Workstations are sitting at "Running shutdown scripts" for up to 6 minutes as
the OS tries to locate the script.

Is there anyway to cut back on the amount of time the OS takes before it
finally times out trying to run the shutdown script?
 
P

Pegasus \(MVP\)

chief123 said:
Our company has pushed out a shutdown script via a GPO. Unfortunately, users
who are remote that use VPN cannot run this script at shutdown due to not
having a path to the NETLOGON share. While this isn't a real problem, the
fact that some of the machines are taking up to 6 minutes to shutdown is.
Workstations are sitting at "Running shutdown scripts" for up to 6 minutes as
the OS tries to locate the script.

Is there anyway to cut back on the amount of time the OS takes before it
finally times out trying to run the shutdown script?

Add some appropriate test command to your shutdown
script, e.g. something like this:

ping YourServer -n 1 | find /i "bytes=" > nul || goto :eof
 
G

Guest

That really won't do any good. I'm working with remotes that use VPN. The
workstations cannot run the script because the VPN client cannot stay active
during the shutdown process. Therefore, the OS cannot locate the server
housing the shutdown script. The workstations sit for an extended period
before the process times out and shutdown occurs. I'm trying to determine if
there is a way to reduce the default time the OS will try to run shutdown
scripts.

Thanks.
 
P

Pegasus \(MVP\)

I don't know of any such way but you can certainly use
my method with a little bit of imaginative coding:

- Create a bootup script with this single line:
if exist c:\Logs\VPN.txt del c:\Logs\VPN.txt
- Create a batch file c:\Logs\VPN.bat like so:
@echo off
if not exist c:\Logs md c:\Logs
echo %date% %time% > c:\Logs\VPN.txt
"c:\Logs\Office VPN.lnk"
- Create a shortcut of your VPN connection, then drag it into c:\Logs.
- Create a shortcut on the desktop to point to c:\Logs\VPN.bat
- Get your shutdown script to monitor the existence of the
semaphore file c:\Logs\VPN.txt

The operation is simple:
1. At boot time, the semaphore file gets deleted if it exists.
2. When the user launches a VPN session (by invoking c:\Logs\Office VPN.lnk,
of course), the semaphore file is created.
3. The shutdown script's behaviour is affected by the existence
of the semaphore file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top