Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Start Programs at shutdown

0 views
Skip to first unread message

DamonJ

unread,
Dec 29, 2003, 11:15:55 AM12/29/03
to
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

+-J

unread,
Dec 29, 2003, 7:10:40 PM12/29/03
to
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
----------

Damon J

unread,
Dec 30, 2003, 9:18:16 AM12/30/03
to
Yes it is.
Do you have an example of a batch file that I can use?

Thanks.

>.
>

+-J

unread,
Dec 30, 2003, 7:50:43 PM12/30/03
to
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
----------

0 new messages