Link to home
Start Free TrialLog in
Avatar of ddantes
ddantesFlag for United States of America

asked on

Executing a script at Windows shutdown

Running Windows 7 Professional SP-1, 32-bit, I would like to execute a Windows batch file upon shutdown.  I edited the shutdown properties using Gpedit.msc, but I don't know whether I  added the script properly, or whether it is running.  I've attached a screen shot.

The code which I would like to run is: "C:\Program Files\TrueCrypt\TrueCrypt.exe" /force /q /d

Thank you.User generated image
ASKER CERTIFIED SOLUTION
Avatar of Tahir Qureshi
Tahir Qureshi
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of yo_bee
Most the time the Batch file contains all the exe and switches that you want to run and not pass parameters.

Can you post your batch file?

Also as the previous EE replied you may just need to put the exe path in the first field and the switches in the parameters field.
Avatar of ddantes

ASKER

Thank you.  The entire batch file is:  "C:\Program Files\TrueCrypt\TrueCrypt.exe" /force /q /d
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ddantes

ASKER

Thank you.  Is there a way I can tell whether the script is actually executed at shutdown?
What's the purpose of the batch?  The application my write a log
Avatar of ddantes

ASKER

The batch forces TrueCrypt volumes to dismount.  I can add code to have the script write to a text file when it executes.  Thanks to both Experts for your help!