stinkywea Posted October 1, 2004 Posted October 1, 2004 Here's the situation...My company is upgrading to symantec client security 2.0. This includes SAV 9.X. Here's the problem. We have around 115 machines that run SAV 8.X and when we try to upgrade we get an error message and the installation kicks. We are doing our installs via a logon script in W2K server active directory situation. After talking with Symantec's tech support they gave me two registry keys that need deleted. So what I need to know how to do is to remotely remove registry keys via a batch file. I'll put what code I think will work. Please give me some feedback.REM == CHECKS TO SEE IF TEXT FILE HAS BEEN COPIED TO STOP LOOP OF INSTALLATIONIF EXIST c:\stop.txt GOTO ENDREM == COPIES TEXT FILE TO PREVENT INSTALLATION LOOPScopy \\be_exch_rke\software\stop.txt C:\REM == REMOVE EXISTING SYMANTEC VERSION 8.X TO ALLOW UPGRADE TO 9.X\windows\regedit.exe /D "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\497CA84818B8A04418EA464733D75B72"\windows\regedit.exe /D "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\UpgradeCodes\20A7FB42A06BB49448A397B3CB77ED4D"REM == INSTALLS SYMANTEC CLIENT SECURITY VERSION 9.0.1.1000 msiexec /fvamus "\\be_exch_rke\Software\scs201_mr1a_scf_b1007_cd4\CD4\SCSClnt\symantec client security.msi"
JaCro Posted October 1, 2004 Posted October 1, 2004 I think that you'll need to switch user (runas) at that point because users don't have rights to delete reg keys. Maybe you should also check "REG DELETE /?" because you can force deletion of reg keys without prompt.Also that errors maybe were generated because users doesn't have administrative rights on system.Also runas prompts for enter password... Try to find advanced version of runas.Maybe this hints would help you,JaCro
stinkywea Posted October 1, 2004 Author Posted October 1, 2004 if it matters the users are local administrators on their boxes. I just know you can import values silently, such as with the unattended install of xp methods, I just need a silent removal...
JaCro Posted October 1, 2004 Posted October 1, 2004 This vbscript calls RUNAS with pre-defined username, password and command. Also, as it mentioned in this script, you should use the script encoder to encode the final script.JaCro
JaCro Posted October 1, 2004 Posted October 1, 2004 Also, I had similar problems at work. REG DELETE and REG ADD was very helpful for me. Also I updated Office XP SP1 to SP3 with batch file all workstations at work (around 1000 PCs) with modified vbscript that I previously posted.JaCro
moonman Posted October 3, 2004 Posted October 3, 2004 After talking with Symantec's tech support they gave me two registry keys that need deleted. So what I need to know how to do is to remotely remove registry keys via a batch file. I'll put what code I think will work. Please give me some feedback.easy job:to import a string:REGEDIT4[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla]"CurrentVersion"="1.6"to delete a stringREGEDIT4[HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla]"CurrentVersion"=-to delete a keyREGEDIT4[-HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla]but works only with regedit4-format of reg-files.to silently use them, type:regedit /s sample.reg
stinkywea Posted October 3, 2004 Author Posted October 3, 2004 what are regedit4 reg files? I was more of a hardware guy that got threw into this...that's why some of it doesn't make too much sense to me. Could you use the code statement that I have posted above to show me the correct syntax. Thanks!!
moonman Posted October 4, 2004 Posted October 4, 2004 what are regedit4 reg files? I was more of a hardware guy that got threw into this...that's why some of it doesn't make too much sense to me. Could you use the code statement that I have posted above to show me the correct syntax. Thanks!!open up your regedit registry-editor, navigate to the appropriate key or string and choose EXPORT. switch file-type to "Win9x/NT4 Regfiles" and click SAVE.now, you've got a regedit4-file :-)the first line in these type of reg-files says always "REGEDIT4"the new w2k-type shows "Windows Registry Editor Version 5.00"don't ask me what is the difference :-))
jaclaz Posted October 4, 2004 Posted October 4, 2004 ...or you could use this nifty FREEWARE:http://www.nirsoft.net/utils/nircmd.htmlhttp://www.nirsoft.net/utils/nircmd2.html#usingregdelval regdelval [key][value] Deletes a value from the Registry. Example: regdelval "HKEY_CURRENT_USER\Software\Test" "Value1"To people who already used NirComline, this Nircmd is the new version with MUCH more features.jaclaz
stinkywea Posted October 4, 2004 Author Posted October 4, 2004 ...or you could use this nifty FREEWARE:http://www.nirsoft.net/utils/nircmd.htmlhttp://www.nirsoft.net/utils/nircmd2.html#usingregdelval regdelval [key] [value] Deletes a value from the Registry. Example: regdelval "HKEY_CURRENT_USER\Software\Test" "Value1"To people who already used NirComline, this Nircmd is the new version with MUCH more features.jaclazwill that work in a network environment with UNCs?
jaclaz Posted October 5, 2004 Posted October 5, 2004 will that work in a network environment with UNCs?No, I don't think so, but I can't see why you can't deploy the .bat file and nircmd to each station and execute it locally.All in all it is just a matter to pack 'em in a self extracting file and send it across the net.Another way is to load the HIVE remotely from your PC woth regedit32 and execute it on your PC.jaclaz
stinkywea Posted October 5, 2004 Author Posted October 5, 2004 that would be a possibility, but would I have to have each computer name listed on there? If so that would be like 115 of them.
jaclaz Posted October 6, 2004 Posted October 6, 2004 No, if you deploy the batch file, the file remains the same, but you have to execute it 115 times from 115 different computers.On the other hand, loading 115 times a hive to your registry, running the bat file, unloading the hive could be more work, but you do not move from your desktop.I would go for the first option, as it gives you a possibility, while you are actually sitting at one of the 115 to make any needed supplemental check.jaclaz
PeteDOD Posted October 15, 2004 Posted October 15, 2004 open up your regedit registry-editor, navigate to the appropriate key or string and choose EXPORT. switch file-type to "Win9x/NT4 Regfiles" and click SAVE.now, you've got a regedit4-file :-)the first line in these type of reg-files says always "REGEDIT4"the new w2k-type shows "Windows Registry Editor Version 5.00"don't ask me what is the difference :-))The difference is that the V5 file is saved in UNICODE whereas the V4 file is saved in ASCII. Makes a difference because some programs cannot handle UNICODE.
jaclaz Posted October 15, 2004 Posted October 15, 2004 I just found this tool, that could be what you need:http://hem.passagen.se/zeela/mhsoftware/apps/remreg.htmlRemote Registry 1.0 Download Register for source Copyright © 2000, 2001 Mikael Holm Remote registry is a program that can insert a .reg file into the registry of any computer in your network. You can use it in two ways, either as a command line utility or as a application with a GUI. Command line RemReg [targetcomputer]regfile If you don't specify a computer the program assumes that it is the local computer you want to use as target. If something goes wrong when the program tries to insert the .reg file it creates a logfile named after the target computer and a timestamp (i.e. MyComputer_2001-01-01_090915.log). GUI Start with RemReg without parameters. Then you get a nice little dialog that helps you to enter a computername and choose a .reg file.jaclaz
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now