-1
votes
2answers
122 views

Run a Script before shutdown or reboot windows 7

I need a registry entry to a run once script at shutdown or reboot. I needs cleanup sensitive data after an installation. So even if the installation failed or got interrupted, i may not leave data ...
0
votes
1answer
74 views

Run a script only at shutdown (not log off or restart) on Mac OS X

Is there any way to run a script only at shutdown? I mean, only when the computer is really shutting down to off state. This script should not run when doing just a log off or restart.
0
votes
0answers
112 views

win7 Shutdown script does not wait for vmware to shutdown

I want to shut down a virtual machine guest operating system before windows 7 host is shut down when pressing the shutdown button. I've tried the solution suggested here ...
5
votes
3answers
4k views

Windows 7 - How to run a script at shutdown but not at logoff

I was wondering if anyone knows how to configure a Windows 7 x64 Enterprise install that is on a domain to run a script if the user attempts to shutdown the computer - but I dont want the script to ...
1
vote
1answer
1k views

Run script at shutdown/reboot with systemd

I would like to run a script file when the system is called for shutdown/ reboot from 'reboot' and 'shutdown' commands. And if possible, also hard shutdowns like 'init 0' or 'poweroff'. How would I go ...
2
votes
1answer
260 views

Run script when shutting down Ubuntu before the logged in user is logged out

I'm writing a script to backup some local directories on a Unix machine (Ubuntu) to a Samba drive. The script works fine and I've got it running at shutdown and restart using the method described at ...
2
votes
1answer
727 views

Why does my powershell startup/shutdown script execute from “C:\” but not from “C:\Program Files”

I have created a powershell script I would like run at shutdown, and when I add it using gpedit.msc it executes exactly the way I would like. However, I want to move it from C:\xyz.ps1 to C:\Program ...
3
votes
2answers
1k views

Clear the TEMP folder on shutdown

I am following some instructions in More Ways To Speed Up Windows XP to help speed up my computer. One of those was to delete the temp folder on shutdown. Yet after I shutdown and then boot up, the ...
4
votes
4answers
6k views

How to run a script at shutdown with Snow Leopard?

I want to run a script when I shutdown or restart my iMac, running Snow Leopard. I read somewhere that one could use the /etc/rc.shutdown.local for this, but it is not working for me. For example, I ...
2
votes
4answers
585 views

How to change this OSX script

I made a script to automatically shut down my computer. The problem is that it always asks the password. How should this be changed? do shell script "shutdown -h now" with administrator privileges ...
0
votes
1answer
644 views

how to run a script on shutdown after all the user process have been stopped?

I have setup a auto scaled load balanced application on Amazon EC2. I want to collect the logs from the auto scaled instances before automatic termination of the instances. I have a script which ...
0
votes
3answers
1k views

shutdown.exe timer

I'm trying to run shutdown.exe -l -t 10 only showed shutdown help manual. I thought of inelegant but working solution of ping -n 10 localhost shutdown.exe -l How wasteful is this solution? ...
0
votes
1answer
2k views

What's the best way to convert this complex “takeown” command into a shutdown script?

I found this command here. The command is structured as a registry modification that will add a "Take Ownership" entry in the standard Windows Explorer file/directory context menu. I can see where ...