Archived
1
0

+ added RegDeleteX() to also delete empty parental registry branches

* raised version to 2.3
(Issue: 24)
This commit is contained in:
mbirth 2007-10-05 18:10:14 +00:00
parent 3c09fbb893
commit a7fa6a6932
4 changed files with 40 additions and 15 deletions

View File

@ -295,7 +295,7 @@ If (KeepSettings = "0" or RevertSettings = "1")
Progress % StepsPos*StepsStep+StepsStep*(A_Index-1)/regbak0, Removing registry settings #%A_Index% from host ...
CurBranch := regbak%A_Index%
SplitFirst(RegRoot, RegSub, CurBranch, "\")
RegDelete %RegRoot%, %RegSub%
RegDeleteX(RegRoot, RegSub)
If (RevertSettings = "1")
{
Progress % StepsPos*StepsStep+StepsStep*(A_Index-0.5)/regbak0, Restoring registry settings #%A_Index% from backup ...
@ -319,7 +319,7 @@ If (KeepSettings = "0" or Unattended = "1")
Progress % StepsPos*StepsStep+StepsStep*(A_Index-1)/regdel0, Removing add. registry settings #%A_Index% from host ...
CurBranch := regdel%A_Index%
SplitFirst(RegRoot, RegSub, CurBranch, "\")
RegDelete %RegRoot%, %RegSub%
RegDeleteX(RegRoot, RegSub)
If ErrorLevel
{
SplitLast(RegSub, RegKey, RegSub, "\")

View File

@ -2,8 +2,9 @@
#NoEnv
#Include mb_EnvTools.ahk
#Include mb_IniTools.ahk
#Include mb_RegTools.ahk
#Include mb_TextTools.ahk
U3HVer = 2.2
U3HVer = 2.3
U3HUUID = 0f90f88c-5e05-4cab-8c3a-e1c0112b06fd
U3_APP_DATA_PATH := EnvValue("U3_APP_DATA_PATH")

View File

@ -1,7 +1,7 @@
1 VERSIONINFO
FILEVERSION 2,2,0,0
PRODUCTVERSION 2,2,0,0
FILEVERSION 2,3,0,0
PRODUCTVERSION 2,3,0,0
FILEOS 0x4
FILETYPE 0x1
{
@ -10,12 +10,12 @@ BLOCK "StringFileInfo"
BLOCK "040904b0"
{
VALUE "FileDescription", "U3Helper manages registry settings and data files of ordinary applications to make them U3-compatible. (see http://www.u3.com/ for more info)"
VALUE "FileVersion", "2, 2, 0, 0"
VALUE "FileVersion", "2, 3, 0, 0"
VALUE "InternalName", "U3H"
VALUE "LegalCopyright", "(c)2007 Markus Birth <mbirth@webwriters.de>"
VALUE "OriginalFilename", "U3Helper.exe"
VALUE "ProductName", "U3Helper"
VALUE "ProductVersion", "2, 2, 0, 0"
VALUE "ProductVersion", "2, 3, 0, 0"
}
}

24
mb_RegTools.ahk Normal file
View File

@ -0,0 +1,24 @@
#Include mb_TextTools.ahk
RegDeleteX(RegRoot, RegSub)
{
RegDelete %RegRoot%, %RegSub%
StartRDX:
SplitLast(RegSub, RegKey, RegSub, "\")
if (RegCount(RegRoot, RegSub) = 0 and InStr(RegSub, "\") != 0)
{
RegDelete %RegRoot%, %RegSub%
Goto StartRDX
}
Return true
}
RegCount(RegRoot, RegSub)
{
Ct = 0
Loop %RegRoot%, %RegSub%, 1, 0
{
Ct++
}
Return Ct
}