From: boatman312 on 1 Mar 2010 06:59 On 03/01/10 5:47 AM, Roger Smith III wrote: > I know that you can write DOS batch files, and place them in the startup > folder. When the user logs in, the batch file executes. > > Is there a way to have a batch file execute when a user logs off? We need > to find a way to copy some files up to a server, when a user logs off for the > day. > > Thanks > Rog > The trick is to write a batch file that includes the backup process first, then logs the user off. http://www.microsoft.com/windowsxp/using/helpandsupport/learnmore/ballew_commandline.mspx Shut Down the System Although shutting down the computer from the Start menu is faster and easier, the shutdown command can also be issued at a command prompt to shut down the computer. The shutdown command also offers parameters to log off a user, restart the computer, and abort a system shutdown. If you ever have to boot to the command-line to troubleshoot a problem, you'll want to know how this command works. To shut down the computer and experiment with other options: 1. Close all open programs to avoid loss of data. 2. Open Command Prompt from the shortcut created in the previous section or by clicking Start, pointing to All Programs, pointing to Accessories, and clicking Command Prompt. 3. At the command prompt, type shutdown -s. Press Enter or Return on the keyboard. A shutdown dialog box opens. 4. To abort the shutdown in progress, at the command prompt, type shutdown -a. Other options include -r to restart the system, -m \\computername to shut down a remote computer, and -l to log off of the computer. To see all the options, type shutdown /? at the command prompt.
|
Pages: 1 Prev: Is there a way to run a batch file just as a user is logging off? Next: XP Pro Login Issue |