Solved

Using the WSHController Deployment method

Posted on 2006-10-31
3
304 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
  • 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now