- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thrakorzog,
The pre and post install scripts are onmy todo list for a next version (The fomatting is a bit weird so it is not entirely clear that these features are under the TODO chapter...)
But the easiest way to do an after-install script under windows is to run it fromthe startup directory after the first reboot of the system.
I'll show you the steps that I was planning to automate for this, but be aware, I haven't tested it...
1. in the template (.sif) file:
\[GuiUnattended]
AdminPassword=YourPasswordHere
AutoLogon=Yes
AutoLogonCount=1
EncryptedAdminPassword=No
2. in the template file:
\[GuiRunOnce]
triggerafterinstall.vbs
3. create an triggerafterinstall.vbs
set WshShell = WScript.CreateObject("WScript.Shell")
strStartup = WshShell.SpecialFolders("Startup")
set oLnk = WshShell.CreateShortcut(strStartup & "\afterinstall.lnk")
oLnk.Description = "AfterInstallScript"
oLnk.TargetPath = "afterinstall.vbs"
oLnk.WindowStyle = 1
oLnk.Save
4. in the /etc/tftpd.map file
rgi /WINXP/\$\$/triggerafterinstall.vbs /WINXP_EXTRA/triggerafterinstall.vbs
rgi /WINXP/\$\$/afterinstall.vbs /WINXP_EXTRA/afterinstall.vbs
As said I haven't tested it, but it might work, you may want to add some stuff in the GuiRunOnce section in the sif file yourself, that's where the trigger is, but be aware that the system hasn't been booted yet then, so you may not have the proper network settings just yet. Maybe something like this in that key may work better:
copy
10.0.0.104\REMINST %WINDIR%
Lot of ideas, but no time to implement... ![]()