diff --git a/U3H_hostCleanUp.ahk b/U3H_hostCleanUp.ahk index 356585e..8182d0a 100644 --- a/U3H_hostCleanUp.ahk +++ b/U3H_hostCleanUp.ahk @@ -100,28 +100,41 @@ Else OutIndex = %A_Index% FileCount = 0 SetWorkingDir %U3_HOST_EXEC_PATH%\%CurFile% - Loop *.*, 0, 1 + Loop *.*, 1, 1 { FileCount++ } - Loop *.*, 0, 1 + Loop *.*, 1, 1 { Progress % StepsPos*StepsStep+StepsStep*(OutIndex-1.00+(A_Index/FileCount))/datexe0, Saving data directory %CurFile% ... (CPY:%Copied% / SKP:%Skipped% / ERR:%Errors%) - FileCopyNewer(A_LoopFileLongPath, U3_APP_DATA_PATH . "\" CurFile . "\" . A_LoopFileFullPath) - If ErrorLevel = 2 - { - CopyErrors .= "Dir-entry: " . CurFile . "\" . A_LoopFileFullPath . " (Error while copying)`n" - Errors++ + FileGetAttrib FAttr, %A_LoopFileLongPath% + IfInString FAttr, D + { + IfNotExist %U3_APP_DATA_PATH%\%CurFile%\%A_LoopFileFullPath% + FileCreateDir %U3_APP_DATA_PATH%\%CurFile%\%A_LoopFileFullPath% + If ErrorLevel + Errors++ + Else + Copied++ } - else if ErrorLevel = 1 - { - CopyErrors .= "Dir-entry: " . CurFile . "\" . A_LoopFileFullPath . " (File does not exist)`n" - Errors++ + Else + { + FileCopyNewer(A_LoopFileLongPath, U3_APP_DATA_PATH . "\" CurFile . "\" . A_LoopFileFullPath) + If ErrorLevel = 2 + { + CopyErrors .= "Dir-entry: " . CurFile . "\" . A_LoopFileFullPath . " (Error while copying)`n" + Errors++ + } + else if ErrorLevel = 1 + { + CopyErrors .= "Dir-entry: " . CurFile . "\" . A_LoopFileFullPath . " (File does not exist)`n" + Errors++ + } + else if ErrorLevel = -1 + Skipped++ + else + Copied++ } - else if ErrorLevel = -1 - Skipped++ - else - Copied++ } SetWorkingDir %A_ScriptDir% } diff --git a/U3H_hostConfigure.ahk b/U3H_hostConfigure.ahk index 2541c58..5d3e73f 100644 --- a/U3H_hostConfigure.ahk +++ b/U3H_hostConfigure.ahk @@ -5,6 +5,8 @@ ; ########################################################################## StepsAll = 0 +IfNotExist %U3_HOST_EXEC_PATH%\%A_ScriptName% + StepsAll++ If regsvr0 > 0 StepsAll++ If datini0 > 0 @@ -21,7 +23,15 @@ StepsPos = 0 Progress b2 x%PL% y%PT% w%PW% m FM%PFM% FS%PFS%, U3Helper %U3HVer% - (c)2006-2007 Markus Birth , Preparing %AppName% ..., AHKProgress-%AppName% WinSet Transparent, %PTrans%, AHKProgress-%AppName% -Progress, , Checking registry settings... +; made following step not to display b/c it occurs only once on the first launch of any U3H-app +IfNotExist %U3_HOST_EXEC_PATH%\%A_ScriptName% +{ + Progress % StepsPos*StepsStep, Copying U3Helper to disk... + FileCopy %A_ScriptFullPath%, %U3_HOST_EXEC_PATH%\%A_ScriptName%, 0 + StepsPos++ +} + +Progress % StepsPos*StepsStep, Checking registry settings... keycount = 0 ;Registry stuff Loop %regbak0% @@ -143,18 +153,27 @@ Loop %datexe0% OutIndex = %A_Index% FileCount = 0 SetWorkingDir %U3_APP_DATA_PATH%\%CurFile% - Loop *.*, 0, 1 + Loop *.*, 1, 1 { FileCount++ } IfNotExist %U3_HOST_EXEC_PATH%\%CurFile% FileCreateDir %U3_HOST_EXEC_PATH%\%CurFile% - Loop *.*, 0, 1 + Loop *.*, 1, 1 { Progress % StepsPos*StepsStep+StepsStep*(OutIndex-1.00+(A_Index/FileCount))/datexe0, Copying data directory %CurFile% ... (CPY:%Copied% / ERR:%Errors%) - IfNotExist %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileDir% - FileCreateDir %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileDir% - FileCopy %A_LoopFileLongPath%, %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileFullPath%, 1 + FileGetAttrib FAttr, %A_LoopFileLongPath% + IfInString FAttr, D + { + IfNotExist %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileFullPath% + FileCreateDir %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileFullPath% + } + Else + { + IfNotExist %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileDir% + FileCreateDir %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileDir% + FileCopy %A_LoopFileLongPath%, %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileFullPath%, 1 + } If ErrorLevel Errors++ Else diff --git a/U3Helper.ahk b/U3Helper.ahk index 6179282..d8bff55 100644 --- a/U3Helper.ahk +++ b/U3Helper.ahk @@ -3,7 +3,8 @@ #Include mb_EnvTools.ahk #Include mb_IniTools.ahk #Include mb_TextTools.ahk -U3HVer = 2.0 +U3HVer = 2.1 +U3HUUID = 0f90f88c-5e05-4cab-8c3a-e1c0112b06fd U3_APP_DATA_PATH := EnvValue("U3_APP_DATA_PATH") U3_HOST_EXEC_PATH := EnvValue("U3_HOST_EXEC_PATH") diff --git a/manifestex.u3i b/manifestex.u3i new file mode 100644 index 0000000..a5a1583 --- /dev/null +++ b/manifestex.u3i @@ -0,0 +1,18 @@ + + + CCleaner.ico + CCleaner + Piriform Ltd. + CCleaner is a freeware system optimization and privacy tool. It removes unused files from your system - allowing Windows to run faster and freeing up valuable hard disk space. It also cleans traces of your online activities such as your Internet history. + + + 2.0 + + + + config + + appstop + unconfig + +