Content Type
Profiles
Forums
Events
Posts posted by gosh
-
-
Here's my old apps.bat. What i do is call a silent.bat file for each program. That way silent.bat can silently install a program and do other things like register it. I call apps.bat to install software, i call reg.bat to import registry settings. Unlike most people i put everything into the windows folder.
@ECHO OFFECHO Please wait as applications are installed. This may take several minutes.
@echo.
ECHO Installing Nero
start /min /wait %windir%\Apps\NERO\silent.bat
ECHO Installing Norton Corporate Edition
start /min /wait %windir%\Apps\NAV8CORP\silent.bat
ECHO Installing Raxco Perfectdisk 2000
start /min /wait %windir%\Apps\RAXCO\silent.bat
ECHO Installing ISO Recorder
start /min /wait %windir%\Apps\ISO\silent.bat
ECHO Installing R-Studio.v2.0.121
start /min /wait %windir%\Apps\RStudio\silent.bat
ECHO Installing AOL Instant Messenger (AIM)
start /min /wait %windir%\Apps\AIM\silent.bat
ECHO Installing WinDVD
start /min /wait %windir%\Apps\WinDVD\silent.bat
ECHO Installing Winrar 3.10
start /min /wait %windir%\Apps\Winrar\silent.bat
ECHO Installing Hexworks 4.0
start /min /wait %windir%\Apps\Hexworks\silent.bat
ECHO Installing Windows Media Player (WMP) 9.0 Build 2980
start /min /wait %windir%\Apps\WMP9\silent.bat
ECHO Installing DirectX 9.0a
start /min /wait %windir%\Apps\DX9\silent.bat
ECHO Installing Windows XP Support tools
start /min /wait %windir%\Apps\SupTools\silent.bat
rem ECHO Installing Recovery console and making local source
rem start /min /wait %windir%\Source.bat
REM Disable search companion
regsvr32 /u /s %windir%\srchasst\srchui.dll
REM Change the kernel in boot.ini
bootcfg /RAW /A /Kernel=OEMKrnl.exe /ID 1
bootcfg /Timeout 0
REM
REM cleanup stuffs
REM
REM Removing AIM advertising
copy /Y %windir%\Apps\AIM\aim.odl %programfiles%\AIM95\aim.odl
rem resets homepage because of aim
%windir%\System32\rundll32.exe setupapi,InstallHinfSection RestoreHomePage 132 %windir%\inf\iereset.inf
rem deletes shortcuts left by aim
regedit.exe /s %windir%\Apps\AIM\delaim.reg
rem deletes shortcuts left by aim
del "%allusersprofile%\Desktop\*.lnk"
del "%allusersprofile%\Desktop\*.url"
del "%allusersprofile%\Start Menu\Free AOL & Unlimited Internet.url"
del "%userprofile%\Desktop\Free AOL & Unlimited Internet.url"
del "%allusersprofile%\Favorites\Free AOL & Unlimited Internet.url"
del "%userprofile%\Favorites\Free AOL & Unlimited Internet.url"
rd /s /q %windir%\Apps
rd /s /q %windir%\PWRTOYS
rd /s /q %windir%\REG
del %windir%\Source.reg
Del %windir%\Source.bat
Del %tmp%
REM
REM
@echo.
ECHO Done.
@echo.
rd /s /q %windir%\Apps
-gosh
0 -
I have no idea why you are getting those folders but i have a very simple way to remove the folders
Download winfile
In winfile highlight the folder you want to delete, then in the Security menu click on Permissions. Make sure it has the right permissions and click ok. If it asks you if you want to take ownership of every file say yes. In about 30 seconds all the folders will have good ntfs permission and you can delete them. Winfile is so useful is install it by default.
-gosh
0 -
You guys all missed it. XP and i believe win2k support the syspart parameter.
From here
/syspartOn an x86-based computer, this parameter specifies that you can copy Setup startup files to a hard disk, mark the disk as active, and then install the disk onto another computer. When you start the computer onto which you have installed the disk, it automatically starts with the next phase of Setup. You must always use the /tempdrive parameter with the /syspart parameter.
You can start Winnt32.exe with the /syspart option on an x86-based computer running Windows NT 4.0, Windows 2000, or Windows XP Professional. The computer cannot be running Windows 95, Windows 98, or Windows Millennium Edition
The idea behind syspart is you run it, and it copies the xp files and makes the hard drive bootable. You send the hard drive to someone and they plug it in. Once they turn on the pc, xp setup starts in gui mode, at the 33 min mark.
-gosh
0 -
hmm...ok.
-gosh
0 -
One of the most common uses of unattended cd's is to integrate registry hacks. Registery hacks are useful for customizing the shell appearance, improve security, speed up the OS, remove bloat, etc.
To integrate registry hacks you face a problem: how to integrate per user (HKCU) registry hacks and global (HKLM) registry hacks. The popular way to integrate registry hacks is through cmdlines.txt or GuiRunOnce.
This way works fine, but it has a number of weeknesses. For one, anyone at the computer while the registry hacks run could restart the computer, causing the registry hacks to not process. For another, the registry hacks might not be sync'ed with the repaired registry. So if someone repair there registry, the registry hacks might be gone. It also doesn't look professional in my opinion, to run all the registry hacks through a batch file. What i am after is a truely integrated way to integrate per user and global registry tweaks.
Awhile back i started on a win2k cd, and i decided to try a new method of deploying registry hacks. The method worked, but i gave up on it for reasons ill mention later. I thought i would share my method if anyone is interested.
To deploy my per user registry hacks, i decided to use hivedef.inf. To deploy the global registry hacks, i decided to use a security template. The reason i was interested in security templates, is because you can use secpol.msc to make one. So i could use secpol.msc to make several different templates. I could use secpol.msc to make a template for win2k, a template for xp, and a template for server 2003. It sounded good to me.
To read about my win2k hivedef.inf go to here
First, look at this article. It describes how to make secpol.msc see new changes.
Below is my Sceregvl.inf for win2k (might work for other os):
; © Microsoft Corporation 1997-2000;
; Security Configuration Template for Security Configuration Editor
;
; Template Name: SCERegVl.INF
; Template Version: 05.00.DR.0000
;
; Revision History
; 0000 - Original
[version]signature="$CHICAGO$"
DriverVer=06/19/2003,5.00.2195.6717
[Register Registry Values]
;
; First field: Full Path to Registry Value
; Second field: value type
; ; REG_SZ ( 1 )
; ; REG_EXPAND_SZ ( 2 ) \\ with environment variables to expand
; ; REG_BINARY ( 3 )
; ; REG_DWORD ( 4 )
; ; REG_MULTI_SZ ( 7 )
; third field: Display Name (localizable string),
; fourth field: Display type 0 - boolean, 1 - number, 2 - string, 3 - choices
;start new
MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl\AutoReboot,4,%AutoRestart%,0
MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment\DEVMGR_SHOW_DETAILS,1,%DevDetails%,3,0|%Dev0%,1|%Dev1%
MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment\DEVMGR_SHOW_NONPRESENT_DEVICES,1,%DevNonPresent%,3,0|%Dev0%,1|%Dev1%
MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting\DoReport,4,%ErrorReport%,0
MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting\ShowUI,4,%ShowError%,0
MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\NoSharedDocuments,4,%Shareddocs%,0
MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Tour\RunCount,4,%Tour%,0
MACHINE\Software\Policies\Microsoft\Messenger\Client\PreventAutoRun,4,%Preautorun%,0
MACHINE\Software\Policies\Microsoft\Messenger\Client\PreventRun,4,%Prerun%,0
MACHINE\SOFTWARE\Microsoft\Outlook Express\Hide Messenger,4,%HideMessenger%,3,0|%Mess0%
MACHINE\SOFTWARE\Microsoft\Outlook Express\BlockExeAttachment,4,%BlockExe%,0
MACHINE\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer\DisableAutoUpdate,4,%WMPUpdates%,0
MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\fDenyTSConnections,4,%RDP%,0
MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\fAllowToGetHelp,4,%RA%,0
MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall\NoChooseProgramsPage,4,%NoChoose%,0
MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\NoSMConfigurePrograms,4,%NoStart%,0
;end new
MACHINE\System\CurrentControlSet\Control\Lsa\AuditBaseObjects,4,%AuditBaseObjects%,0
MACHINE\System\CurrentControlSet\Control\Lsa\CrashOnAuditFail,4,%CrashOnAuditFail%,0
MACHINE\System\CurrentControlSet\Control\Lsa\FullPrivilegeAuditing,3,%FullPrivilegeAuditing%,0
MACHINE\System\CurrentControlSet\Control\Lsa\LmCompatibilityLevel,4,%LmCompatibilityLevel%,3,0|%LMCLevel0%,1|%LMCLevel1%,2|%LMCLevel2%,3|%LMCLevel3%,4|%LMCLevel4%,5|%LMCLevel5%
MACHINE\System\CurrentControlSet\Control\Lsa\RestrictAnonymous,4,%RestrictAnonymous%,3,0|%RA0%,1|%RA1%,2|%RA2%
MACHINE\System\CurrentControlSet\Control\Lsa\SubmitControl,4,%SubmitControl%,0
MACHINE\System\CurrentControlSet\Control\Print\Providers\LanMan Print Services\Servers\AddPrinterDrivers,4,%AddPrintDrivers%,0
MACHINE\System\CurrentControlSet\Control\Session Manager\Memory Management\ClearPageFileAtShutdown,4,%ClearPageFileAtShutdown%, 0
MACHINE\System\CurrentControlSet\Control\Session Manager\ProtectionMode,4,%ProtectionMode%,0
MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters\EnableSecuritySignature,4,%EnableSMBSignServer%,0
MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters\RequireSecuritySignature,4,%RequireSMBSignServer%,0
MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters\EnableForcedLogOff,4,%EnableForcedLogoff%,0
MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters\AutoDisconnect,4,%AutoDisconnect%,1,%Unit-Minutes%
MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters\EnableSecuritySignature,4,%EnableSMBSignRDR%,0
MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters\RequireSecuritySignature,4,%RequireSMBSignRDR%,0
MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters\EnablePlainTextPassword,4,%EnablePlainTextPassword%,0
MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters\DisablePasswordChange,4,%DisablePWChange%,0
MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters\SignSecureChannel,4,%SignSecureChannel%,0
MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters\SealSecureChannel,4,%SealSecureChannel%,0
MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters\RequireSignOrSeal,4,%SignOrSeal%,0
MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters\RequireStrongKey,4,%StrongKey%,0
MACHINE\Software\Microsoft\Driver Signing\Policy,3,%DriverSigning%,3,0|%DriverSigning0%,1|%DriverSigning1%,2|%DriverSigning2%
MACHINE\Software\Microsoft\Non-Driver Signing\Policy,3,%NDriverSigning%,3,0|%DriverSigning0%,1|%DriverSigning1%,2|%DriverSigning2%
MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableCAD,4,%DisableCAD%,0
MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\DontDisplayLastUserName,4,%DontDisplayLastUserName%,0
MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\LegalNoticeCaption,1,%LegalNoticeCaption%,2
MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\LegalNoticeText,1,%LegalNoticeText%,2
MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\ShutdownWithoutLogon,4,%ShutdownWithoutLogon%,0
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole\SecurityLevel,4,%RCAdmin%,0
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole\SetCommand,4,%RCSet%,0
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AllocateCDRoms,1,%AllocateCDRoms%,0
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AllocateDASD,1,%AllocateDASD%,3,0|%AllocateDASD0%,1|%AllocateDASD1%,2|%AllocateDASD2%
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AllocateFloppies,1,%AllocateFloppies%,0
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\CachedLogonsCount,1,%CachedLogonsCount%,1,%Unit-Logons%
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\PasswordExpiryWarning,4,%PasswordExpiryWarning%,1,%Unit-Days%
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\ScRemoveOption,1,%ScRemove%,3,0|%ScRemove0%,1|%ScRemove1%,2|%ScRemove2%
; delete these values from current system - Rdr in case NT4 w SCE
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DisableCAD
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DontDisplayLastUserName
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeCaption
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeText
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\ShutdownWithoutLogon
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\CmdConsSecurityLevel
MACHINE\System\CurrentControlSet\Control\Print\Providers\LanMan Print Services\AddPrintDrivers
MACHINE\System\CurrentControlSet\Services\MRxSMB\Parameters\EnableSecuritySignature
MACHINE\System\CurrentControlSet\Services\MRxSMB\Parameters\RequireSecuritySignature
MACHINE\System\CurrentControlSet\Services\MRxSMB\Parameters\EnablePlainTextPassword
MACHINE\System\CurrentControlSet\Services\Rdr\Parameters\EnableSecuritySignature
MACHINE\System\CurrentControlSet\Services\Rdr\Parameters\RequireSecuritySignature
MACHINE\System\CurrentControlSet\Services\Rdr\Parameters\EnablePlainTextPassword
MACHINE\Software\Microsoft\Windows\CurrentVersion\NetCache\EncryptEntireCache
[strings]
;start new
AUtoRestart = "New - Automatically restart when a bugcheck happens"
DevDetails = "New - Show device manager details"
DevNonPresent = "New - Show device manager non present devices"
Dev0 = "True"
Dev1 = "False"
ErrorReport = "New - Use error reporting"
ShowError = "New - Use error notification"
Shareddocs = "New - Do not show Shared Documents folder in My Computer"
Tour = "New - Show Tour after setup"
Preautorun = "New - Messenger - Do not automatically start Messenger"
Prerun = "New - Messenger - Do not allow Messenger to run"
HideMessenger = "New - Messenger - Remove Windows Messenger from Outlook Express"
Mess0 = "2"
BlockExe = "New - OE - Block Executable Attachments in Outlook Express"
WMPUpdates = "New - WMP - Disable Auto Upgrade with Windows Media Player"
RDP = "New - Disable remote desktop"
RA = "New - Enable remote assistance"
NoChoose = "New - Hide Set Program Access and Defaults in Add/Remove Programs"
NoStart = "New - Hide Set Program Access and Defaults in Start menu"
;end new
SubmitControl = Allow server operators to schedule tasks (domain controllers only)
ShutdownWithoutLogon = Allow system to be shut down without having to log on
AllocateDASD = Allowed to eject removable NTFS media
AllocateDASD0 = Administrators
AllocateDASD1 = Administrators and Power Users
AllocateDASD2 = Administrators and Interactive Users
AuditBaseObjects = Audit the access of global system objects
FullPrivilegeAuditing = Audit use of Backup and Restore privilege
EnableForcedLogoff = Automatically log off users when logon time expires (local)
AutoDisconnect = Amount of idle time required before disconnecting session
ClearPageFileAtShutdown = Clear virtual memory pagefile when system shuts down
RequireSMBSignRdr = Digitally sign client communication (always)
EnableSMBSignRdr = Digitally sign client communication (when possible)
RequireSMBSignServer = Digitally sign server communication (always)
EnableSMBSignServer = Digitally sign server communication (when possible)
DisableCAD = Disable CTRL+ALT+DEL requirement for logon
RestrictAnonymous = Additional restrictions for anonymous connections
RA0 = None. Rely on default permissions
RA1 = Do not allow enumeration of SAM accounts and shares
RA2 = No access without explicit anonymous permissions
DontDisplayLastUserName = Do not display last user name in logon screen
LmCompatibilityLevel = LAN Manager Authentication Level
LMCLevel0 = Send LM & NTLM responses
LMCLevel1 = Send LM & NTLM - use NTLMv2 session security if negotiated
LMCLevel2 = Send NTLM response only
LMCLevel3 = Send NTLMv2 response only
LMCLevel4 = Send NTLMv2 response only\refuse LM
LMCLevel5 = Send NTLMv2 response only\refuse LM & NTLM
LegalNoticeText = Message text for users attempting to log on
LegalNoticeCaption = Message title for users attempting to log on
CachedLogonsCount = Number of previous logons to cache (in case domain controller is not available)
AddPrintDrivers = Prevent users from installing printer drivers
DisablePWChange = Prevent system maintenance of computer account password
PasswordExpiryWarning = Prompt user to change password before expiration
RCAdmin = Recovery Console: Allow automatic administrative logon
RCSet = Recovery Console: Allow floppy copy and access to all drives and all folders
AllocateCDRoms = Restrict CD-ROM access to locally logged-on user only
AllocateFloppies = Restrict floppy access to locally logged-on user only
ProtectionMode = Strengthen default permissions of global system objects (e.g. Symbolic Links)
SignOrSeal = Secure channel: Digitally encrypt or sign secure channel data (always)
SealSecureChannel = Secure channel: Digitally encrypt secure channel data (when possible)
SignSecureChannel = Secure channel: Digitally sign secure channel data (when possible)
StrongKey = Secure channel: Require strong (Windows 2000 or later) session key
CrashOnAuditFail = Shut down system immediately if unable to log security audits
EnablePlainTextPassword = Send unencrypted password to connect to third-party SMB servers
ScRemove = Smart card removal behavior
ScRemove0 = No Action
ScRemove1 = Lock Workstation
ScRemove2 = Force Logoff
DriverSigning = Unsigned driver installation behavior
NDriverSigning = Unsigned non-driver installation behavior
DriverSigning0 = Silently succeed
DriverSigning1 = Warn but allow installation
DriverSigning2 = Do not allow installation
Unit-Logons = logons
Unit-Days = days
Unit-Minutes = minutes
Just put that file into your inf folder. Or delete SCERegVl.IN_ from your local source, and copy SCERegVl.INF to it. Now when you install win2k, secpol.msc will show my new settings.
Once you use secpol.msc with my SCERegVl.INF to make a new security template, the next step is to integrate this template with your local source. Through trial and error, i found a way to slipstream it.
Here's the security templates win2k and higher use:
Defltwk.inf: Windows 2000 Professional
Defltsv.inf: Windows 2000 Server/Advanced Server non-domain controller
Defltdc.inf: Windows 2000 Server/Advanced Server domain controller
Dwup.inf (for Windows 2000 Professional upgrades)
Dsup.inf (for Windows 2000 Server upgrades)
So if your gonna install win2k pro, edit defltwk.inf and add to it your custom changes. Then delete defltwk.in_ and put yours in the local source.
For example, after using secpol.msc i saved a template. I copied what was in the template and pasted the values under [Registry Values]. I added these:
MACHINE\Software\Microsoft\Driver Signing\Policy=3,0MACHINE\SOFTWARE\Microsoft\Outlook Express\BlockExeAttachment=4,1
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole\SecurityLevel=4,1
MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Setup\RecoveryConsole\SetCommand=4,1
MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Tour\RunCount=4,0
MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\NoSMConfigurePrograms=4,1
MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableCAD=4,1
MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall\NoChooseProgramsPage=4,1
MACHINE\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer\DisableAutoUpdate=4,1
MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment\DEVMGR_SHOW_DETAILS=1,"0"
MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment\DEVMGR_SHOW_NONPRESENT_DEVICES=1,"0"
MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl\AutoReboot=4,1
Now when i install win2k, it'll use these custom values. The only limitation to security templates is they only use HKLM and not HKCU values, which is why i modified hivedef.inf.
So you're probably thinking why i gave up on using security templates. I gave up because of these problems:
1 - Security templates are cumulative. That means a value in another security template might overwrite a value in my security template. One example i found was DisableCAD. No matter what i put in my security template, disablecad was always enabled, not disabled. I really didn't feel like looking through security templates to find where disablecad was being enabled.
2 - Every time a service pack is released, you'll have to manually edit the deflwk.inf file. This takes up time.
3 - Since most of the work is done by hand, there's a good chance of error.
So for these reasons i gave up on this method, but somene might find it useful. I'm sorry if my directions are less than clear, but security templates are very hard to use.
A security template is good for other things too. You can use a security template ti disable services, and you can use it to set permissions on registry keys. I saw someone make a batch file that disabled services, a security template would be easier.
-gosh
0 -
DisableCAD
-gosh
0 -
Apps.bat launches during the first boot into the gui, you DO have network access! Only cmdlines.txt doesn't have network access. Using my method you can put apps.bat on a floppy, another hard drive, another partition, another computer - anywhere you want. And sure you can burn a new cd when a new hotfix comes out, but do you really want to burn a new cd everytime a hotfix comes out? Using this method you can use the same cd for years while having up to date software.
Using my method you can also install more software than a normal cd can hold. For example, you could put apps.bat locally and have it install office 2003, and other software. No longer are your unattended installs limited to your cd size. Now you're only limited by the free space on your hard drive.
-gosh
0 -
Let me do a little more explaining.
You should only run winnt32.exe /noreboot from the GUI. When you run this command, all setup does is copy files using dosnet.inf. Then it restarts your computer and runs setup from your hard drive.
If you look at the ~LS folder you will see several files are not there, such as winnt32.exe and winnt.exe. Microsoft's documentatioln says that when you boot from an xp cd, winnt32.exe is launched. As you can see, this is not true. Using my method our cd won't have winnt32 or winnt. When you boot from cd, setupdd.sys is run (text mode setup). After rebooting into GUI mode, syssetup.dll is run under the setup.exe process.
You can only use this method to install from CD, since there is no winnt or winnt32. And like i said you can only do clean installs, not upgrades.
-gosh
0 -
I made a crude batch file to remove files used by the above infs. Use only with extreme caution! I haven't tested this.
-gosh
0 -
If you are using an unattended file there is NO WAY to access recovery console or repair xp. If you look at my 2nd post i describe how to get around this.
-gosh
0 -
It's named winnt.sif right?
-gosh
0 -
Well of course if you manually delete files on your xp cd it'll reduce the size. The reason i use my method is because it's quick, it allows you to use several unattend files, it saves 150 megs, and it'll cause no problems.
Using my method is exactly the same thing as running winnt32.exe and doing a clean install. Manually deleting files, deleting folders, could cause unforseen problems. And my way you don't remove any features. When you manually remove windows media player and stuff like that you are removing features, mine is feature complete. Also compressing files using winrar will cause setup to take longer as it uncompresses the files.
And even if you make a huge batch file that removes hundreds of files from the xp install, you still won't have access to recovery console using an unattended install, or have the option to repair XP.
-gosh
0 -
If an admin will let me i can post my hexed dxsetup.exe that let's you silently install dx9. The file is only 451k. Any admin's think this is ok?
-gosh
0 -
Don't you hate it when you spend months making an unattended cd, only to have it be outdated less than a month after you burned it to cd? Then you have to go through the whole process again - adding new hotfixes, new software, things like that. So far i haven't seen anyone address this issue. Well let's think outside of the box as i show you guys how to make your old unattend cd always up to date.
Below is current code in my apps.bat file that i use to install. As you can see, i'm going to rewrite the section later because of other changes i've made (my new cd is going to use winpe to install xp, bypassing text mode).
REMREM Is it local? If yes, call the local apps.bat and exit. If no, continue processing.
REM
:decide
REM this section will need to be rewritten
REM IF exist a:\apps.bat goto aapps
IF exist c:\apps.bat goto bapps
IF exist d:\apps.bat goto capps
IF exist e:\apps.bat goto dapps
IF exist f:\apps.bat goto eapps
IF exist \\%myserver%\Install$\apps.bat goto fapps
goto PrePre
echo "using current apps.bat (no changes)" >> %windir%\apps.log
:aapps
echo "using a:\apps.bat" >> %windir%\apps.log
call a:\apps.bat
exit
:bapps
echo "using c:\apps.bat" >> %windir%\apps.log
call c:\apps.bat
exit
:capps
echo "using d:\apps.bat" >> %windir%\apps.log
call d:\apps.bat
exit
:dapps
echo "using e:\apps.bat" >> %windir%\apps.log
call e:\apps.bat
exit
:eapps
echo "using f:\apps.bat" >> %windir%\apps.log
call f:\apps.bat
exit
:fapps
echo "using \\%myserver%\Install$\apps.bat" >> %windir%\apps.log
call \\%myserver%\Install$\apps.bat
exit
Here is my thought process behind the code. You place this code at the top of a batch file run by GuiRunOnce in your unattend file. The batch file runs, and the first thing it does it look for another apps.bat. If it finds an apps.bat, it runs it and stops processing any other commands in your batch file. If it doesn't find another apps.bat, it keeps processing it's self.
For example, lets say you burn an unattended cd and format. A month later, a new version of Nero comes out, and you want the new version of Nero to be installed and not the nero on your cd. So on your d drive you make apps.bat. Apps.bat is a copy of the batch file on your cd. The only difference is d:\apps.bat runs the updated version of nero on your hard drive, not the one on the cd. So you run your unattended cd, when your batch file is run it sees d:\apps.bat exists, so it runs that and stops processing commands. This way, your unattended cd is ALWAYS up to date. Even if your unattended cd is a year old, this method will keep your cd up to date.
As a side note, i had to remove the line looking for a:\apps.bat because during setup a message would come up saying a disk in drive a could not be found. If anyone can get this working i would appreciate it. Change %myserver% to your other computer name if you want to install over the network.
-gosh
0 -
I tried to keep my first post as simple as possible so people didn't get lost. Hopefully i didn't lose anyone. For those people who successfully made the slimmed down xp cd, let's take it a step further.
Most people making unattended cd's just try to make a typical cd that just installs stuff such as software and hotfixes. They read microsoft articles on making unattend files, slipstreaming, etc and they stop there. But once you've made an unattended cd you have a problem: you can only use the cd for unattended installs. You cannot use it for recovery console or to repair XP. You also can only use 1 unattend file, you can't have multiple unattend files. Let's take my original post further so you can use the cd to make an unattended install, -OR- use recovery console or repair XP.
I'm going to assume you've already followed my first post and still have c:\install
First, rename the BOOT folder to VOL1. Then copy the contents of the VOL1 folder to 2 other folders - VOL2 and VOL3 (make sure VOL1, VOL2, VOL3 are capital letters). SO VOL1, VOL2, VOL3 should all have the same files and be the same size. All 3 folders should be in c:\install
Next, hex c:\install\VOL1\setupldr.bin, replace BOOT with VOL1, the hex editor should find 4 matches (you might need to make a brand new setupldr.bin file if the hex editor finds more than 4 matches). Then hex c:\install\VOL2\setupldr.bin, replace BOOT with VOL2, the hex editor should find 4 matches. Then hex c:\install\VOL3\setupldr.bin, replace BOOT with VOL3, the hex editor should find 4 matches.
Make sure VOL1 doesn't have a winnt.sif file. Put your unattend file into VOL2. Ignore VOL3 for now.
Rename xpboot.bin to VOL1.DAT (all capital letters). Copy VOL1.DAT to VOL2.DAT and VOL3.DAT. So we should have VOL1.DAT, VOL2.DAT, VOL3.DAT, that are all identical. Hex VOL1.DAT and replace BOOT with VOL1. Hex VOL2.DAT and replace BOOT with VOL2. Hex VOL3.DAT and replace BOOT with VOL3.
Now download http://www.nu2.nu/nu2files/diskem1x.zip and extract the file to a temp location. From this temp location, copy these files to your c:\install folder:
Deload.bin, diskem1x.bin, loader.bin
Copy what's below and save it as c:\install\diskemu.cmd
Ok so now in your c:\install folder you should have the following:;:boot
cls
print
print Press Enter to boot from CD...
getkey 5 esc
onkey esc boot 80
onkey entr goto start
; When no key found...
goto boot
:start
cls
print
print ------------------------------------------------------------------------------
print cd name here
print by gosh
print ------------------------------------------------------------------------------
print F1=Help
print 0) WINXP PRO Volume License SP1 Regular
print 1) WINXP PRO Volume License SP1 Unattended
print 2) WINXP PRO Volume License SP1 OEMPreinstall
print
print x) More Options...
print q) Quit to command prompt
print r) Reboot
print Esc) Boot first harddisk
print
print Hit the key of choice:
:mainkey
; timeout is 30 seconds, default key is escape
getkey 30 esc
onkey 0 run VOL1.DAT
onkey 1 run VOL2.DAT
onkey 2 run VOL3.DAT
onkey q quit
onkey r reboot
onkey x goto dev
onkey f1 goto help
onkey esc boot 80
; When no key found...
goto mainkey
;
:help
cls
print HELP
print ----
print
print Hit the key of your choice (1,2,q,r or <Esc>) in the main menu ->
print Hit the key "d" will bring you to the hidden Development menu ->
print
print Press any key to return to main menu...
getkey
goto start
; EOF
Directory of c:\install10/08/2003 06:58 PM <DIR> .
10/08/2003 06:58 PM <DIR> ..
10/08/2003 06:58 PM <DIR> I386
10/08/2003 07:52 PM 2,048 VOL1.DAT
08/23/2001 09:00 AM 10 WIN51
08/23/2001 09:00 AM 10 WIN51IC
08/23/2001 09:00 AM 2 WIN51IC.SP1
08/23/2001 09:00 AM 10 WIN51IP
08/23/2001 09:00 AM 2 WIN51IP.SP1
08/23/2001 09:00 AM 11,387 SPNOTES.HTM
10/08/2003 06:58 PM <DIR> VOL1
08/23/2001 09:00 AM 2,980 DISKEMU.CMD
08/23/2001 09:00 AM 512 DELOAD.BIN
08/23/2001 09:00 AM 12,288 DISKEM1X.BIN
08/23/2001 09:00 AM 2,048 LOADER.BIN
10/08/2003 07:52 PM 2,048 VOL2.DAT
10/08/2003 07:52 PM 2,048 VOL3.DAT
10/08/2003 11:38 PM <DIR> VOL2
10/08/2003 11:38 PM <DIR> VOL3
That's it. Now let's build it with cdimage.exe:
cdimage -lXPSP1 -t08/23/2001,09:00:00 -bc:\install\loader.bin -h -n -m -o c:\install c:\xpsp1.isoYou now have a bootable XP Pro SP1 cd. When you boot from it, if you chose option 0, it's just a regular xp install. You will be able to use recovery console, repair xp, and you can chose every option in xp seteup. If you chose option 2, you will do an unattended install. If you do option 3, it'll do whatever you want it to. In my example, i made it an OEMPreinstall.
-gosh
0 -
The command is wrong. Run each hotfix with the same parameters, to see which hotfix has wrong parameters.
-gosh
0 -
You only need the ic files if your cd has xp home edition i believe. I always include both the ip and ic files.
-gosh
0 -
winnt32.exe /dudisable /noreboot /unattend:c:\winnt.sif
Just type that with the correct path to your unattend file to automate it.
-gosh
0 -
The first step is to do winnt32.exe /noreboot, then select new install. Therefore the files are only for a clean install. Other than that, it acts just like a regular install of xp. You can do windows updates, install printers, etc.
-gosh
0 -
*************Note********************
Check my website (listed in my signature) first. My site has most of the information here, organised better. Refer to my website before asking any questions.
Please see http://gosh.msfnhosting.com/part1.htm
*************Note********************
One of the more annoying things about nt based setups is the time it takes copying files. You run setup, setup copies files. Setup reboots and copies more files. Setup reboots again and then starts installing. Despite all the changes windows has seen since nt4, it still uses this outdated method of installing. One of my best unattended secrets is to bypass most of this copying; saving time and disk space. I have only revealed this secret once, but never fully explained it.
Let's look at the i386 folder for XP Pro, with sp1 slipstreamed. The i386 folder is 478 megs. This folder has a lot of stuff you probably never need. It has code for migrations and upgrades. Code for other languages, uninstalling back to a previous os, code for running from dos mode, code for running in the gui. If you do a clean install, most of that code is never used or needed. Why not remove all the crap you don't need?
First, put in your xp cd or copy it to the hard drive. Then type winnt32.exe /noreboot. If you get any errors at this step, see Note1 at the bottom.
Once XP Setup comes up, go through the prompts, make sure you say you're doing a clean install (not upgrade). At the "Setup Options" screen, click on "Advanced Options", and make sure "copy all installation files from the CD" is checked. If it's grayed out - that's fine.
After setup finishes closes, on your c drive you will have 2 folders. These folders are hidden by default, so make sure you can see hidden files and folders in folder options:
C:\$WIN_NT$.~LS - rename this folder to install
C:\$WIN_NT$.~BT - rename this folder to BOOT (all capital letters)
Now copy the BOOT folder into the install folder. In the Install folder, delete the size.sif file. In the BOOT folder, delete winnt.sif and migrate.inf.
If you want the cd to say "press any key to boot from cd", put bootfix.bin into your BOOT folder.
If you want to do an unattended install, rename your unattend file to winnt.sif and put it in the BOOT folder.
Next, in the BOOT folder hex setupldr.bin. Replace the word i386 with BOOT (all capital letters), your hex editor should make 4 changes.
Next, in the c:\install folder we need to make the cd identification files. From your XP CD copy win51, win51IC, win51IP (and win51ip.sp1 and win51ic.sp1 if a slipstreamed cd) to c:\install. If it's a slipstreamed cd you also need spnotes.htm in the install folder.
Your c:\install folder should look like this:
Lastly we just need to make the boot sector. Download http://home.online.no/~msols/xpboot.bin and save it in the install folder. Hex edit it, and change i386 to BOOT.Directory of c:\install10/08/2003 06:58 PM <DIR> .
10/08/2003 06:58 PM <DIR> ..
10/08/2003 06:58 PM <DIR> I386
10/08/2003 07:52 PM 2,048 xpboot.bin
08/23/2001 09:00 AM 10 WIN51
08/23/2001 09:00 AM 10 WIN51IC
08/23/2001 09:00 AM 2 WIN51IC.SP1
08/23/2001 09:00 AM 10 WIN51IP
08/23/2001 09:00 AM 2 WIN51IP.SP1
08/23/2001 09:00 AM 11,387 SPNOTES.HTM
10/08/2003 06:58 PM <DIR> BOOT
Change from:
...h...G..........F.....F.............r..a..v.......].....$..................SETUPLDR.BINBOOTFIX.BINI386..........................................To:
...h...G..........F.....F.............r..a..v.......].....$..................SETUPLDR.BINBOOTFIX.BINBOOT..........................................Now build it. Using cdimage.exe type the following command:
cdimage -lXPSP1 -t08/23/2001,09:00:00 -bc:\install\xpboot.bin -h -n -m -o c:\install c:\xpsp1.iso
You should have xpsp1.iso with a file size of 338 MB.
So as you see my method reduces the i386 folder from 478 megs to 338 megs. With that 150 megs you saved, you can add more software or other OS'. I have used this method to make a cd with xp pro, xp home, win2k pro, win2k serv, win2k adv server on 1 700 meg cd.
Another benefit of this method is XP installs a LOT faster. Awhile ago i was in a class where everyone made the same exact computer. At the end of the class we installed XP. With my computer next to another identical computer, i started installing xp with my unattended cd, and the other person used a regular cd. My CD was half way done installing when his computer was done with the file copy phase.
There is only 1 limitation to my method - you cannot do upgrades, ONLY clean installs. But then again, how many people use there unattended cd to do an upgrade?
-gosh
Note1: If you get an error such as "setup has been disabled", you will need to install the xp application toolkit. One situation you would get this error is if you are installing win2k on XP. Download the xp appcompat toolkit at http://www.microsoft.com/downloads/details...&DisplayLang=en. Install it, then go to start > programs > Microsoft Windows Application Toolkit > Compatibility Administrator Tool 3.0. Once opened, click on Applications > Windows 2000 > on right hand side right click on winnt32.exe and disable it.
Note2: If you don't feel like download the appcompat toolkit, simly rename windows\system32\ahui.exe to something else. When done, rename the file back.
Last Edited: april 1, 2004:
Added: Bootfix.bin fix
Added: made sure people were clicking on advanced options
Added: made sure people could see hidden files and folders
Added: Appcompat fix
And cleaned up some text
Added URL to site
Added alternative to disable appcompat
0 -
http://www.microsoft.com/downloads/details...&displaylang=en
To burn a dvd just type:
dvdburn isoname.iso
To burn a cd type:
cdburn cdname.iso
-gosh
0 -
One word: OEMPreinstall.
In unattend file set OEMPreinstall=Yes, and make the folder $OEM$\$$\Resources\Themes
That's it. I mentioned this in my tips and tweaks thread. One thing ive noticed is some people here seem to put everything into a big long batch file that does everything. There's nothing wrong with doing that, however i think an OEMPreinstall would be a better method of deploying files.
-gosh
0 -
A popular method of deploying hotfixes, registry hacks, etc is through the GuiRunOnce section of the unattend file. This method is very versatile and works good. I have found one problem with this method though.
Awhile back i was playing with an install that was originally installed with one of my unattended cd's that installed everything through GuiRunOnce. I ended up breaking the install, so i repaired the registry (Q307545). After restarting the pc did boot up, however i got errors such as "unable to find whatever.bat". Then once at the desktop all my custom registry tweaks were missing. My only thought was the repair registry was saved before GuiRunOnce ran my batch file, since it was acting like the first time i booted up.
Has anyone else seen this behavior? Has anyone else tried repairing the registry after doing an unattended install using GuiRunOnce?
Recently i found a possible workaround, ERUNT. ERUNT can silently update the repair registry.
Put ERUNT in your system32 folder then run this command after your batch file finishes:
ERUNT %windir%\Repair /sysreg /noconfirmdelete /noprogresswindow
This will ensure your repair registry is the same as your registry after you unattend setup finishes, avoiding any conflicts.
-gosh
0 -
I'll post how to save 150 megs from your xp cd later today. I also have a special treat later today.
-gosh
0
Unattended Secret: Reducing Size Of Source
in Unattended Windows 2000/XP/2003
Posted
Like i said, this is just like if you did a clean install. You can slipstream anything you want, you can use an $OEM$ folder, anything you like. It'll work on any computer, etc.
-gsoh