Add/Remove windows componets on multiple computers autmaticaly

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have many computers with Windows XP Pro installed and I'd like to add fax
service without need to install it manually on each computer.
Computers are connected to Active Directory on 2003 server. Could anyone
point me how to do it ?
 
luke said:
I have many computers with Windows XP Pro installed and I'd like
to add fax service without need to install it manually on each
computer. Computers are connected to Active Directory on 2003
server. Could anyone point me how to do it ?
Hi,

Use sysocmgr.exe with an answer file. You can run the sysocmgr
installation e.g. in a user logon script (if the users are local
admins), or in a computer startup script.

A computer startup script (started with a GPO) runs as part of the
boot up process (before the user logs in). It runs under the system
context and has admin rights.


More about sysocmgr.exe here:
http://groups.google.co.uk/groups?selm=#[email protected]

and
http://groups.google.co.uk/group/microsoft.public.windowsxp.print_fax/msg/23543b442c4d34a4?hl=en


For the OS setup file location (to avoid the installation to ask for
the Windows XP CD if it needs some files), take a look at the end of
this post:
http://groups.google.co.uk/group/microsoft.public.windows.server.dns/msg/a071b6b0c2813131


Below is a VBScript you can use in a logon/startup script to install
the Fax Service, it will test if the service is missing on the
computer, and if it is, it will create the input file to sysocmgr.exe
on the fly, and then run sysocmgr.exe.


'--------------------8<----------------------

Const OpenAsASCII = 0
Const OverwriteIfExist = -1

Set oShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")

sFaxValue = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup" _
& "\OC Manager\Subcomponents\fax"

If RegRead(sFaxValue) <> 1 Then

' create input file for Sysocmgr.exe
sFile = "c:\faxinstall.txt"
Set fFile = oFSO.CreateTextFile _
(sFile, OverwriteIfExist, OpenAsASCII)

fFile.WriteLine "[Components]"
fFile.WriteLine "Fax=on"
fFile.Close

sCmd = "%SystemRoot%\System32\sysocmgr.exe" _
& " /i:%SystemRoot%\inf\sysoc.inf /u:c:\faxinstall.txt /q"
oShell.Run sCmd, 0, True
oFSO.DeleteFile sFile, True
End If


Function RegRead(ByVal sRegValue)
Set oShell = CreateObject("WScript.Shell")
On Error Resume Next
RegRead = oShell.RegRead(sRegValue)
' If the value does not exist, error is raised
If Err Then
RegRead = ""
Err.clear
End If
' If a value is present but uninitialized the RegRead method
' returns the input value in Win2k.
If VarType(RegRead) < vbArray Then
If RegRead = sRegValue Then
RegRead = ""
End If
End If
On Error Goto 0
End Function

'--------------------8<----------------------


WSH 5.6 documentation (local help file) can be downloaded from here
if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp
 
Back
Top