MSFN Forum: Gosh's Unattended Tips And Tricks - MSFN Forum

Jump to content



  • 6 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Gosh's Unattended Tips And Tricks Rate Topic: ***** 1 Votes

#1 User is offline   gosh 

  • gosh 2.0
  • Group: Patrons
  • Posts: 2,347
  • Joined: 03-October 03
  • OS:none specified
  • Country: Country Flag

Posted 08 October 2003 - 02:14 AM

Here's some stuff useful for an unattended install. Most of the stuff is rare or unique. Enjoy.

Trick #1: Make a flat.

Close your eyes and imagine this for a second. You've made an unattended cd. A friend of yours who is computer illiterate calls you and has a problem with his computer. It hits you that you could save time by running your unattended cd at his house, doing a quick clean install. So you go over to his house, backup his data, and run your unattended cd. Once done you leave with the unattended cd. The next day your friend calls you up. This time he needs your xp cd because he installed something like IIS, and it needs files from the CD. Now you have to drive all the way over to his house again, just to give him your cd. Wouldn't it be nice if an unattended cd not just installed your favorite programs, but copied itself to the hard drive? That way you wouldn't need the cd again.

To make an unattended flat we're gonna need to make 2 files - source.bat and source.reg. We're gonna put both into the windows folder.

First, make this folder:

\$OEM$\$$

Copy what's below and save it as \$OEM$\$$\source.bat

Quote

@ECHO OFF
IF EXIST C:\WIN51IP.SP1 set CDROM=C:
IF EXIST D:\WIN51IP.SP1 set CDROM=D:
IF EXIST E:\WIN51IP.SP1 set CDROM=E:
IF EXIST F:\WIN51IP.SP1 set CDROM=F:
IF EXIST G:\WIN51IP.SP1 set CDROM=G:
IF EXIST H:\WIN51IP.SP1 set CDROM=H:
IF EXIST I:\WIN51IP.SP1 set CDROM=I:
IF EXIST J:\WIN51IP.SP1 set CDROM=J:
IF EXIST K:\WIN51IP.SP1 set CDROM=K:
IF EXIST L:\WIN51IP.SP1 set CDROM=L:
IF EXIST M:\WIN51IP.SP1 set CDROM=M:
IF EXIST N:\WIN51IP.SP1 set CDROM=N:
IF EXIST O:\WIN51IP.SP1 set CDROM=O:
IF EXIST P:\WIN51IP.SP1 set CDROM=P:
IF EXIST Q:\WIN51IP.SP1 set CDROM=Q:
IF EXIST R:\WIN51IP.SP1 set CDROM=R:
IF EXIST S:\WIN51IP.SP1 set CDROM=S:
IF EXIST T:\WIN51IP.SP1 set CDROM=T:
IF EXIST U:\WIN51IP.SP1 set CDROM=U:
IF EXIST V:\WIN51IP.SP1 set CDROM=V:
IF EXIST W:\WIN51IP.SP1 set CDROM=W:
IF EXIST X:\WIN51IP.SP1 set CDROM=X:
IF EXIST Y:\WIN51IP.SP1 set CDROM=Y:
IF EXIST Z:\WIN51IP.SP1 set CDROM=Z:
ECHO Please wait, Recovery Console is being installed locally.
%CDROM%\i386\winnt32.exe /dudisable /cmdcons /unattend
md %systemroot%\Source\i386
ECHO Please wait, source files are being copied.  This may take several minutes.
xcopy /Y /e %CDROM%\i386\*.* %systemroot%\Source\i386\
ECHO Adding registry entries.
regedit.exe /s Source.reg
ECHO Done.
exit
Copy what's below and save it as $OEM$\$$\source.reg

Quote

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup]
"SourcePath"="%systemroot%\\Source\\"
"ServicePackSourcePath"="%systemroot%\\Source\\"


Now, in your unattend file, make sure you have this:

Quote

[Unattended]    UnattendMode=FullUnattended
    OemPreinstall=Yes
    OemSkipEula=Yes

[GuiRunOnce]
Command0="%windir%\source.bat"


That's it. When you install xp using the unattend file, recovery console and a flat will be made the first time you boot into windows. This is great for friends that don't have a clue about windows. Now when they call you for help you'll know they have recovery console installed locally and a flat locally.

Trick #2: Brand the my computer window:

You can put a custom logo and name in the my computer window by using a simple inf file and bmp.

First, make this folder:

\$OEM$\$$\System32

In this folder, copy below and save as \$OEM$\$$\System32\oeminfo.ini

Quote

[Version]Microsoft Windows Whistler Edition
WinVer=5.01

[General]
Manufacturer=gosh
Model=
[Support Information]
Line1="win2k build"


Find a small .bmp and save it as \$OEM$\$$\System32\oemlogo.bmp

Make sure your unattend file has the stuff listed in trick #1. That's it.

Trick #3: Associate file types:

One of the most annoying aspects about xp is how some file types aren't registered the way you want it. For example, most software is released with an .nfo file, but xp wants to open .nfo files in msinfo32. Below is a way to batch file associations:


Quote

REM ftype will also show all registered types
assoc .blt=txtfile
assoc .cue=txtfile
assoc .diz=txtfile
assoc .eml=txtfile
assoc .iss=txtfile
assoc .log=txtfile
assoc .md5=txtfile
assoc .m3u=txtfile
assoc .nbi=txtfile
assoc .nfo=txtfile
assoc .nt=txtfile
assoc .pif=txtfile
assoc .sam=txtfile
assoc .sif=txtfile
assoc .sfv=txtfile
assoc *=txtfile
If you run those commands in a batch file, all the extensions will be registered as text files. This is also a good idea for security purposes, disabling known hostile file types such as .eml and .vbs

Tip #1: make a log file:

Unattended installs can be hard to troubleshoot. What i like to do is make a log file, which makes it easier to see where the problem is. To make a log file, have each command end in >> logfile.txt

An example from my current apps.bat file:

Quote

@ECHO OFF
ECHO Apps.bat, version %cdver% >> %windir%\apps.log
ECHO Logging started:  %date% %time% >> %windir%\apps.log
ECHO Computer:  %computername >> %windir%\apps.log
ECHO User:  %username% >> %windir%\apps.log
@echo.  >> %windir%\apps.log
@echo.  >> %windir%\apps.log


This will log information to apps.log.

Trick #3: Disable that stupid xp search companion:

Like the old win2k search? Bring it back!

Quote

REM Disable search companion
regsvr32 /u /s %windir%\srchasst\srchui.dll
Tip #2: Copy your favorite files to the install:

Using an oempreinstall you can copy files to your install, such as:

$OEM$\$$\Web\Wallpaper - put wallpapers here
$OEM$\$$\System32 - put screensavers, files such as cdimage.exe and cdburn.exe here
$OEM$\$$\Resources\Themes - put themes here. To specify default them make a .theme file and specify it in unattend file.

Tip #3: Use the server2003 classic accounts:

Copy keymgr.cpl from server2003 to your system32 folder to have classic accounts

Trick #4: Show classic user accounts in control panel.

To see the win2k user accounts window type control userpasswords2. To enable this in an unattended install, import this registry file:

Quote

Windows Registry Editor Version 5.00


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{7A9D77BD-5403-11d2-8785-2E0420524153}]
@="OldUserAccounts"




That's it for now. Let me know if you enjoy my tips and tricks.

-gosh


#2 User is offline   DaveXP 

  • The One
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,295
  • Joined: 15-July 03

Posted 08 October 2003 - 02:33 AM

you got some good stuff they mate anything else like what can be emoved from the i386 dir to get some more room back :)

#3 User is offline   gosh 

  • gosh 2.0
  • Group: Patrons
  • Posts: 2,347
  • Joined: 03-October 03
  • OS:none specified
  • Country: Country Flag

Posted 08 October 2003 - 02:35 AM

I'll post how to save 150 megs from your xp cd later today. I also have a special treat later today.

-gosh

#4 User is offline   DaveXP 

  • The One
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,295
  • Joined: 15-July 03

Posted 08 October 2003 - 02:37 AM

cool

#5 User is offline   b0r3d 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 821
  • Joined: 03-August 03

Posted 15 October 2003 - 08:44 AM

I realize that you can add different wallpapers to show up on the desktop tab by placing them in the $$\Web\Wallpaper dir, but how do you set one to be default, instead of Microsoft's bliss.bmp (the one with the grassy hills) ?

#6 User is offline   Numinous 

  • Supercalafragalistic XPalidosious
  • PipPipPipPip
  • Group: Members
  • Posts: 560
  • Joined: 30-September 03

Posted 15 October 2003 - 09:22 AM

rename a copy of luna.theme in windows\resources\themes, edit it with notepad, copy it to $$\resources\themes and add this in winnt.sif

[Shell]
CustomDefaultThemeFile="%Systemroot%\Resources\Themes\filename.Theme"

change filename to whatever you called it

#7 User is offline   Westi 

  • Junior
  • Pip
  • Group: Members
  • Posts: 61
  • Joined: 23-September 03

Posted 15 October 2003 - 01:11 PM

Great work !
Fine tune the batch 'source.bat' :

add a line:
'bootcfg /Timeout 2'
to reduce the boot time from 30 to 2 sec.

and make sure you have in i386 the folders WINNTUPG and COMPDATA
otherwise the installation of cmdcons fails.

#8 User is offline   Rancor 

  • Junior Monster
  • Group: Members
  • Posts: 45
  • Joined: 07-September 03

Posted 15 October 2003 - 02:23 PM

b0r3d, on Oct 15 2003, 03:44 PM, said:

I realize that you can add different wallpapers to show up on the desktop tab by placing them in the $$\Web\Wallpaper dir, but how do you set one to be default, instead of Microsoft's bliss.bmp (the one with the grassy hills) ?

I just add my fav. wallpaper(s) to \$oem$\$$\Web\Wallpaper\ in .bmp format, then use a couple of reg. hacks to make it the default, i.e.:

[HKEY_CURRENT_USER\Control Panel\Desktop]
"ConvertedWallpaper"="C:\\WINDOWS\\Web\\Wallpaper\\Windows XP.jpg"
"Wallpaper"="C:\\WINDOWS\\Web\\Wallpaper\\Windows XP.bmp"

Works like a charm :)

#9 User is offline   willpantin 

  • Member
  • PipPip
  • Group: Members
  • Posts: 155
  • Joined: 20-September 03

Posted 15 October 2003 - 03:14 PM

I used a simpler approach to get my Favourite Wallpaper installed as Default...

All I did was rename my Favourite Wallpaper to BLISS.JPG, then in command promp, in the directory of my file, I typed:

makecab BLISS.JPG BLISS.JP_

Then I replaced my old BLISS.JP_ in the I386 Directory of my installation CD with my new BLISS.JP_

Simple, but equally effective.
:)

#10 User is offline   squallgreg 

  • Junior
  • Pip
  • Group: Members
  • Posts: 81
  • Joined: 06-October 03

Posted 15 October 2003 - 03:56 PM

thanx willpantin ! Me too I thought of replacing the default wallpaper, but I didnt know where to find it ^_^

#11 User is offline   XtremeMaC 

  • MSFN SuperB
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5,070
  • Joined: 13-October 03

Posted 15 October 2003 - 06:04 PM

hey instead of writing all those drive letters
put .\

for example winnt.bat which the deploy creates will look like...

#12 User is offline   willpantin 

  • Member
  • PipPip
  • Group: Members
  • Posts: 155
  • Joined: 20-September 03

Posted 15 October 2003 - 10:03 PM

Wow!

XtremeMaC, that was a great tip!

Thanks...

:)

#13 User is offline   b0r3d 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 821
  • Joined: 03-August 03

Posted 16 October 2003 - 12:01 AM

gosh, on Oct 8 2003, 06:14 PM, said:

To specify default them make a .theme file and specify it in unattend file.

How would one go about chaning a .msstyles file to a .theme ? Is it as simple as just renmaing the file with the new extention, or does somethign more difficult need to be done?

#14 User is offline   Numinous 

  • Supercalafragalistic XPalidosious
  • PipPipPipPip
  • Group: Members
  • Posts: 560
  • Joined: 30-September 03

Posted 16 October 2003 - 02:10 AM

change this section in your theme file

[VisualStyles]
Path=%ResourceDir%\Themes\Cbfield\Cbfield.msstyles
ColorStyle=NormalColor
Size=NormalSize

there are regkeys too but theyre not essential

i would recommend changing this key for a classic login and shutdown theme
HKU,.DEFAULT\Software\Microsoft\Windows\CurrentVersion\ThemeManager,DllName,0x20000,"%windir%\resources\themes\Cbfield\Cbfield.msstyles"

edit :: or add it if it dont exist

#15 User is offline   b0r3d 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 821
  • Joined: 03-August 03

Posted 16 October 2003 - 05:29 AM

For some reason, when i use that method, it doesnt import the .msstyles properly. In the preview window, everything is out of preportion, and arent the right colours, yet when i apply the actual theme, it changes it to the classic theme (win2k)

Any suggestions why it might not be working properly?

#16 User is offline   Numinous 

  • Supercalafragalistic XPalidosious
  • PipPipPipPip
  • Group: Members
  • Posts: 560
  • Joined: 30-September 03

Posted 16 October 2003 - 06:36 AM

under the key [HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\ThemeManager]
add DllName as a REG_EXPAND_SZ type with

%SystemRoot%\Resources\themes\*****\*****.msstyles

replace ***** with your preference

all this does is to change the titlebar to your msstyles visualstyle
still get the xp logos.. only use it if you use classic style logon

also check the ColorStyle=NormalColor
open display properties\appearance and see whats listed
under the color scheme listbox

did you not get a theme file with the msstyles your using

#17 User is offline   b0r3d 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 821
  • Joined: 03-August 03

Posted 16 October 2003 - 07:03 AM

No, i didnt get a .theme file with the msstyles file i'd like to apply. Just the .msstyle file itself. Nothing else.
That seems to be all you can download from http://www.themexp.org these days.

#18 User is offline   Numinous 

  • Supercalafragalistic XPalidosious
  • PipPipPipPip
  • Group: Members
  • Posts: 560
  • Joined: 30-September 03

Posted 16 October 2003 - 07:21 AM

try changing this %ResourceDir% variable.. ive only seen it in the luna.theme file ..mind you it works in my theme on an install.. basically i copied the luna.theme renamed it and edited it.. maybe yours needs something else ..which msstyle you using and ill grab it

Path=%ResourceDir%\Themes\Cbfield\Cbfield.msstyles

edit :: i only get the win2k style when i forget to copy the patched uxtheme.dll into a new i386 folder

#19 User is offline   b0r3d 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 821
  • Joined: 03-August 03

Posted 16 October 2003 - 07:49 AM

I've actually tried quite a few and am getting the same problem with all of them.

Could you please paste the contents of one of you working .theme files? I'll try to diagnose the difference.

#20 User is offline   Numinous 

  • Supercalafragalistic XPalidosious
  • PipPipPipPip
  • Group: Members
  • Posts: 560
  • Joined: 30-September 03

Posted 16 October 2003 - 07:52 AM

; Copyright © Microsoft Corp. 1995-2001

[Theme]
DisplayName=@themeui.dll,-2017

; My Computer
[CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon]
DefaultValue=%SystemRoot%\explorer.exe,0

; My Documents
[CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}\DefaultIcon]
DefaultValue=%SystemRoot%\SYSTEM32\mydocs.dll,0

; My Network Places
[CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\DefaultIcon]
DefaultValue=%SystemRoot%\SYSTEM32\shell32.dll,17

; Recycle Bin
[CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon]
full=%SystemRoot%\SYSTEM32\shell32.dll,32
empty=%SystemRoot%\SYSTEM32\shell32.dll,31




[Control Panel\Cursors]
Arrow=
Help=
AppStarting=
Wait=
NWPen=
No=
SizeNS=
SizeWE=
Crosshair=
IBeam=
SizeNWSE=
SizeNESW=
SizeAll=
UpArrow=
DefaultValue=Windows default
DefaultValue.MUI=@themeui.dll,-2043

[Control Panel\Desktop]
Wallpaper=%WinDir%\Web\Wallpaper\Cyberfield.jpg
Wallpaper.MUI=@themeui.dll,-2036
TileWallpaper=0
WallpaperStyle=2
Pattern=
ScreenSaveActive=0



[VisualStyles]
Path=%ResourceDir%\Themes\Cbfield\Cbfield.msstyles
ColorStyle=NormalColor
Size=NormalSize


[boot]
SCRNSAVE.EXE=


[MasterThemeSelector]
MTSM=DABJDKT
ThemeColorBPP=8


Share this topic:


  • 6 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy