Tool
5830
Problems with deploying the ZENworks Configuration Management Adaptive Agent?
This script wizard was designed to build a script that can be used to successfully deploy the ZCM Adaptive Agent in most situations when a standard deployment would probably fail. When an agent deployment fails, it normally causes IT over head to visit the workstation that failed to determine the cause of the failure and to manually install the agent. This script will help minimize visits to those workstation to perform a ZCM deployment.
Problems Encountered When Deploying Adaptive Agent:
- Simple File Sharing is enabled. In a new ZENworks environment with no Active Directory, IT would need to visit every workstation to disable Simple File Sharing to allow the ZCM server to deploy the agent to the workstation. In an existing ZENworks environment, a Group Policy would be needed (or application object) to make this change to the workstations. This means you must first wait for this change to deploy to your workstations before you can begin the Adaptive Agent deployment.
- ZENworks Asset Management and/or ZENworks Patch Management are installed onto a workstation as well as the ZfD agent. The ZCM Adaptive Agent will remove the ZfD agent, but it does not remove the ZAM or ZPM agents from the workstation. In environments that currently use ZfD, an application object is required to perform this installation. This also requires coordination of the agent removals prior to the ZCM Adaptive Agent deployment.
- Not all workstations are connected to the network when a deployment is initiated from ZCM causing IT to constantly check inventory to confirm they have gotten the agent deployed to all workstations. So if a user’s workstation is not on when the agent is deployed initially, that workstation will not get the agent when the user returns to work thus causing IT to constantly perform a discovery over a long period (typically a month) to find those workstations and get the agent deployed.
- Sometimes an environment can just be in chaos, some workstations’ users will have the proper rights to do the agent removals and install, others won't. Over time, local admin passwords can be different and not documented, so IT is unsure what the password is for a particular workstation.
- In early versions of ZCM, the updating to the current version of the Adaptive Agent on workstation does not deploy to all workstation.
- A deployment of ZCM was done with out removing ZAM or ZPM leaving those agents installed and running. This causes two inventory scanners and/or two patch management scanners to run on the workstation. The fix? Uninstall the old agent and the ZCM Adaptive Agent and reinstall the Adaptive Agent.
This script wizard solves all of these problems. The script that is built is intended to run from with in a network login script. So you can be assured that if the user logs into your network, they will more than likely be running your network login script. Since it runs from the logins script the problem with Simple File Sharing do not exist. The automated removal of the previous ZENworks agents (ZfD, ZAM, ZPM) will ensure the workstation is properly prepped before the ZCM Adaptive Agent is installed with out having to coordinate the removal. This means that IT does not have to wait for the completed processing of an application object to get started on the ZCM Adaptive Agent deployment. Users whose workstations are not turned on at the time the deployment is started will get the agent the next time they log into the network. No monitoring of the network discovery needed. The script can be built with administrator credentials to install on the workstations with users who do not have local administrator rights. The script performs version checking to ensure that the workstation has the specified version installed, if it does not, it will install it. The script that is built can also remove and reinstall the ZCM agent if needed.
Currently available features in the ZCM Script Wizard:
- The ability to enable or disable prompting of the user before beginning either the install of the uninstall.
- The ability to enable or disable messages on the workstation showing the progress of the script.
- Independent removal of the ZENworks For Desktops agent
- Independent removal of the ZENworks Asset Management agent
- Independent removal of the ZENworks Patch Management agent
- Prompt user for reboot or do not prompt user for reboot or suppress reboot.
- Deployment of the ZCM Adaptive Agent
- Removal of the ZCM Adaptive Agent
- Reinstallation of the ZCM Adaptive Agent
- Installation of the ZCM Adaptive Agent using a registration key
- The ability to remove or install software as a different user
- Local administrator password detection
- Auto Login functionality to automate beginning to end
- Error reporting to either a log file or a Syslog server
- Customization of messages presented to users.
| Attachment | Size |
|---|---|
| ZCMScriptWizard_1.0_09-09-2009.zip | 1.69 MB |
Related Articles
User Comments
Very nice tool!
Submitted by geoffc on 4 June 2009 - 5:06am.
I have not tried it yet, but reading through the docs, looks very nice!
Well done! Thanks for contributing such a useful tool!
- Login to post comments
Great job on it.
Submitted by seancane on 4 June 2009 - 8:24pm.
I just used it at a client site, and it was exactly as advertised. Really easy to use, and fixed a major problem I have been having.
Thanks for putting in the time. Simple, but really powerful.
- Login to post comments
Thank you so much
Submitted by shanedriggs on 8 June 2009 - 12:58pm.
We are about to do this and this is going to make life some much better.
- Login to post comments
Tool updated
Submitted by Provogeek on 23 July 2009 - 4:23pm.
The interface was given an over haul and a few options were moved around to more appropriate places with in the tool. This version of the script was just used to deploy to 220 workstations in a single day a couple weeks ago.
Two new features added to this version is AutoLogin and Password Discovery.
When the script removed old ZENworks agents from the PC, it can set the AutoLogin feature that will log the PC into automatically to begin the ZCM Agent install. Once the ZCM agent is installed, the AutoLogin is disabled.
One of the situations I have run into in the past when a network does not employ Active Directory so users login in with local credentials, is that the local administrator password is not always the same. So the script can take 10 passwords you provide and test each one to figure out which one is the correct password.
I have also added a couple requests made by the community. Like reboot suppression, message preview, prompt on install, and disabling of the OS checking.
- Login to post comments
Error
Submitted by frichi on 26 July 2009 - 7:09pm.
We trying to run this utility, but we receive the error "Line -1 Error: Variable used without being declared"
- Login to post comments
Problem found
Submitted by Provogeek on 27 July 2009 - 9:29am.
Seem the problem is a typo in the Authentication function. When I merged the customized script from my last deployment, there were some changes to the variable names used, I'll get this fixed and tested in the next couple of days.
- Login to post comments
autologin feature
Submitted by egarcia on 3 August 2009 - 1:03pm.
It doesn't seem to autologin after removing the ZfD agent. How do you set the autologin feature?
- Login to post comments
Download updated version
Submitted by Provogeek on 3 August 2009 - 2:56pm.
There was a bug in the previous update that was related to the AutoLogin function. This has been fixed and an update was posted today.
- Login to post comments
Updated
Submitted by Provogeek on 3 August 2009 - 2:55pm.
The tool has been updated today, you can download it at http://www.novell.com/communities/files/ZCMScriptW...
The problem folks were encountering was due to an issue in the base script. A customer request had me add the auto login function earlier than I had planned. So as to not mess up my code base, I used a customized branch for this customer. Well, not being a full time programmer and not having much of a method for tracking code changes, I goofed up when I merged the new functions into the script. There were changes in the names of variables, and I did not update those changes properly in the public code. So I have been spending the past week sifting through the code and making sure all the variable names match up and have been running various tests to ensure I post a working script this time.
- Login to post comments
error building script
Submitted by egarcia on 12 August 2009 - 7:37pm.
I just downloaded the new version. I'm getting this error when I build the script:
Aut2Exe error
Error changing icon: Unable to read icon or icon was of the wrong format.
- Login to post comments
quick fix
Submitted by Provogeek on 13 August 2009 - 11:10am.
Sounds like you downloaded a previous version, to get around this error you will need to delete the directory I use for script building. The directory is located in %USERPROFILE%\Application Data\ and is named ZScptWiz . Delete this whole directory and try building a script again.
The reason this is happening, is that the EULA portion of the script only runs if it does not find the EULA text files, doesn't look for any other file. If it finds the EULA text files, then it skips the EULA pop up windows and proceeds to the script, since it is assumed you have seen and read the EULAs already. If the script does not find the EULA text files, it will then present you with the AutoIT EULA and the KIS EULA. Once accepted, the AutoIT and the needed support files are extracted from the distribution executable. This is the only place the support files are extracted. So if you have already seen and accepted the EULA, the files are not being extracted.
I made a minor change in the current version, and that was adding and icon graphic to the compiled script. Wanted to have something other than the default AutoIT icon. That icon file was not in the previous version. So since a previous version was run on your PC, and the script finds the EULA text files, the ico file being used when compiling is not being extracted.
Thank you for the heads up on this, didn't think about this problem in my testing. I'll code in additional checks to ensure needed files are in place and are correct version in the next rev of the tool.
- Login to post comments
Error removing agent using a script
Submitted by Lesnikovr on 19 August 2009 - 3:05am.
When I executed a script I received an error "Unable to remove ZENworks application ZENworks Remote Management" in a log file.
After that uninstallation of the agent was aborted. What can I do to correct this?
When I tried to install the agent using this script on a computer with no agent - the scirpt was not executed. I don't understand why. Please help. The computers are in a domain, the user is an admin on that macine.
- Login to post comments
There are some problems in the ZCM agent removal
Submitted by Provogeek on 19 August 2009 - 9:47am.
It sounds like the removal you are attempting is the removal of the ZCM agent, not the ZfD agents. I have recognized there to be some problems with 10.1 and 10.2 and I am currently working on getting the removal to be compatible with these versions (ZCM forums has a solution for a >BAT file execution I have not yet had the time to incorporate into my script). The current removal routine was built and tested with 10.0 only.
On the installation problem, are any errors produced in the log file?
Are you using the same script to install the agent on a clean PC as the one you are doing the uninstall? In order to install on a clean PC, you would need to compile a different script. Using a single script to cover both workstations you want to replace the agent and workstations you want to install new currently will not work. When a script that is setup to do a removal runs on a PC that does not have the agent, it will simply abort since it finds nothing to do and will never set the registry key needed to move to the install of the agent.
When a script is built to do an install only, the script looks to see that no removals were chosen and auto sets the Track value to what is needed to do the install.
Also, you can look in HKLM\Software\Novell\Distro for the key named Track. if the value is set to 1, the agent should be installed, if it is set to 2, the install will abort thinking the install already completed.
- Login to post comments
RE: There are some problems in the ZCM agent removal
Submitted by Lesnikovr on 19 August 2009 - 3:07pm.
Please, continue work with improving removal process for 10.1 and 10.2 agents!
When the script aborted in my situation no errors was written to log file. Now I made the script to work and today have some wishes.
I would like the script to save configuration settings for future use it.
My situation is the following. I deployed the agents to workstations and then embedded database crashed. I had to re-install sever to another platform with external database and the problem was how to re-assign the workstations to a new server remotely. I wanted to unregister, update ceritificates and then register the workstations but using NDS login script without admin rights failed. Now I'm testing your solution and I hope it will help me to solve the problem/
And the last question: If the agent already exists on the machine and assigned to the new server does the script remove and re-install it? How can I make it to uninstall only ZCM Agent on those workstations which assigned to old sever with wrong certificate and IP-address?
Thank you for your answers
- Login to post comments
Any luck getting this to work with 10.2 yet?
Submitted by dpogue on 9 September 2009 - 2:32pm.
Hi, I was just curious if anyone has got this to work with 10.2 yet. We have a similar situation as above, where our server crashed and the database blew up. We're reinstalling, but manually reinstalling on 4000 machines just is taking forever. I really like what this tool has to offer, I just am unable to get it to work with 10.2. It uninstalls everything but leaves the ZEN Pre Agent service, which then hangs the re-install of the agent.
Thanks for your efforts.
- Login to post comments
Other options should be used when addressing server failures.
Submitted by Provogeek on 9 September 2009 - 4:31pm.
I had some time today to address the uninstall function of my script. Since none of the MSI uninstalls remove the pre-agent, I simply remove the service after uninstall (similar to the BAT file found in the Novell forums). So the uninstall works now as expected. An update to the script has been tested to verify the uninstall/reinstall function works.
I do need to note however, that the intention of the uninstall/reinstall routine were built for two reasons. First being the undesirable event of removing ZCM from a network with out the intention of putting it back. The second being an agent that was not install properly or had a failed install that a normal add/remove could not correct.
The script should not be used for the purpose of changing a workstation's zone (even thought it technically can be used this way). The process of adding a workstation to a new zone in the event of a zones primary CA server crashing should be done using the zac tools that come with the agent. TID 7000620 has excellent instructions on how to move a workstation to a new zone. The reason I suggest people use the method in the TID is that it takes 10 seconds, no reboot on the workstation, no interruption of the user (must be done in login script). Using my deployment script to accomplish this will take 15 - 30min and require a reboot.
- Login to post comments








17