Tool

FixZen

Author Info

24 February 2008 - 12:55am
Submitted by: dvanmeter

tool
Reads:

2760

Score:
5
5
2
 
Comments:

1

license: 
Free for use

FixZen wil reregsiter systems on your network with ZENworks by running a wmi process that executes zwsreg -unreg and then zwsreg on a remote system. Just type in the Host name or IP address. The tool is handy for fixing machines that have had their names changed and are not updated in Zenworks.

The script is bundled into an exe but the source contents looks as such:

 '-------------------------------------------------------------------------------------------------------------------------------------------
' Fix unregistered Zen Machines
' Author Daniel VanMeter

strExe = "cmd.exe /C zwsreg -unreg && zwsreg"
strComputer = (InputBox("The FixZen utility reregisters a remote client with a Novell Zenwork Server by using the zwsreg command." & vbNewline & " " & vbNewline & "Requirements:" & vbNewline & "1. Access to WMI on remote system." & vbNewline & "2. You must be logged in locally with an account that has admin rights on the remote system." & vbNewline & "3: Zenworks is installed on the remote client." & vbNewline & " " & vbNewline & "Please enter a computer name or IP below:" ,_
"FixZen Tool: Created by Daniel VanMeter"))

If strComputer = "" Then
   wscript.quit(1)
End If

' Connect to WMI
set objWMIService = getobject("winmgmts://"_
& strComputer & "/root/cimv2") 
' Obtain the Win32_Process class of object.
Set objProcess = objWMIService.Get("Win32_Process")
Set objProgram = objProcess.Methods_( _
"Create").InParameters.SpawnInstance_
objProgram.CommandLine = strExe 

'Execute the program now at the command line.
Set strShell = objWMIService.ExecMethod( _
"Win32_Process", "Create", objProgram) 

WScript.echo "FixZen successfully run on " & strcomputer & ". The computer name may take up to a minute to appear."
WSCript.Quit 

'-------------------------------------------------------------------------------------------------------------------------------------------

AttachmentSize
FixZen_vbs.zip782 bytes
FixZen_exe.zip53 KB

Author Info

24 February 2008 - 12:55am
Submitted by: dvanmeter




User Comments

How about making this work on a group of PC's

Submitted by DarrellEddy on 29 February 2008 - 5:02pm.

Is there a way to make this work for a group of PC's like a range of IP addresses?

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <p> <a> <em> <i> <cite> <code> <img> <ul> <ol> <li> <div> <dl> <dt> <dd> <b> <strong> <h1> <h2> <h3> <pre> <table> <td> <tr> <th> <blockquote>
  • Lines and paragraphs break automatically.
  • Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: a, abbr, acronym, code, pre.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
5 + 15 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

© 2008 Novell, Inc. All Rights Reserved.