Questiosn using SYSOCMGR.

W

Ward Horsfall

Hi,

I am wondering if anybody can give me some advice I am trying to create an
automated
procedure that will install IIS on Windows 2000 servers that have already
been installed.
IIS is not installed on them by default. Sorry for the length of this post -
only way of getting
the details across.

I have found the following article:

How to Add or Remove Windows Components with Sysocmgr.exe
http://support.microsoft.com/default.aspx?scid=kb;en-us;222444

Essentially you run a command like:

sysocmgr /i: %windir%\inf\sysoc.inf /u:c:\ocm.txt

I would like to add an option to this that tells where to source the I386
files from or put something
in either the iis.txt file or the sysoc.inf file. The problem is I get
promped for the windows CD unless
I screw around with the registry as specified below. Can it be done with
making a change to the files
I listed above or am I stuck with changing the registry key around.

Thanks in advance,

Ward.

*******************************************************

Here is what I did below a messy work around - (install_iis.vbs uses
iis.txt):


iis.txt file : ------------------------------------

[components]

iis_common = On
iis_doc = On
iis_ftp = Off
iis_htmla = On
iis_inetmgr = On
iis_nntp = Off
iis_nntp_docs = Off
iis_smtp = On
iis_smtp_docs = On
iis_www = On

-------------------------------------------------------------------

install_iis.vbs : --------------------------------------------------

' ------------------------------------------------------------------
' install_iis.vbs:
'
' Reference:
'
' How to Add or Remove Windows Components with Sysocmgr.exe
' http://support.microsoft.com/default.aspx?scid=kb;en-us;222444
'
' ------------------------------------------------------------------

dim save1 ' Save values of install locations
dim save2 ' Save values of install locations

dim install_command

dim i386_path ' Path to i386 files.

Set WshShell = WScript.CreateObject("WScript.Shell")

' Get the current registry key settings for I386 files - save for later.

save1 =
WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sourc
ePath")
save2 =
WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Servi
cePackSourcePath")

i386_path = "\\SRV1\PC_SOURCE" ' Server location for I386 files.

' Reset location for I386 files.

WshShell.RegWrite
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SourcePath",i386_path
WshShell.RegWrite
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\ServicePackSourcePath"
,i386_path

install_command = "sysocmgr /i:" + chr(34) +
WshShell.ExpandEnvironmentStrings("%windir%")+ "\inf\sysoc.inf" + chr(34) +
" "
install_command = install_command + "/u:" + chr(34) + i386_path + "\iis.txt"
+ chr(34) + " /q"

run_cmd install_command,true ' Configure IIS.

' Set registry keys back to what they were before.

WshShell.RegWrite
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SourcePath",save1
WshShell.RegWrite
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\ServicePackSourcePath"
,save2

wscript.quit

' -----------------------------------------------------------------
' run_cmd: Run external command.
' -----------------------------------------------------------------
sub run_cmd (cmd,flag)

dim oShell
set oShell = Wscript.CreateObject("WScript.shell")
oShell.Run cmd,0,flag

end sub
 
E

Elijah Landreth [MSFT]

Technet is the place to be!
Give this site a shot for sysocmgr answer file options
http://www.microsoft.com/resources/documentation/IIS/6/all/techref/en-us/iis
RG_UNI_1.mspx


Elijah Landreth [MSFT]
Microsoft Server Setup Team

Search our Knowledge Base at http://support.microsoft.com/directory
Visit the Windows 2000 Homepage at
http://www.microsoft.com/windows2000/default.asp
See the Windows NT Homepage at http://www.microsoft.com/ntserver/

NOTE: Please reply to the newsgroup and not directly to me. This allows
others to add to and benefit from these threads and also helps to ensure a
more timely response. Thank you!

This posting is provided "AS IS" without warranty either expressed or
implied, including, but not limited to, the implied warranties of
merchantability or fitness for a particular purpose.
The views and opinions expressed in this newsgroup posting are mine and do
not necessarily express or reflect the views and / or opinions of
Microsoft.
or opinions of Microsoft.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top