Dear,

We are running kixtart script by a registry key. First we check for the script.
No script means no registry entry will be created.
Also we transform kix32.exe to the exact locaton in your windows
directory.
After each reboot the script will be run automatically, which make it
possible to run such script also on windows NT/W2K easily.

Our script part is

code:

$prgrm_name="c:\kixtart\your_script.kix" ; - value used for registry entry -


$ikey="HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run"
$default_key="kix-local"
$default_value="kix32.exe "+$prgrm_name
IF (Exist("c:\windows\kix32.exe") = 1)
$default_value="c:\windows\kix32.exe "+$prgrm_name
ENDIF
IF (Exist("c:\winnt\kix32.exe") = 1)
$default_value="c:\winnt\kix32.exe "+$prgrm_name
ENDIF
IF (Exist($prgrm_name) = 1)
IF (ExistKey($ikey) = 0)
IF (ReadValue($ikey, $default_key) <> $default_value)
IF (WriteValue($ikey, $default_key, $default_value, "REG_SZ") = 0)
ENDIF
$info=$info+" "+$default_key+"='"+$default_value+"'"
ENDIF
ENDIF
ENDIF



Explanation:
  • $prgrm_name = path of your script.
  • $default_key = name of the RUN key in your registry.
  • $default_value = command which should be run by a reboot.
Greetings.


btw: we didn't run it as service. it only gives you an idea "how to run
a script during a reboot".

[ 22 October 2001: Message edited by: MCA ]

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA