ladiko Posted June 21, 2012 Posted June 21, 2012 (edited) Hello,i have a problem with the execution of the commands in the file cmdlines.txt and would be pleased if you could help me. I would like to add some regkeys by the cmdlines.txt method at T-12 as only then registry keys added to HKCU will be added to the default user profile and later are valid for all users.So what i do:Extract de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985.iso to C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\ with 7zip 9.27Copy $OEM$ to C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$Copy winnt.sif to C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\I386\winnt.sifDelete C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\[BOOT]Delete C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\DOCSDelete C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\DOTNETFXDelete C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\SUPPORTDelete C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\VALUEADDAt the end C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\ is about 860 MBInsert 2GB USB pen driveStart C:\WinSetup-1-0-beta8\WinSetupFromUSB_1-0-beta8.exe with admin rightsSelect Auto-Format it with FBinst: (*) NTFS [x] alignAdd to Disk: Windows 2000/XP/2003 Setup: C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\Go! -> pen drive format warning: OK -> Accept Microsoft EULABut at the end the cmdlines.txt is not executed. So here is how my WINNT.SIF and $OEM$ files look like:C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\I386\ ... all the windows files and WINNT.SIFC:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$\cmdlines.txtC:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$\regkeys.regC:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$\$$\Resources\Themes ... the Zune theme files named in WINNT.SIFC:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$\$1\_DRIVERS\ ... all the driver filesC:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$\$1\_INSTALL\GuiRunOnce.cmdC:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$\$1\_INSTALL\SetupParams.cmdC:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$\$1\_INSTALL\ ... some more files to be executedcmdlines.txt:[COMMANDS]"CMD.EXE /C echo TEST > C:\TEST1.TXT""REGEDT32.EXE /S regkeys.reg""CMD.EXE /C echo TEST > C:\TEST2.TXT"The TEST-files don't exist after the installation!regkeys.reg:Windows Registry Editor Version 5.00; Enable Basic Authentification f.e. for WebDAV[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters]"UseBasicAuth"=dword:00000001; Changes default Search Options[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]"SearchSystemDirs"=dword:00000001"SearchHidden"=dword:00000001"IncludeSubFolders"=dword:00000001"CaseSensitive"=dword:00000000"SearchSlowFiles"=dword:00000000; Turns On Classic Search[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState]"FullPath"=dword:00000001"FullPathAddress"=dword:00000001"Use Search Asst"="Yes""Settings"=hex:0c,00,02,00,1b,01,e7,77,60,00,00,00...the keys are added to the registry without problems if i double click the file later, but unfortunately only to the currently logged in user.SetupParams.cmd and GuiRunOnce.cmd are executed without a problem.So on the USB pen drive it looks like that:X:\WINSETUP\XPpSP3\I386X:\WINSETUP\XPpSP3\$OEM$\cmdlines.txtX:\WINSETUP\XPpSP3\$OEM$\regkeys.regX:\WINSETUP\XPpSP3\$OEM$\$1\_DRIVERS\ ... all the driver filesX:\WINSETUP\XPpSP3\$OEM$\$1\_INSTALL\GuiRunOnce.cmdX:\WINSETUP\XPpSP3\$OEM$\$1\_INSTALL\SetupParams.cmdX:\WINSETUP\XPpSP3\$OEM$\$1\_INSTALL\ ... some more files to be executedWINNT.SIF:;SetupMgrTag[Data] MsDosInitiated="0" UnattendedInstall=Yes Floppyless=1 AutomaticUpdates=Yes AutoPartition="0"[Unattended] OemPreinstall=Yes OemSkipEula=Yes WaitForReboot=No TargetPath=\WINDOWS DriverSigningPolicy=Ignore OemPnPDriversPath="_DRIVERS\ACPI_ATK0110;_DRIVERS\Atheros_LAN;_DRIVERS\ATI_Display;_DRIVERS\ATI_HDMI_Audio;_DRIVERS\ATI_SMBus;_DRIVERS\DLink_DWL-G122_revC1;_DRIVERS\Intel_Chipset;_DRIVERS\Intel_Grafik;_DRIVERS\Intel_HDMI_Audio;_DRIVERS\Intel_SATA;_DRIVERS\MitsubishiCP9550DW;_DRIVERS\MSI-US300EX;_DRIVERS\Nvidia_Away;_DRIVERS\Nvidia_Display;_DRIVERS\Nvidia_HDAudio;_DRIVERS\Nvidia_LAN;_DRIVERS\Nvidia_SATA;_DRIVERS\Nvidia_SMBUS;_DRIVERS\Nvidia_SMU;_DRIVERS\Realtek_AC97;_DRIVERS\Realtek_HD_Audio;_DRIVERS\Realtek_LAN_PCI;_DRIVERS\Realtek_LAN_PCI-E;_DRIVERS\SIS_Grafik;_DRIVERS\TP-Link_TL-WN721N;_DRIVERS\VIA_HD_Audio" UnattendMode=FullUnattended UnattendSwitch="Yes"[UserData] ProductKey=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX FullName="Home User" OrgName="Home" ComputerName=HomeComputer[SetupParams] UserExecute="%SystemDrive%\_INSTALL\SetupParams.cmd"[GuiUnattended] AdminPassword="XXXXXXXX" EncryptedAdminPassword=No AutoLogon=Yes AutoLogonCount=1 OEMSkipRegional=1 TimeZone=110 OemSkipWelcome=1[Shell] CustomDefaultThemeFile = "%WinDir%\Resources\Themes\Zune.theme"[Display] BitsPerPel=32 Xresolution=1024 YResolution=768 Vrefresh=60[TapiLocation] CountryCode=49 Dialing=Tone AreaCode=030 LongDistanceAccess="0"[RegionalSettings] LanguageGroup=1 Language=00000407 SystemLocale=00000407 UserLocale=00000407 InputLocale=0407:00000407[GuiRunOnce] Command0="%SystemDrive%\_INSTALL\GuiRunOnce.cmd"[Identification] JoinWorkgroup=ARBEITSGRUPPE[Networking] InstallDefaultComponents=Yes[Components] msmsgs=off msnexplr=off zonegames=off[WindowsFirewall] Profiles=WindowsFirewall.Standard[WindowsFirewall.Standard] Mode=1 Exceptions=1 Notifications=1[IEPopupBlocker] BlockPopups=Yes ShowInformationBar=Yes Edited June 21, 2012 by ladiko
ilko_t Posted June 21, 2012 Posted June 21, 2012 Just tested same scenario with reduced winnt.sif in VMWare Player as a regular USB boot and all worked fine, XP SP3 MSDN....G:\WINSETUP\XPpSP3.ISOG:\WINSETUP\XPpSP3\$OEM$G:\WINSETUP\XPpSP3\AUTORUN.INFG:\WINSETUP\XPpSP3\DOCSG:\WINSETUP\XPpSP3\DOTNETFXG:\WINSETUP\XPpSP3\I386G:\WINSETUP\XPpSP3\README.HTMG:\WINSETUP\XPpSP3\SETUP.EXEG:\WINSETUP\XPpSP3\SETUPXP.HTMG:\WINSETUP\XPpSP3\SUPPORTG:\WINSETUP\XPpSP3\VALUEADDG:\WINSETUP\XPpSP3\WIN51G:\WINSETUP\XPpSP3\WIN51IPG:\WINSETUP\XPpSP3\WIN51IP.SP3G:\WINSETUP\XPpSP3\$OEM$\$1G:\WINSETUP\XPpSP3\$OEM$\cmdlines.txtG:\WINSETUP\XPpSP3\$OEM$\regkeys.regG:\WINSETUP\XPpSP3\$OEM$\$1\tagfile_in$1.txt...cmdlines.txt:[COMMANDS]"CMD.EXE /C echo TEST > C:\TEST1.TXT""CMD.EXE /C echo TEST > C:\TEST2.TXT""REGEDT32.EXE /S regkeys.reg"regkeys.reg:Windows Registry Editor Version 5.00; Enable Basic Authentification f.e. for WebDAV[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters]"Test"="Yes"tagfile_in$1.txt is non-empty one, or it gets deleted from source when copied.winnt.sif in i386:[data]msdosinitiated="0"AutoPartition="0"win9xupgrade="no"winntupgrade="no"EulaComplete="1" UnattendedInstall=Yes Floppyless=1 AutomaticUpdates=Yes[Unattended] OemPreinstall=Yes OemSkipEula=Yes WaitForReboot=No TargetPath=\WINDOWS DriverSigningPolicy=Ignore ;OemPnPDriversPath="_DRIVERS\ACPI_ATK0110;_DRIVERS\Atheros_LAN;_DRIVERS\ATI_Display;_DRIVERS\ATI_HDMI_Audio;_DRIVERS\ATI_SMBus;_DRIVERS\DLink_DWL-G122_revC1;_DRIVERS\Intel_Chipset;_DRIVERS\Intel_Grafik;_DRIVERS\Intel_HDMI_Audio;_DRIVERS\Intel_SATA;_DRIVERS\MitsubishiCP9550DW;_DRIVERS\MSI-US300EX;_DRIVERS\Nvidia_Away;_DRIVERS\Nvidia_Display;_DRIVERS\Nvidia_HDAudio;_DRIVERS\Nvidia_LAN;_DRIVERS\Nvidia_SATA;_DRIVERS\Nvidia_SMBUS;_DRIVERS\Nvidia_SMU;_DRIVERS\Realtek_AC97;_DRIVERS\Realtek_HD_Audio;_DRIVERS\Realtek_LAN_PCI;_DRIVERS\Realtek_LAN_PCI-E;_DRIVERS\SIS_Grafik;_DRIVERS\TP-Link_TL-WN721N;_DRIVERS\VIA_HD_Audio" UnattendMode=FullUnattended UnattendSwitch="Yes"[UserData]ProductKey = "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx" FullName="Home User" OrgName="Home" ComputerName=HomeComputer[GuiUnattended] AdminPassword="1234" EncryptedAdminPassword=No AutoLogon=Yes I'd start with winnt.sif, compare differences and check if and where it gets broken. Next check setup log files in Windows directory for clues.
ladiko Posted June 21, 2012 Author Posted June 21, 2012 (edited) does windows setup always create the file setupact.log? Edited June 21, 2012 by ladiko
ilko_t Posted June 21, 2012 Posted June 21, 2012 There are several log files for the different parts of setup process.https://www.google.com/search?source=ig&hl=en&rlz=1G1GGLQ_ENXX251&q=windows+xp+setup+log+files&oq=windows+xp+setup+log+files&aq=f&aqi=g1g-b1g-bK1g-q1&aql=&gs_l=igoogle.3..0j0i8j0i8i30j0i22.546436.551738.0.551987.26.25.0.1.1.0.248.3454.8j11j6.25.0...0.0.fwI9ksX6WTUhttp://www.windowsitpro.com/article/installation2/what-log-files-does-windows-xp-create-during-installation-
ladiko Posted June 21, 2012 Author Posted June 21, 2012 thank you for your help, i will look into the log files tomorrow and test it with a shorter winnt.sif and will give response. i appreciate your details information and fast reply!by the way, i tried it with qemu, virtualpc and virtualbox, but as most normal computers list the hdd first and the usb pen drive second, i didnt found a way to boot from the second drive with all the virtualization solutions and when i set the pen drive as the first drive to boot, windows xp setup also listed it first and nuked the pen drives boot sector by writing it's own. what about vmware player?
ilko_t Posted June 21, 2012 Posted June 21, 2012 what about vmware player? The posted method works and is tested working. Just follow the instructions.The one in QEMU, which is included with WinSetupFromUSB and presents the USB disk as a IDE one is also working, but the included HD image file test.img, which is the second hard disk, is a small one, only for a quick test. You can safely replace it with as big as you need your hard disk size to be.fsutil file createnew test.img filesize_in_bytesGood idea is to make filesize_in_bytes multiple of 512 or easier to calculate of 1024 to avoid warning messages from grub4dos for example.QEMU directory with test.img file used is in WinSetup_program_directory\files\tools\RMPrepUSB\QEMU. Then you can use StartFromUSB_WinSetup.bat in the same directory, or the QEMU option in the program to launch QEMU.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now