Computer Hope

Microsoft => Microsoft DOS => Topic started by: metal_man77 on February 02, 2012, 11:35:03 AM

Title: modifiying the windows regestry
Post by: metal_man77 on February 02, 2012, 11:35:03 AM
I'm attempting to modify this GUID key with the REG command.

[HKEY_LOCAL_MACHINE\SOFTWARE\Novell\ZCM\PreAgent]
"Guid"="71781f5d31cb454a9ae1307f99dee53e"

I've tried delete, unload and add....
(reg unload HKEY_LOCAL_MACHINE\SOFTWARE\Novell\ZCM\PreAgent "Guid"="" )

no luck

some help would be much appreciated ;)
Title: Re: modifiying the windows regestry
Post by: Raven19528 on February 02, 2012, 01:54:28 PM
Most of the time, I don't like to see registry editing done via batch. It raises a lot of "why?'s" when I see it. A few things that I do feel I can help point you too though are:

1. Try getting in the habit of using HKLM and the other provided short names for registry editing. It's less typing, and in my experience works a little better when you are dealing with server/client setups.

2. Have you used the reg delete /?, reg unload /?, and reg add /? commands at the cmd prompt. All will give you good information about syntax and usage (which btw, why are you using unload when you are only trying to edit a single key??)

3. When editing one key, reg delete/add works fine. But when editing multiple keys, get in the habit of setting up .reg files and using reg import. It allows for much better continuity from start to finish, and lessens the chances of corrupting your registry. (If you are looking for an example of how a .reg file should look, try doing a reg export on a known key and reverse engineer from there)

Again, talking about editing registry entries does not give me a warm fuzzy feeling, because I have seen way too often how easily someone who knows just enough to get them in trouble can corrupt their registry and need to completely reload a system. Good luck.
Title: Re: modifiying the windows regestry
Post by: metal_man77 on February 03, 2012, 06:58:49 AM
Hi

I've tried the reg unload add and the likes with /? but it does'nt give much infos...

I want to erase the "GUID" beacause Zenworks is bugged and it needs to have a little cleanup ;)

I work for two hospitals in Quebec city and Novell Zenworks is pushing all the apps the employees need for work :)

this is what I've tried with add and delete :

C:\Documents and Settings\ssimartf>reg add [HKEY_LOCAL_MACHINE\SOFTWARE\Novell\Z
CM\PreAgent] "Guid"=""

Erreur : Invalid key name

C:\Documents and Settings\ssimartf>reg add HKEY_LOCAL_MACHINE\SOFTWARE\Novell\ZC
M\PreAgent "Guid"=""

Erreur : too many command-line parameters

C:\Documents and Settings\ssimartf>reg delete HKLM\SOFTWARE\Novell\ZCM\PreAgent
 "Guid"=""

Erreur : too many command-line parameters

C:\Documents and Settings\ssimartf>reg delete HKLM\SOFTWARE\Novell\ZCM\PreAgent
/va "Guid"=""

Erreur : too many command-line parameters

C:\Documents and Settings\ssimartf>reg delete HKLM\SOFTWARE\Novell\ZCM\PreAgent
/ve "Guid"=""

Erreur : too many command-line parameters
Title: Re: modifiying the windows regestry
Post by: metal_man77 on February 03, 2012, 09:22:04 AM
Code: [Select]
@echo off
if exist C:\Zenworks\InventoryDelta.xml (
rmdir /s /q C:\Zenworks
del "C:\WINDOWS\novell\zenworks\bin\ZENPreAgent.exe.cfg.state"
del "C:\Program Files\Novell\ZENworks\conf\DeviceData.*"
del "C:\Program Files\Novell\ZENworks\conf\DeviceGuid.*"
del "C:\Program Files\Novell\ZENworks\conf\initial-web-service.*"
reg delete HKLM\SOFTWARE\Novell\Zenworks /va /f
reg reg add HKLM\SOFTWARE\Novell\ZCM\PreAgent /v GUID /d """" /f
goto end
else (
del "C:\WINDOWS\novell\zenworks\bin\ZENPreAgent.exe.cfg.state"
del "C:\Program Files\Novell\ZENworks\conf\DeviceData.*"
del "C:\Program Files\Novell\ZENworks\conf\DeviceGuid.*"
del "C:\Program Files\Novell\ZENworks\conf\initial-web-service.*"
reg delete HKLM\SOFTWARE\Novell\Zenworks /va /f
reg reg add HKLM\SOFTWARE\Novell\ZCM\PreAgent /v GUID /d """" /f
goto end
)
if exist "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v GinaDLL (
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v GinaDLL /f
goto end
)
else (
goto end
)
:end
exit

now it sais "else" is'nt recognized.....
Title: Re: modifiying the windows regestry
Post by: metal_man77 on February 03, 2012, 09:43:21 AM
foud out that "else must be putted like this :

Code: [Select]
IF EXIST filename. (
del filename.
) ELSE (
echo filename. missing.
)