VS2k5 Unattended#
W sumie instalacja nienadzorowana jest całkiem dobrze opisana. A więc mamy dwa tryby takiej instalacji:

a) Response File

Odpalamy setup za pomocą Setup/setup.exe /CreateUnattend="c:\unattned.inf" I torzymy plik z odpowiedzią. Cały proces jest prosty i przyjemny, posiada tylko pare drobnych wad.
Po pierwsze, instaluję całe VS łącznie ze wszystkimi wymaganymi bibliotekami, nawet jeśli biblioteki są juz zainstalowane. Co w przypadku .Net Frameworka zabiera juz ok.10min, a cały proces instalacji wydluza o ok.20.
Po drugie, nie nadaję się do upgradów. Przy zainstalowanym wcześniej VS np. przez instalacje SQL Servera 2k5, instalator stwierdzi ze VS jest juz zainstalowane i pominie ten krok.

b) Transform

Odpalamy setup za pomocą Setup/setup.exe /CreateUnattend="c:\unattned.inf" . I tu wielka, gigantyczna uwaga: pliki setupu(a dokładniej .msi) nie mogą być read-only!! Trzeba usunąć atrybut tylko-do-odczytu, bo inaczej instalacja zawodzi.
Jak na razie nie testowałem jeszcze instalacji z wykorzystaniem transform, gdyz nie wiedziałem o powyrzszej uwadzę.

Oczywiście przy instalacji z transform musimy wcześniej doinstalować komponenty tj. MSXML, Dexplore, czy .Net framewok. Microsoft radzi uzywać instalek znajdujących się w katalogu wcu. W większości są to spakowane archiwa, które przy instalacji rozpakowują się na dysk lokalny i dopiero z niego są instalowane. Przy szybkiej sieci, gdy nie zalezy nam na wydajności łącza, mozemy je rozpakować i odpalić tylko same instalki. W normalnych warunkach zaoszczędza nam to ok. 10min.
Przykładowy plik cmd do instalki z rozpakowanych archiwów:

WindowsInstaller-KB893803-v2-x86.exe /passive /norestart

msxml6.msi /qr REBOOT=RS

dotnetfx\install.exe /qb

DExplore\install.exe /qb

jsredist\install.exe /qb

Thursday, March 02, 2006 11:00:27 PM (Central European Standard Time, UTC+01:00) #    Comments [0]  |  Trackback

 

Autologon i RunOnceEx#

Skrypty które automatycznie logują się na dany komputer i odpalają dany program moga stworzyć prosty system instalacji oprogramowania. Taki przykładowy skrypt to:

@ECHO OFF

REM Setting Autologon

REG ADD "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultDomainName" /t REG_SZ /d "PJWSTK" /f
REG ADD "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultUserName" /t REG_SZ /d "Admin_Name" /f
REG ADD "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultPassword" /t REG_SZ /d "Admin_Password" /f
REG ADD "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AutoAdminLogon" /t REG_SZ /d 1 /f
REG ADD "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AutoLogonCount" /t REG_SZ /d 1 /f
REG ADD "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "ForceAutoLogon" /t REG_SZ /d 1 /f
REG ADD "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "CachePrimaryDomain" /t REG_SZ /d "PJWSTK" /f
REG ADD "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AltDefaultUserName" /t REG_SZ /d "pkrzysz" /f
REG ADD "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AltDefaultDomainName" /t REG_SZ /d "PJWSTK" /f
REG ADD "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DontDisplayLastUserName" /t REG_SZ /d "0" /f
REG ADD "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DomainCache" /v "PJWSTK" /t REG_SZ /d "pjwstk.edu.pl" /f

REM Setting Autostart

REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx" /t REG_SZ /v Title /d "Installing Additional Software" /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx" /t REG_DWORD /v Flags /d 306 /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install01" /t REG_SZ /v "" /d "Preparing install" /f
rem REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install01" /t REG_SZ /v 1 /d "rundll32.exe user32.dll, LockWorkStation " /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install01" /t REG_SZ /v 2 /d "fsutil quota modify c: 80000000000 80000000000 PJWSTK\pkrzysz" /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install01" /t REG_SZ /v 3 /d "fsutil quota modify c: 80000000000 80000000000 PJWSTK\risasi" /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install01" /t REG_SZ /v 4 /d "fsutil quota disable d:" /f

REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install02" /t REG_SZ /v "" /d "Installing..." /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install02" /t REG_SZ /v 1 /d "echo ." /f

REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install03" /t REG_SZ /v "" /d "Cleaning Registry..." /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install03" /t REG_SZ /v 1 /d "reg.exe add """HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon""" /v """DefaultDomainName""" /t REG_SZ /d """PJWSTK""" /f" /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install03" /t REG_SZ /v 2 /d "reg.exe add """HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon""" /v """AutoAdminLogon""" /t REG_SZ /d """0""" /f" /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install03" /t REG_SZ /v 3 /d "reg.exe add """HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon""" /v """AutoLogonCount""" /t REG_SZ /d """0""" /f" /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install03" /t REG_SZ /v 4 /d "REG.exe DELETE """HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon""" /v """DefaultUserName""" /f" /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install03" /t REG_SZ /v 5 /d "REG.exe DELETE """HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon""" /v """DefaultPassword""" /f" /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install03" /t REG_SZ /v 6 /d "REG.exe DELETE """HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon""" /v """ForceAutoLogon""" /f" /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install03" /t REG_SZ /v 7 /d "rEG.exe DELETE """HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon""" /v """DontDisplayLastUserName""" /f" /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install03" /t REG_SZ /v 8 /d "REG.exe DELETE """HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run""" /v """afterreboot""" /f" /f

REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install04" /t REG_SZ /v "" /d "Rebooting..." /f
REG ADD "\\%1\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\install04" /t REG_SZ /v 1 /d "shutdown -r -t 0 -f" /f


shutdown -r -f -t 0 -m \\%1

Wednesday, March 01, 2006 1:53:18 PM (Central European Standard Time, UTC+01:00) #    Comments [0]  |  Trackback

 

All content © 2010, Krzysztof Pietrzak
On this page
This site
Calendar
<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910
Archives
Sitemap
Blogroll OPML
  Tokyo by night
blog WiTa
  W-Files
blog n€x¤Ra
 .:fotoblog:.
blog Kfaza
 \\archon\blog$
blog archona
 Czasowstrzymywacz
Blog Fookyego
 Jog Pstryka
Jog Pstryka
 Mac OS X vs. Active Directory
techniczny blog kfaza

Maps
Locations of visitors to this page