Novell Home

Handling the ZISWIN Ignore Registry Value

Novell Cool Solutions: Trench
By Rudolf Thilo

Digg This - Slashdot This

Posted: 21 Apr 2005
 

"This is a very neat piece of coding: works nicely!"
--Shaun Pond, ZENworks Product Specialist

For your convenience, here is a script file which sets the "unsupported" registry values described in TID 10081392. This is a CMD script file using Windows XP "onboard functionality", so you will be able to modify it for your purposes easily.

Note: This is DOS text copy-pasted from NOTEPAD.EXE, so to make it the same ZWIGNOR2.CMD, please just save the other way round through notepad.exe.

--------- zwignor2.cmd ------------------------
@echo off
echo ?? 0.0.9  - Handle ZISWIN ignore Registry Value ?????????????????????????????
echo ? Script for Windows XP (using "set /a" for calculations and "reg.exe")      ?
echo ? Q^&D CMD script, to set the *unsupported* Registry Values described         ?
echo ? for "ZISWIN Do Not Restore Mask" in Novell Knowledgebase in TID 10081392   ?
echo ? http://support.novell.com/cgi-bin/search/searchtid.cgi?/10081392.htm       ?
echo ?                  !!! USE AT YOUR OWN RISK !!!                              ?
echo ??????????????????????????????????????????????????????? r.thilo@gapo.de ??????

if "%2"=="/clear" goto CLEAR

if not exist zwignore.txt (
 ECHO REM to change a value so it will not be touched add "LeaveAsIs" in its line >>zwignore.txt
 ECHO Workstation Distinguished Name                                              >>zwignore.txt
 ECHO Workstation Tree                                                            >>zwignore.txt
 ECHO NetBios Name                                                                >>zwignore.txt
 ECHO Workgroup                                                                   >>zwignore.txt
 ECHO IP address                                                                  >>zwignore.txt
 ECHO SID LeaveAsIs                                                               >>zwignore.txt
 ECHO DNS                                                                         >>zwignore.txt
 ECHO Workstation ID                                                              >>zwignore.txt
 echo new zwignore.txt created. Edit to alter behaviour of ZISWIN!
 ) else (
 echo zwignore.txt found...
 )

set /a zwignore=0x0
set NextField=Workstation Distinguished Name
set /a NextHex=0x1
set /a return=1
goto calculate
:RETURN1

set NextField=Workstation Tree
set /a NextHex=0x2
set /a return=%return%+1
goto calculate
:RETURN2


set NextField=NetBios Name
set /a NextHex=0x4
set /a return=%return%+1
goto calculate
:RETURN3


set NextField=Workgroup
set /a NextHex=0x8
set /a return=%return%+1
goto calculate
:RETURN4


set NextField=IP address
set /a NextHex=0x10
set /a return=%return%+1
goto calculate
:RETURN5


set NextField=SID
set /a NextHex=0x20
set /a return=%return%+1
goto calculate
:RETURN6


set NextField=DNS
set NextHex=x00000100
set /a return=%return%+1
goto calculate
:RETURN7


set NextField=Workstation ID
set NextHex=0x00000200
set /a return=%return%+1
goto calculate
:RETURN8

if %zwignore%==0 goto CLEAR

if x%1==x/quiet (
 REG ADD ^"HKLM\software\Novell\ZENworks^" /v ^"ZISWIN Do Not Restore Mask^" /t REG_DWORD /d %zwignore% /f > zwig-reg.cmd
 echo REG ADD ^"HKLM\software\Novell\ZENworks^" /v ^"ZISWIN Do Not Restore Mask^" /t REG_DWORD /d %zwignore% /f > c:\zwig-reg.cmd
 echo You can use ZWIG-REG.CMD to directly set that value on other PCs.
 ) else (
 echo REG ADD ^"HKLM\software\Novell\ZENworks^" /v ^"ZISWIN Do Not Restore Mask^" /t REG_DWORD /d %zwignore% /f > zwig-reg.cmd
 echo ?????????????????????????????????????????????????????????????????????????????
 echo ? Use "ZWIG-REG.CMD" to import values above to the Registry. ^(other PC's too^)?
 echo ? Use " /quiet" as command line switch to directly set registry value.       ?
 echo ? Use " /clear" as command line switch to delete Regisry Value ^(Default^)     ?
 echo ? Edit zwignore.txt to modify the informations ZISWIN should leave untouched.?
 echo ? If you delete zwignore.txt, a new one will be created only preserving SID. ?
 echo ??????????????????????????????????????????????????????????????????????????????
 )

goto END

:CLEAR
echo Nothing to be left untouched. Preparing to delete REG value (restore defaults)
if x%1==x/quiet (
 REG DELETE ^"HKLM\software\Novell\ZENworks^" /v ^"ZISWIN Do Not Restore Mask^" /f
 echo DELETE ADD ^"HKLM\software\Novell\ZENworks^" /v ^"ZISWIN Do Not Restore Mask^" /f > c:\zwig-del.cmd
 echo You can use ZWIG-DEL.CMD to directly delete KEY ^(restore defaults^) on other PCs.
 ) else (
 echo DELETE ADD ^"HKLM\software\Novell\ZENworks^" /v ^"ZISWIN Do Not Restore Mask^" /f > zwig-del.cmd
 echo ?????????????????????????????????????????????????????????????????????????????
 echo ? Use "ZWIG-DEL.CMD" to delete the modifying REG value.   ^(restore defaults^) ?
 echo ? Use "/quiet /clear" as command line switch to directly del registry value. ?
 echo ? Edit zwignore.txt to modify the informations ZISWIN should leave untouched.?
 echo ? If you delete zwignore.txt, a new one will be created only preserving SID. ?
 echo ??????????????????????????????????????????????????????????????????????????????
 )

goto END

:CALCULATE
find /i "%NextField%"NUL
if not errorlevel 1 (
 set /a zwignore=%zwignore% + %NextHex%
 echo *DON'T TOUCH*: "%nextfield%"
 ) else (
 echo   ^(default^)  : "%nextfield%"
 )
goto RETURN%return%

:END
----------- zwignor2.cmd ---------------------


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell