Solved

Using the WSHController Deployment method

Posted on 2006-10-31
3
312 Views
Last Modified: 2012-06-21
I need to copy the C:\windows\system32\GroupPolicy folder from the model computer and deploy that lgpo to several other XP computers.  Then I need to run the gpupdate /force on those computers.  Please provide the steps and script for this.  **I am not a scripting guy so I will need as much detail as possible to complete this task.  Thank you!!**
0
Comment
Question by:samiam41
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
royce2020 earned 500 total points
ID: 17845787
If i was doing this, assuming all the comuters are networked, I'd have two scripts, one that copys the file, and a second one that tells the remote computer to run the frist one. Note that I don't know what file you're planing on copying, I've assumed that it's been copyed to \\server\public\group.grp and is destined for the users c:\windows\system32\ folder. Also, all the computes need to have administrative WMI turned on, you can do this by including the command "netsh firewall set service RemoteAdmin enable" (without the quotes) in their login script, and turned off again with "netsh firewall set service RemoteAdmin disable".

First script, save this in \\server\public\copy.vbs (for example):

Set fs = WScript.CreateObject("Scripting.FileSystemObject")
fs.copyfile "\\server\public\group.grp" "c:\windows\system32\"

Second script, run this as a domain administrator:

Function RunRemote (strCommand,strcomputer)
      Const OverwriteExisting = True
      
      strNamespace = "root\cimv2"

      Set objWMIService = GetObject ("winmgmts:\\" & strComputer & "\" & strNamespace & ":Win32_Process")
      Error = objWMIService.Create (strCommand, null, null, intProcessID)
      RunRemote = error
End function

arrNames = array("computer1","computer2")

for i = 0 to ubound(arrNames)-1
        nme = arrNames(i)
        x = runRemote ("\\server\public\copy.vbs",nme)
next

msgbox "done"
0
 
LVL 9

Author Comment

by:samiam41
ID: 17849924
Royce-  Thanks for the script.  I will be testing this out and will let you know what I find out.  
0
 
LVL 9

Author Comment

by:samiam41
ID: 17906958
Great work.  Sorry for the delay.  I have been out with the flu.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question