Re: Add/Remove windows componets on multiple computers autmaticaly



luke wrote:

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=%23UR5Hri%24EHA.2984%40TK2MSFTNGP09.phx.gbl

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


-- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter/default.mspx .



Relevant Pages

  • Re: scripting patch installation
    ... what i want is for it to just install the ... > patch if that registry value is non existant. ... If you want a script that also can handle different OS version and Service pack ... Below is an updated version of your script that uses the function RegRead to ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Software Install script
    ... Thanks for your response. ... I tried the script you provided and it ran ... > admin rights to be able to install software in the logon script. ... > ' If a value is present but uninitialized the RegRead method ...
    (microsoft.public.windows.server.scripting)
  • Re: Deploying Office 07 with Group Policy
    ... computer I tested it on took 30 minutes to install. ... the following script to the Computer Startup Script. ... REM Get ProductName from the Office product's core Setup.xml file. ... REM Set ConfigFile to the configuration file to be used for deployment REM ...
    (microsoft.public.office.setup)
  • Re: [opensuse] Editting PATH variable
    ... SuSEconfig script ... ... not knowing what you options you used to install ... If your unfamiliar with Bash a good book is 'Learning the Bash Shell' by ... For Java use editing the PATH variable is NOT required... ...
    (SuSE)
  • Re: KB911280 update problem
    ... Microsoft is working on an amended patch which will address this issue. ... Microsoft advises anyone affected by this to not install the patch and to ... That script is broken by the patch. ... He said he could not write a bug report ...
    (microsoft.public.windowsupdate)

Quantcast