Using Custom Setup Scripts
Using Custom Setup Scripts
You can add custom scripts to run before or after Setup runs.
To run a script before Setup, add a PreSetup.cmd file to the same folder as SetupLauncher.exe.
To run a post-Setup script, add a PostSetup.cmd file to the same folder as Setuplauncher.exe.
The following commands are supported for pre- and post-Setup scripts:
- Regedit.exe
Note: /e command line switch is not supported for
- Reg.exe
- Factory.exe (-winpe option only)
- Diskpart.exe
- Notepad.exe
- Xcopy.exe
- Replace.exe
- Ping.exe
- Tracert.exe
- IPConfig.exe
SetupLauncher.exe launches Setup with the following steps:
- Looks for Presetup.cmd and runs if it exists in the same folder as setuplauncher.exe.
- Looks for Unattended.xml (first using the command line switch, or if the switch is absent, then looks in the same folder as setuplauncher.exe) and uses it if found.
- Looks for DriverInstall.xml (first using the command line switch, or if the switch is absent, then looks in the same folder as setuplauncher.exe) and uses it if found.
- Launches Setup.exe.
- Once Setup.exe has terminated, looks for PostSetup.cmd in the same folder as setuplauncher.exe.