Administration Automation Part 2:

Sysocmgr is a very very cool tool if you haven’t played with it before, instead of doing a start > run > appwiz.cpl then adding windows components you can script installation of common utilities like IIS, SNMP or even disable the ever annoying Enhanced security in server 2003’s internet explorer.

Sysocmgr functions in three parts,

sysocmgr.exe, sysocmgr.inf and an answer file. The first two you can in %windir%system32sysocmgr.exe, %WINDIR%infsysoc.inf and the third file (created by yourself) can be placed anywhere you like.

So how does it work? well here basically:

Sysocmgr.exe /i:%WINDIR%infsysoc.inf /u:”servernamesharename.inf” /q /r

/q – runs Sysocmgr.exe in quiet mode (without display pages)
/r – suppresses reboot (if needed)

The above command will run the add remove programs and the commands in the name.inf will tell you it what to do.

One word of warning, you will need to have an i386 folder specified in the source paths before this can be run silently, the below reg keys run through batch will set your install path to c:i386, just make sure it exists first :)

reg delete HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSetup /v “ServicePackSourcePath” /f
reg delete HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSetup /v “Installation Sources” /f
reg delete HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSetup /v SourcePath /f
Reg add “HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSetup” /v SourcePath /t REG_SZ /d “C:” /f
Reg add “HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSetup” /v ServicePackSourcePath /t REG_SZ /d “C:” /f
Reg add “HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSetup” /v “Installation Sources” /t REG_MULTI_SZ /d “C:” /f

here are some example answer files, each one of these are seperate answer files. Dont try to combine them, it wont work.

Disable hardened IE:

[Components]
IEHardenUser=Off
IEHardenAdmin=Off

Install SNMP:

;SetupMgrTag
[NetOptionalComponents]
SNMP=1
[SNMP]
Any_Host=YES

Install IIS:

[Components]
aspnet=on
complusnetwork=on
dtcnetwork=off
bitsserverextensionsisapi=off
bitsserverextensionsmanager=off
iis_common=on
iis_ftp=off
fp_extensions=off
iis_inetmgr=on
iis_nntp=off
iis_smtp=off
iis_asp=off
iis_internetdataconnector=off
sakit_web=off
tswebclient=off
iis_serversideincludes=off
iis_webdav=off
iis_www=on
appsrv_console=on
inetprint=off

[InternetServer]
PathWWWRoot = C:InetpubWwwroot

A

Related Posts

ThinIO facts and figures, Part 3: RDS and Ram cach... Welcome back to the third instalment of this blog series focusing on our new technology ThinIO! To recap, below you will find the previous articles...
The curious case of the major XenApp outage. Here's a really strange and interesting issue I faced late last week that resulted in a few head scratching moments and late nights. An Issue began...
Viewing open files on a file server from powershel... So this is a situation you should all be aware of in an SBC / VDI environment, despite all warnings, you've redirected folders to your network drive a...

Leave a Reply