So, you need to edit the HKCU, eh?

With a script? Well, that can be kind of difficult. Especially if you need to edit it for every user on the machine.

Working off of someone else’s script (see the head of the article I’m about to link), I created a script that will take care of logged in as well as logged out users’ HKCUs. Since I haven’t received permission from the original author to republish, I’m just linking the source, which includes a comment that I made with my modifications (5 posts down, under Ken Carlile)

http://community.landesk.com/support/docs/DOC-2417

As you can see, now that you’ve opened the link in another window, this script uses GOTOs. Quake in fear.

The main section looks for the logged in users, then tosses it over to modlikey for any it finds. That then does whatever you’re going to do on their user registry, which is globally accessible under HKU.

Then it searches through all the User folders (in C:\Users for WinVista and Win7, change the script to C:\Documents and Settings for XP–or use the dude’s script below mine that checks for OS!).

It then loads their ntuser.dat (ever wonder what that file was? Now you know!) in a temporary hive, at which point you can do whatever you want to it, then unloads it and goes back parses through the rest of them.

This script has worked wonders for me, especially in setting up
an extremely complicated install from Landesk with a TON of custom registry settings.

Landesk: force a full inventory scan on ip change

Landesk has a task that is installed as part of the agent that will run a miniscan when the IP address of the computer changes. Unfortunately, miniscan doesn’t work with brokerconfig, which is the place you’re most likely to get an IP change (ie, when the computer disconnects from the company VPN.) This script will remove the miniscan task and replace it with a full sync scan (a lesser scan will not change the IP address in the inventory). Make sure you replace below with… well, you know.

@ECHO OFF
"C:\Program Files\LANDesk\LDClient\localsch.exe" /del /taskid=778
"C:\Program Files\LANDesk\LDClient\localsch.exe" /exe="c:\Program Files\LANDesk\LDClient\LDIScn32.EXE" /cmd="/NTT=:5007 /S= /I=HTTP:///ldlogon/ldappl3.ldz /NOUI" /ipaddr /taskid=2778

Fix Windows Advanced Firewall for Landesk

Landesk will automatically open these ports for you when you install the agent. In the active firewall profile. Which doesn’t help you if it’s a laptop, or you accidentally install before you join the domain, or if you’re not on a domain and you change your firewall to private, etc, etc, etc. Here’s a quick and dirty script to fix it.

@echo off
netsh advfirewall firewall set rule name="LANDesk Message Service" new profile=any
netsh advfirewall firewall set rule name="LANDesk Ping Discovery Service" new profile=any
netsh advfirewall firewall set rule name="LANDesk Remote Control Agent" new profile=any
netsh advfirewall firewall set rule name="LANDesk Targeted Multicast" new profile=any
netsh advfirewall firewall set rule name="LANDesk(R) Management Agent" new profile=any
netsh advfirewall firewall set rule name="LANDesk(R) Management Agent" new profile=any

Disable common Windows auto updaters

Here’s a script that will disable auto updaters for Acrobat, Reader, and Java. This is useful in an environment where you need to control such things and don’t want phone calls from 100 users asking, “Should I click OK on this update?” every time Oracle releases another x.x.x java update.

@ECHO OFF
:: Disables common auto updaters
:: Created by Ken Carlile

::Acrobat and Reader
REG ADD "HKLM\SOFTWARE\Policies\Adobe\Acrobat Reader\8.0\FeatureLockdown" /v bUpdater /t REG_DWORD /d 00000000 /f

REG ADD "HKLM\SOFTWARE\Policies\Adobe\Adobe Acrobat\8.0\FeatureLockdown" /v bUpdater /t REG_DWORD /d 00000000 /f

REG ADD "HKLM\SOFTWARE\Policies\Adobe\Acrobat Reader\9.0\FeatureLockdown" /v bUpdater /t REG_DWORD /d 00000000 /f

REG ADD "HKLM\SOFTWARE\Policies\Adobe\Adobe Acrobat\9.0\FeatureLockdown" /v bUpdater /t REG_DWORD /d 00000000 /f

REG ADD "HKLM\SOFTWARE\Policies\Adobe\Acrobat Reader\10.0\FeatureLockdown" /v bUpdater /t REG_DWORD /d 00000000 /f

::Java
REG ADD "HKLM\SOFTWARE\JavaSoft\Java Update\Policy" /v EnableJavaUpdate /t REG_DWORD /d 00000000 /f