For Windows 9x:
code:
$rc=writevalue('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce','AppName','AppToRun','REG_SZ')

_________________________
There are two types of vessels, submarines and targets.