Ref: http://www.robvanderwoude.com/index.html
Ref: http://www.robvanderwoude.com/regedit.html
I had to call Tech Support about my new HP computer and, after about 30 minutes of frustration, was told I would have to do a System Recovery. I got a case number and hung up so I could back up my system to another networked computer.
When I called today and talked to another technician, he talked me through a Registry change that solved the problem. He wasn't aware that you could create an ASCII text file that would do the same thing when run, so I told him I would find out how to do so and let him know.
The information is too good to keep hidden but PLEASE only try this if you know what you are doing as the entries will be different from one OS to another and may even be different from one version of an OS to a different version.
You must create an ASCII text file using any pure ASCII text editor like NotePad but save it with a .reg extension. More information below from the above referenced website.
Removing registry entries
To remove an entire "tree" from the registry using REGEDIT and a .REG file, just add a minus sign before the tree name:
REGEDIT4
[-HKEY_CURRENT_USER\DummyTree]
will remove the entire tree "DummyTree".
To remove an individual item from the registry, place the minus sign after the equal sign:
REGEDIT4
[HKEY_CURRENT_USER\DummyTree]
"ValueToBeRemoved"=-
will remove the individual value "ValueToBeRemoved" from "DummyTree".
This is demonstrated in the uniqueid.bat example below, a batch file that forces a new LANDesk agent ID.
More info can be found at Regedit.com's Registry FAQ.
How to remove an individual registry key or value using *.INF files and RUNDLL is explained here by Bill James.
NT 4 users who own a copy of the NT 4 Resource Kit can also use REG.EXE to remove registry entries.
In Windows 2000 and later REG.EXE is a native tool.
===========================
uniquid.bat
- Code: Select all
@ECHO OFF
:: No command line parameters required
IF NOT "%1"=="" GOTO Syntax
:: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
:: Adjust the LANDesk server name and the drive and directory if necessary ::
:: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
SET LANDeskServer=MyLDServer
C:
CD\LDClient
ECHO Removing old LANDesk agent ID
:: Delete old ID file (adjust drive if necessary)
IF EXIST C:\LDIScan.cfg ATTRIB -h -r -s C:\LDIScan.cfg
IF EXIST C:\LDIScan.cfg DEL C:\LDIScan.cfg
:: Delete old ID from the registry (Local Machine)
:: Create a temporary REG file
> %TEMP%.\UniqueID.reg ECHO REGEDIT4
>>%TEMP%.\UniqueID.reg ECHO.
>>%TEMP%.\UniqueID.reg ECHO [HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\Common Api]
>>%TEMP%.\UniqueID.reg ECHO "UniqueID"=-
>>%TEMP%.\UniqueID.reg ECHO.
:: Check if previous ID was stored for Current User and if so, delete it
IF EXIST %TEMP%.\_Unique_.REG DEL %TEMP%.\_Unique_.REG
REGEDIT /E %TEMP%.\_Unique_.REG "HKEY_CURRENT_USER\SOFTWARE\Intel\LANDesk\LDWM\LDIScan32"
TYPE %TEMP%.\_Unique_.REG | FIND /I "Last Device ID" >NUL 2>&1
IF ERRORLEVEL 1 GOTO Next
>>%TEMP%.\UniqueID.reg ECHO [HKEY_CURRENT_USER\SOFTWARE\Intel\LANDesk\LDWM\LDIScan32]
>>%TEMP%.\UniqueID.reg ECHO "Last Device ID"=-
>>%TEMP%.\UniqueID.reg ECHO.
:: Repeat for Default User
:Next
IF EXIST %TEMP%.\_Unique_.REG DEL %TEMP%.\_Unique_.REG
REGEDIT /E %TEMP%.\_Unique_.REG "HKEY_USERS\.Default\SOFTWARE\Intel\LANDesk\LDWM\LDIScan32"
TYPE %TEMP%.\_Unique_.REG | FIND /I "Last Device ID" >NUL 2>&1
IF ERRORLEVEL 1 GOTO Merge
DEL %TEMP%.\_Unique_.REG
>>%TEMP%.\UniqueID.reg ECHO [HKEY_USERS\.Default\SOFTWARE\Intel\LANDesk\LDWM\LDIScan32]
>>%TEMP%.\UniqueID.reg ECHO "Last Device ID"=-
>>%TEMP%.\UniqueID.reg ECHO.
:: Merge (import) the REG file to delete the UniqueID entry
:Merge
REGEDIT /S %TEMP%.\UniqueID.reg
:: Delete the temporary REG file
DEL %TEMP%.\UniqueID.reg
ECHO Creating new LANDesk agent ID
:: Start inventory scan to create new ID
LDISCN32.EXE /NTT=%LANDeskServer%:5007 /S="%LANDeskServer%" /I=\\%LANDeskServer%\LDLOGON\ldappl.ini /V
ECHO Done
IF EXIST %TEMP%.\_Unique_.REG DEL %TEMP%.\_Unique_.REG
SET LANDeskServer=
CD\
GOTO End
:Syntax
ECHO UniqueID.bat, Version 2.00 for 32-bit Windows
ECHO Create a new unique ID for Intel LANDesk agent
ECHO.
ECHO If a computer is installed using a harddisk image (like Norton Ghost
ECHO or PowerQuest's Drive Image) all "clones" will have the same LANDesk
ECHO agent ID if LANDesk agent was installed when the image was created.
ECHO However, the LANDesk agent needs a unique ID to function properly.
ECHO You can force a new ID by reinstalling the LANDesk agent software,
ECHO but running this batch file can force a new unique ID just as well.
ECHO.
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com
:End