Start Programs at shutdown

  • Thread starter Thread starter DamonJ
  • Start date Start date
D

DamonJ

Hi All.

I have a "time card" program that we will be using to let
employees clock in and out from thier workstations.

I know how to get the program to start up when the
computer is turned on. But how do I get the program to
start when the user tries to shut the computer down?

I want the program to start when the user shuts down
because, as you can imagine, some will forget to clock
out if not prompted by the computer.

Thanks.
Damon
 
In XP Professional, you can automatically run scripts at Startup, Logon, Logoff, and at Shutdown. Logon scripts run when the local
user logs on locally to the computer, but do not run when the user logs on to the domain.

| I know how to get the program to start up when the computer is turned on.

Is this via a shortcut (to that program ) in the Startup folder of each user account?

--
Jan
----------


| Hi All.
|
| I have a "time card" program that we will be using to let
| employees clock in and out from thier workstations.
|
| I know how to get the program to start up when the
| computer is turned on. But how do I get the program to
| start when the user tries to shut the computer down?
|
| I want the program to start when the user shuts down
| because, as you can imagine, some will forget to clock
| out if not prompted by the computer.
|
| Thanks.
| Damon
 
Yes it is.
Do you have an example of a batch file that I can use?

Thanks.
-----Original Message-----
In XP Professional, you can automatically run scripts
at Startup, Logon, Logoff, and at Shutdown. Logon
scripts run when the local
user logs on locally to the computer, but do not run
when the user logs on to the domain.
| I know how to get the program to start up when the computer is turned on.

Is this via a shortcut (to that program ) in the
Startup folder of each user account?
 
I do not know your skill-level, so try this...

'[--- START of Time_card.VBS ---]

Option Explicit
On Error Resume Next
Dim WSHShell, msg, MyBox, j
Set WSHShell = WScript.CreateObject("WScript.Shell")


'Run your "time card" program
' just copy the "Target:" of the shortcut
' to your Time_card_Program.EXE
' to the .run line as follows...
' WshShell.Run ("C:\Path\to\your\Time_card_Program.exe /switches_if_any")

WshShell.Run ("<---copy-of-shortcut-Target:--->")


'<-- START of OPTIONAL Alert Box -->

'-- Output message for dialog box

msg = "1. Do something" & vbCR
msg = msg & "2. ---Do something else---" & vbCR

' Either delete previous line or copy line,
' and/or modify "---Do something else---"

j = "Time card Program"
MyBox = MsgBox (msg, 0, j)

'<-- END of OPTIONAL Alert Box -->


Set WshShell = Nothing

'[--- END of Time_card.VBS ---]


--
Jan
----------


| Yes it is.
| Do you have an example of a batch file that I can use?
|
| Thanks.
| >-----Original Message-----
| > In XP Professional, you can automatically run scripts
| at Startup, Logon, Logoff, and at Shutdown. Logon
| scripts run when the local
| >user logs on locally to the computer, but do not run
| when the user logs on to the domain.
|
| >| I know how to get the program to start up when the
| computer is turned on.
|
| > Is this via a shortcut (to that program ) in the
| Startup folder of each user account?
|
| >--
| >Jan
| >----------
| >
|
| >| Hi All.
|
| >| I have a "time card" program that we will be using to
| let
| >| employees clock in and out from thier workstations.
|
| >| I know how to get the program to start up when the
| >| computer is turned on. But how do I get the program to
| >| start when the user tries to shut the computer down?
|
| >| I want the program to start when the user shuts down
| >| because, as you can imagine, some will forget to clock
| >| out if not prompted by the computer.
|
| >| Thanks.
| >| Damon
 
Back
Top