How to Run a Program Only Once After Unattended Setup of Windows NTID: Q158447
|
The unattended setup mode of Windows NT 4.0 does not offer a way to run a
program once the setup is complete. Nevertheless, this functionality may
be very useful if you want to set up other components on your system after
the completion of the unattended setup (for example, running a batch file,
launching a hands-free service pack update, or starting the setup routine
of other products).
This article describes how to run a program once (after an unattended
setup has completed).
Automatically running any kind of program after an unattended setup has
completed is not normally possible. The following steps explain how to run
a program only once after an unattended setup has completed.
Windows NT must be installed with the AutoLogon option enabled so that the
system automatically logs itself onto the network immediately after setup
is complete, thus allowing a session to be automatically opened and a
specific program to be launched.
For additional information about enabling AutoLogon for initial logon
after running Windows NT 4.0 Setup, please see the following article in
the Microsoft Knowledge Base:
ARTICLE-ID: Q157361To set up Windows NT 4.0 and to run a program automatically after the setup has completed, use one of the following methods:
TITLE : How to Automatically Log On After an Unattended Setup
\Registry\Machine
Software
Microsoft
Windows
CurrentVersion
Run
RUNBATCH = REG_SZ "BATCH.CMD"
OEMPreinstall = Yes
DetachedProgram = "%SystemRoot%\System32\REGINI.EXE"
Arguments = "%SystemRoot%\System32\RUNONCE.INI"
ARTICLE-ID: Q155197
TITLE : Unattended Setup Parameters for Unattend.txt File
[Version]
signature="$CHICAGO$"
[DefaultInstall]
DelReg = Delete.Reg
[Delete.Reg]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","RUNBATCH"
%SystemRoot%\System32\rundll32.exe setupapi,InstallHinfSection
DefaultInstall 132 %SystemRoot%\System32\cleanup.inf
d1,REGINI.EXE
d1,RUNONCE.INI
d1,BATCH.CMD
d1,CLEANUP.INF
BATCH.CMD = 1,,,,,,,2,0,0
REGINI.EXE = 1,,,,,,,2,0,0
RUNONCE.INI = 1,,,,,,,2,0,0
CLEANUP.INF = 1,,,,,,,2,0,0
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
@="c:\\WinNT\\System32\\Calc.exe"
[commands]
".\regedit /s runonce.reg"
Additional query words: 4.00 prodnt deployment sysdiff unattended
Keywords : kbsetup ntsetup nthowto NTSrvWkst
Version : 4.0
Platform : winnt
Issue type : kbhowto
Last Reviewed: January 28, 1999