Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

WinSetupFromUSB 1.0beta8: cmdlines.txt is not executed


  • Please log in to reply
5 replies to this topic

#1
ladiko

ladiko

    Newbie

  • Member
  • 16 posts
  • Joined 10-October 05
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.27
Copy $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.sif
Delete 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\DOCS
Delete C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\DOTNETFX
Delete C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\SUPPORT
Delete C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\VALUEADD
At the end C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\ is about 860 MB

Insert 2GB USB pen drive
Start C:\WinSetup-1-0-beta8\WinSetupFromUSB_1-0-beta8.exe with admin rights
Select Auto-Format it with FBinst: (*) NTFS [x] align
Add 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 EULA

But 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.SIF
C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$\cmdlines.txt
C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$\regkeys.reg
C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$\$$\Resources\Themes ... the Zune theme files named in WINNT.SIF
C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$\$1\_DRIVERS\ ... all the driver files
C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$\$1\_INSTALL\GuiRunOnce.cmd
C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$\$1\_INSTALL\SetupParams.cmd
C:\de_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73985\$OEM$\$1\_INSTALL\ ... some more files to be executed

cmdlines.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\I386
X:\WINSETUP\XPpSP3\$OEM$\cmdlines.txt
X:\WINSETUP\XPpSP3\$OEM$\regkeys.reg
X:\WINSETUP\XPpSP3\$OEM$\$1\_DRIVERS\ ... all the driver files
X:\WINSETUP\XPpSP3\$OEM$\$1\_INSTALL\GuiRunOnce.cmd
X:\WINSETUP\XPpSP3\$OEM$\$1\_INSTALL\SetupParams.cmd
X:\WINSETUP\XPpSP3\$OEM$\$1\_INSTALL\ ... some more files to be executed

WINNT.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 by ladiko, 21 June 2012 - 01:39 AM.



How to remove advertisement from MSFN

#2
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,715 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag
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.ISO
G:\WINSETUP\XPpSP3\$OEM$
G:\WINSETUP\XPpSP3\AUTORUN.INF
G:\WINSETUP\XPpSP3\DOCS
G:\WINSETUP\XPpSP3\DOTNETFX
G:\WINSETUP\XPpSP3\I386
G:\WINSETUP\XPpSP3\README.HTM
G:\WINSETUP\XPpSP3\SETUP.EXE
G:\WINSETUP\XPpSP3\SETUPXP.HTM
G:\WINSETUP\XPpSP3\SUPPORT
G:\WINSETUP\XPpSP3\VALUEADD
G:\WINSETUP\XPpSP3\WIN51
G:\WINSETUP\XPpSP3\WIN51IP
G:\WINSETUP\XPpSP3\WIN51IP.SP3
G:\WINSETUP\XPpSP3\$OEM$\$1
G:\WINSETUP\XPpSP3\$OEM$\cmdlines.txt
G:\WINSETUP\XPpSP3\$OEM$\regkeys.reg
G:\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

Posted Image Posted Image

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.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#3
ladiko

ladiko

    Newbie

  • Member
  • 16 posts
  • Joined 10-October 05
does windows setup always create the file setupact.log?

Edited by ladiko, 21 June 2012 - 10:04 AM.


#4
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,715 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag
There are several log files for the different parts of setup process.
https://www.google.c...0.0.fwI9ksX6WTU
http://www.windowsit...g-installation-

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#5
ladiko

ladiko

    Newbie

  • Member
  • 16 posts
  • Joined 10-October 05
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?

#6
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,715 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag

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_bytes
Good 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.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users