Question Locked

How to delay a run once command?

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a runonce command I've added to my sysprep INF that will register my workstations to my Zenworks zone. However I've noticed that many times the runonce command executes so quickly on the first boot that the registration fails. If possible I would like to delay the run once by at least 20 seconds to see if it helps. Does anyone know if this is possible?

The other option would be to have the run once command reference a batch script that runs the command after the delay. I don't know how to set that up though.

Any advice will be greatly appreciated. Thanks!!!!

2 replies

by robo_dev

http://msdn.microsoft.com/en-us/library/ms912172(WinEmbedded.10).aspx

File_Path_String can be a full local drive path or a UNC path and filename of the executable file to run. Batch files must be called using cmd.exe /c (for example: FilePath="%11%\cmd.exe" Attributes="/c \\RemotePath\batchfile.cmd").

Attributes_String is used to pass command-line arguments to the application.

Flags="0" indicates that the program should create the process and wait the number of seconds specified by the Timeout attribute for it to exit before continuing. Flags="1" indicates that the program should create the process and continue.

ErrorControl="0" indicates that the program should continue if an error is encountered; ErrorControl="1" indicates that the program should halt on an error.

Reboot="True " tells the program to complete the operation, reboot, and then continue. Reboot="False " tells the program to continue without rebooting.

Timeout_Integer specifies the time, in seconds, that a program is allowed to execute before being terminated. 0 indicates an infinite number of seconds. This value is ignored if Flags is set to 1.

This discussion is closed to new replies.