Cool Solutions



February 24, 2008 12:55 am





Free for use

Download FixZen

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
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_( _
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."


0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.

Categories: Uncategorized

Disclaimer: This content is not supported by Micro Focus. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

1 Comment

  1. By:DarrellEddy

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