Google Gruppi non supporta più i nuovi post o le nuove iscrizioni Usenet. I contenuti storici continuano a essere visibili.

Start Programs at shutdown

0 visualizzazioni
Passa al primo messaggio da leggere

DamonJ

da leggere,
29 dic 2003, 11:15:5529/12/03
a
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

da leggere,
29 dic 2003, 19:10:4029/12/03
a
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

da leggere,
30 dic 2003, 09:18:1630/12/03
a
Yes it is.
Do you have an example of a batch file that I can use?

Thanks.

>.
>

+-J

da leggere,
30 dic 2003, 19:50:4330/12/03
a
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 nuovi messaggi