mirror of
https://github.com/PhoenixPE/PhoenixPE.git
synced 2025-09-17 02:28:09 +02:00
optimize various script loop operations
This commit is contained in:
@@ -33,10 +33,10 @@ Title=UltraISO
|
||||
Description=UltraISO is an tool for creating/editing/converting ISO image files and bootable CD/DVD images.
|
||||
Author=Homes32
|
||||
Level=5
|
||||
Selected=False
|
||||
Selected=True
|
||||
Mandatory=False
|
||||
Version=1.0.0.0
|
||||
Date=2021-03-05
|
||||
Version=1.0.1.0
|
||||
Date=2022-06-27
|
||||
Interface=Interface
|
||||
|
||||
[Variables]
|
||||
@@ -83,8 +83,10 @@ RegWrite,HKLM,0x1,"Tmp_Software\Classes\UltraISO\shell\open","","Open with &Ultr
|
||||
RegWrite,HKLM,0x1,"Tmp_Software\Classes\UltraISO\shell\open\command","","#$q%PEPrograms%\%ProgramFolder%\%ProgramExe%#$q #$q#$p1#$q"
|
||||
|
||||
StrFormat,REPLACE,%txt_RegisterFileExt%,#$s,"",%txt_RegisterFileExt%
|
||||
List,Count,%txt_RegisterFileExt%,%ExtCount%,Delim=#$c
|
||||
Loop,%ScriptFile%,RegisterFileExtensions_Loop,1,%ExtCount%
|
||||
ForEach,%Ext%,%txt_RegisterFileExt%,Delim=#$c,Begin
|
||||
StrFormat,CTRIM,%Ext%,".",%FileExt%
|
||||
RegWrite,HKLM,0x1,"Tmp_Software\Classes\.%FileExt%","","UltraISO"
|
||||
End
|
||||
|
||||
// License
|
||||
If,%cmb_SoftwareLicense%,Equal,"Use Host License",Begin
|
||||
@@ -173,24 +175,6 @@ RegWrite,HKLM,0x1,"Tmp_Software\Classes\binimage\shell\Convert to ISO\command","
|
||||
RegWrite,HKLM,0x1,"Tmp_Software\Classes\binimage\shell\open\command","","#$q%PEPrograms%\%ProgramFolder%\%ProgramExe%#$q #$q#$p1#$q"
|
||||
RegWrite,HKLM,0x1,"Tmp_Software\Classes\binimage\shellex\ContextMenuHandlers\ISOShell","","{AD392E40-428C-459F-961E-9B147782D099}"
|
||||
|
||||
[#RegisterFileExtensions_Loop#]
|
||||
// ===============================================================================================================================
|
||||
// Name...........: RegisterFileExtensions_Loop
|
||||
// Description....: Register each file extension in %txt_RegisterFileExt%.
|
||||
// Syntax.........: Loop,%ScriptFile%,RegisterFileExtensions_Loop,1,%ExtCount%
|
||||
// Parameters.....:
|
||||
// Return values..:
|
||||
// Author.........: Homes32
|
||||
// Remarks........: Internal Function
|
||||
// Related........: %txt_RegisterFileExt%
|
||||
// ===============================================================================================================================
|
||||
[RegisterFileExtensions_Loop]
|
||||
List,Get,%txt_RegisterFileExt%,#c,%Ext%,Delim=#$c
|
||||
|
||||
// Remove . from the file extension if present.
|
||||
StrFormat,CTRIM,%Ext%,".",%FileExt%
|
||||
RegWrite,HKLM,0x1,"Tmp_Software\Classes\.%FileExt%","","UltraISO"
|
||||
|
||||
[#ExtractProgram#]
|
||||
// ===============================================================================================================================
|
||||
// Name...........: ExtractProgram
|
||||
|
@@ -85,10 +85,9 @@ End
|
||||
// ShellExt
|
||||
If,%cb_RegisterShellExt%,Equal,True,Run,%ScriptFile%,RegisterShellExtension
|
||||
|
||||
// FileExt
|
||||
// Register FileExt
|
||||
StrFormat,REPLACE,%txt_RegisterFileExt%,#$s,"",%txt_RegisterFileExt%
|
||||
List,Count,%txt_RegisterFileExt%,%ExtCount%,Delim=#$c
|
||||
Loop,%ScriptFile%,RegisterFileExtensions_Loop,1,%ExtCount%
|
||||
ForEach,%Ext%,%txt_RegisterFileExt%,Associate,"%Ext%","%PEPrograms%\%ProgramFolder%\%ProgramExe%"
|
||||
|
||||
Echo,"Configuring %ScriptTitle%..."
|
||||
|
||||
@@ -203,21 +202,6 @@ If,%cb_StartMenuShc%,Equal,True,AddShortcut,StartMenu,%txt_StartMenuFolder%,%txt
|
||||
If,%cb_PinToTaskbar%,Equal,True,PinShortcut,Taskbar,Auto,"%PEPrograms%\%ProgramFolder%\%ProgramExe%"
|
||||
If,%cb_PinToStartMenu%,Equal,True,PinShortcut,StartMenu,Auto,"%PEPrograms%\%ProgramFolder%\%ProgramExe%"
|
||||
|
||||
[#RegisterFileExtensions_Loop#]
|
||||
// ===============================================================================================================================
|
||||
// Name...........: RegisterFileExtensions_Loop
|
||||
// Description....: Register each file extension in %txt_RegisterFileExt%.
|
||||
// Syntax.........: Loop,%ScriptFile%,RegisterFileExtensions_Loop,1,%ExtCount%
|
||||
// Parameters.....:
|
||||
// Return values..:
|
||||
// Author.........: Homes32
|
||||
// Remarks........: Internal Function
|
||||
// Related........: %txt_RegisterFileExt%
|
||||
// ===============================================================================================================================
|
||||
[RegisterFileExtensions_Loop]
|
||||
List,Get,%txt_RegisterFileExt%,#c,%Ext%,Delim=#$c
|
||||
Associate,"%Ext%","%PEPrograms%\%ProgramFolder%\%ProgramExe%"
|
||||
|
||||
[#RegisterShellExtension#]
|
||||
// ===============================================================================================================================
|
||||
// Name...........: RegisterShellExtension
|
||||
|
@@ -35,8 +35,8 @@ Author=Homes32
|
||||
Level=5
|
||||
Selected=False
|
||||
Mandatory=False
|
||||
Version=1.1.0.0
|
||||
Date=2022-02-22
|
||||
Version=1.1.1.0
|
||||
Date=2022-06-27
|
||||
|
||||
[Variables]
|
||||
%ProgramFolder%="Notepad3"
|
||||
@@ -78,8 +78,7 @@ End
|
||||
|
||||
// FileExt
|
||||
StrFormat,REPLACE,%txt_RegisterFileExt%,#$s,"",%txt_RegisterFileExt%
|
||||
List,Count,%txt_RegisterFileExt%,%ExtCount%,Delim=#$c
|
||||
Loop,%ScriptFile%,RegisterFileExtensions_Loop,1,%ExtCount%
|
||||
ForEach,%Ext%,%txt_RegisterFileExt%,Delim=#$c,Associate,"%Ext%","%PEPrograms%\%ProgramFolder%\%ProgramExe%"
|
||||
|
||||
// Additional Files - Keep this after any config changes so if the users wants to provide their own config we don't overwrite it.
|
||||
If,Not,%fb_IncludeDir%,Equal,"",If,ExistDir,%fb_IncludeDir%,Begin
|
||||
@@ -96,21 +95,6 @@ If,%cb_StartMenuShc%,Equal,True,AddShortcut,StartMenu,%txt_StartMenuFolder%,%txt
|
||||
If,%cb_PinToTaskbar%,Equal,True,PinShortcut,Taskbar,Auto,"%PEPrograms%\%ProgramFolder%\%ProgramExe%"
|
||||
If,%cb_PinToStartMenu%,Equal,True,PinShortcut,StartMenu,Auto,"%PEPrograms%\%ProgramFolder%\%ProgramExe%"
|
||||
|
||||
[#RegisterFileExtensions_Loop#]
|
||||
// ===============================================================================================================================
|
||||
// Name...........: RegisterFileExtensions_Loop
|
||||
// Description....: Register each file extension in %txt_RegisterFileExt%.
|
||||
// Syntax.........: Loop,%ScriptFile%,RegisterFileExtensions_Loop,1,%ExtCount%
|
||||
// Parameters.....:
|
||||
// Return values..:
|
||||
// Author.........: Homes32
|
||||
// Remarks........: Internal Function
|
||||
// Related........: %txt_RegisterFileExt%
|
||||
// ===============================================================================================================================
|
||||
[RegisterFileExtensions_Loop]
|
||||
List,Get,%txt_RegisterFileExt%,#c,%Ext%,Delim=#$c
|
||||
Associate,"%Ext%","%PEPrograms%\%ProgramFolder%\%ProgramExe%"
|
||||
|
||||
[#ExtractProgram#]
|
||||
// ===============================================================================================================================
|
||||
// Name...........: ExtractProgram
|
||||
|
@@ -104,39 +104,40 @@ FileCopyEx,"%TargetDir%\Windows\Boot\EFI\memtest.efi","%OutputDir%\efi\microsoft
|
||||
FileCopy,"%TargetDir%\Windows\Boot\Fonts\*.*","%OutputDir%\efi\microsoft\boot\Fonts\"
|
||||
|
||||
// Press Any Key...
|
||||
List,Count,%SourceFallbackLang%,%LangCount%
|
||||
If,%cb_BootFix%,Equal,True,Begin
|
||||
FileDeleteEx,"%OutputDir%\efi\microsoft\boot\efisys_noprompt.bin"
|
||||
Loop,%ScriptFile%,CopyBootfix_Loop,1,%LangCount%,"%TargetDir%\Windows\Boot\DVD\PCAT\bootfix.bin",%SourceFallbackLang%,"%OutputDir%\boot"
|
||||
Loop,%ScriptFile%,CopyBootfix_Loop,1,%LangCount%,"%TargetDir%\Windows\Boot\DVD\EFI\efisys.bin",%SourceFallbackLang%,"%OutputDir%\efi\microsoft\boot"
|
||||
ForEach,%Language%,%SourceFallbackLang%,Run,%ScriptFile%,CopyBootfix,"%TargetDir%\Windows\Boot\DVD\PCAT\bootfix.bin",%Language%,"%OutputDir%\boot"
|
||||
ForEach,%Language%,%SourceFallbackLang%,Run,%ScriptFile%,CopyBootfix,"%TargetDir%\Windows\Boot\DVD\EFI\efisys.bin",%Language%,"%OutputDir%\efi\microsoft\boot"
|
||||
End
|
||||
Else,Begin
|
||||
FileDeleteEx,"%OutputDir%\boot\bootfix.bin"
|
||||
FileDeleteEx,"%OutputDir%\efi\microsoft\boot\efisys.bin"
|
||||
Loop,%ScriptFile%,CopyBootfix_Loop,1,%LangCount%,"%TargetDir%\Windows\Boot\DVD\EFI\efisys_noprompt.bin",%SourceFallbackLang%,"%OutputDir%\efi\microsoft\boot"
|
||||
ForEach,%Language%,%SourceFallbackLang%,Run,%ScriptFile%,CopyBootfix,"%TargetDir%\Windows\Boot\DVD\EFI\efisys_noprompt.bin",%Language%,"%OutputDir%\efi\microsoft\boot"
|
||||
FileRename,"%OutputDir%\efi\microsoft\boot\efisys_noprompt.bin","%OutputDir%\efi\microsoft\boot\efisys.bin"
|
||||
End
|
||||
|
||||
[#CopyBootfix_Loop#]
|
||||
[#CopyBootfix#]
|
||||
// ===============================================================================================================================
|
||||
// Name...........: CopyBootfix_Loop
|
||||
// Name...........: CopyBootfix
|
||||
// Description....: Copy language specific bootfix files.
|
||||
// Syntax.........: Loop,%ScriptFile%,CopyBootfix_Loop,1,<LangCount>,<binFile>,<SourceFallbackLang>,<Dest>
|
||||
// Parameters.....: <LangCount> - Number of languages in the <SourceFallbackLang> list
|
||||
// #1 <binFile> - The *.bin file to process. (bootfix.bin/efisys_noprompt.bin/etc.)
|
||||
// #2 <SourceFallbackLang> - A pipe delimited list of languages to include.
|
||||
// #3 <Dest> - Full path to the directory where the files will be copied.
|
||||
// Syntax.........: Run,%ScriptFile%,CopyBootfix,<binFile>,<Language>,<Dest>
|
||||
// Parameters.....: #1 <binFile> - The *.bin file to process. (bootfix.bin/efisys_noprompt.bin/etc.)
|
||||
// #2 <Language> - Language to include.
|
||||
// #3 <Dest> - Full path to the directory where the files will be copied.
|
||||
// Return values..:
|
||||
// Author.........: Homes32
|
||||
// Remarks........:
|
||||
// Related........: [ProcessBootloader]
|
||||
// ===============================================================================================================================
|
||||
[CopyBootfix_Loop]
|
||||
[CopyBootfix]
|
||||
System,SetLocal
|
||||
List,Get,#2,#c,%Language%
|
||||
StrFormat,FileName,#1,%FileName%
|
||||
StrFormat,DirPath,#1,%SrcDirPath%
|
||||
If,ExistFile,"%SrcDirPath%%Language%\%FileName%",FileCopy,"%SrcDirPath%%Language%\%FileName%","#3\%FileName%"
|
||||
GetParam,1,%binFile%
|
||||
GetParam,2,%Language%
|
||||
GetParam,3,%Dest%
|
||||
|
||||
StrFormat,FileName,%binFile%,%FileName%
|
||||
StrFormat,DirPath,%binFile%,%SrcDirPath%
|
||||
If,ExistFile,"%SrcDirPath%%Language%\%FileName%",FileCopy,"%SrcDirPath%%Language%\%FileName%","%Dest%\%FileName%"
|
||||
System,EndLocal
|
||||
|
||||
[#ConfigBcd#]
|
||||
|
@@ -35,8 +35,8 @@ Author=Homes32
|
||||
Level=7
|
||||
Selected=False
|
||||
Mandatory=False
|
||||
Version=1.0.2.0
|
||||
Date=2022-05-21
|
||||
Version=1.0.3.0
|
||||
Date=2022-07-01
|
||||
|
||||
[Process]
|
||||
Echo,"I'm tweaking out!"
|
||||
@@ -197,7 +197,7 @@ Run,%ScriptFile%,ExecScript,%fb_Script_File02%
|
||||
// Parameters.....: #1 - Script File
|
||||
// Return values..:
|
||||
// Author.........: Homes32
|
||||
// Remarks........: Project Hives will be loaded automatically.
|
||||
// Remarks........:
|
||||
// Related........:
|
||||
// ===============================================================================================================================
|
||||
[ExecScript]
|
||||
@@ -261,7 +261,7 @@ Message,"There are no advanced options available for this script."
|
||||
// Related........: btn_ScriptInfo
|
||||
// ===============================================================================================================================
|
||||
[ShowScriptInfo]
|
||||
Message,"This script allows developers and testers to run arbitrary commands, scripts, and merge registry configuration. It is most often used for testing, but can also be used by users that just want to change a few registry settings without creating a complex script."
|
||||
Message,"This script allows developers and testers to run arbitrary commands, scripts, and merge registry configuration.#$x#$xIt is most often used for testing, but can also be used by users that just want to change a few registry/ini/config settings or copy a couple of files without creating a complex script."
|
||||
|
||||
[#Interface#]
|
||||
// ===============================================================================================================================
|
||||
@@ -280,7 +280,7 @@ btn_SetDefaultOptions=,1,8,543,5,25,25,SetDefaultOptions,SetDefaults_16.png,True
|
||||
btn_AdvancedOptions=,1,8,574,5,25,25,ToggleAdvancedOptions,Advanced_16.png,True,"__Show Advanced Options"
|
||||
btn_ScriptInfo=,1,8,605,5,25,25,ShowScriptInfo,Help_16.png,True,"__Script Info"
|
||||
bvl_ReqFiles=" Codebox",1,12,5,50,625,295,8,Bold
|
||||
cb_Codebox=,1,3,15,40,85,18,True
|
||||
cb_Codebox=,1,3,15,40,85,18,False
|
||||
rtf_Codebox=Codebox.txt,1,6,15,99,602,236
|
||||
btn_ExecCodebox=Execute,1,8,15,66,80,25,ExecCodebox,play-16.ico,False
|
||||
btn_EditCodebox="Edit Codebox",1,8,104,66,100,25,EditCodebox,Log.ico,False
|
||||
@@ -307,7 +307,7 @@ play-16.ico=1150,388
|
||||
Help_16.png=2830,3868
|
||||
Advanced_16.png=2000,2768
|
||||
SetDefaults_16.png=2475,3404
|
||||
Codebox.txt=1977,1176
|
||||
Codebox.txt=1677,996
|
||||
Log.ico=1150,832
|
||||
|
||||
[EncodedFile-InterfaceEncoded-play-16.ico]
|
||||
@@ -328,16 +328,16 @@ lines=0
|
||||
|
||||
[EncodedFile-InterfaceEncoded-Codebox.txt]
|
||||
lines=0
|
||||
0=/Td6WFoAAATm1rRGBMDoBbkPIQEWAAAAAAAAAEiSoergB7gC4F0AF+B8VaAhJe6YkrjRkYZb8T1/jGcv9MfPcw0zfm82ZL78S5u6dTR1LOJ1it7gA3LftHkGZDYpldVjx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AAAAAAAHXwYCvgBowCVl0AF+B8VaAhJe6YkrjRkYZb8T1/jGcv9MfPcw0zfm82ZL78S5u6dTR1LOJ1it7gA3LftHkGZDYpldVjxSTKI2HnXJ5lmgyUSlMSfXAtkq/hGCx+WbmsBomF8d/TSTgws3iwARhhgTuDxVej4JFSxxkxb660DS/xeb/2NoDOs+C7L9aRaripYyJu3hNk2Vos2OSVkRhP99afCE+MifCVMk22n2Y0if2S9VUKNwjc0fFm4DgozpsmNXYv33C6cC8dE/rmUBwlpab9UKFzIFjS4CaVwEBsUwEDmz5QLCbJi2PQ24CUZdA+Day9Sg7h3xHlaC+lo6jhGxoOcTZeZIYcMGqsHHERt5AyL3nzhWL4mNEERdioWb9ArrxWBN4YNAFsw8jU0uGzyTtgd8vctag2giSTwkkBcA8QTI8wh/UCs2/2mK0ITrQqmyqmzzDNq7MP+4VuuMgT11D/mwJq9FEM0JQC4102On/ftDl25hGSGBz7XUJcKRom3cZov+a/qWSKMPY1z/0M8+LMqV7kxrf2xJC74uqG3pLBRPuQ2R8s2KVoiWU/FlVedSnLR3AZ36aRW9DfzR1kXWI/XtcES2x+cItlbdIjFExv5fk19jqd/ky1JlfVFS/AlJIR5+6kbxgDSoNBPKkGM3cV56SMIk1ZBX1l4RH7wsa7K0zP27ksy5io7ZxE/QLfkVHKXOTkQlY3fIR7LfyVZng8KfZZfKdgL1RbDMRjDmtDRFeMVPZmDSecOtITOzpQ0AyxFb8qL569BIEYdYaIe929QntNfW4duUDqwoWRntyYlAAAABbCn6UcuA/RAAH6BI0NAADXtTeVscRn+wIAAAAABFlaeJzjds5PSU3Kr9ArqShhGAUjDvSyQegFTNjlG5r+mjGxAQB6jgfQDa+JpQEAAAACAAAAJwAAAKACAAAAAAAAAQAAAAAAAAAAAAAA
|
||||
[Templates]
|
||||
Codebox.txt=1977,1176
|
||||
Codebox.txt=1677,996
|
||||
|
||||
[EncodedFolders]
|
||||
Templates
|
||||
|
||||
[EncodedFile-Templates-Codebox.txt]
|
||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ACAAAAAAAAAQAAAAAAAAAAAAAA
|
||||
[EncodedFile-InterfaceEncoded-Log.ico]
|
||||
lines=0
|
||||
0=eJyVk8tu00AUhqc0CARIdMWaDVLfIRuUPAiktE2EhIQAiWUKWSFeh9IFTerEt9wKiNA4wAoJCRHHduzYieNcDmeOL6CmEcLW77FG8/n/z/gMYxt4b20xfN5mhRRjtxhj2yicwplwnl93U2ztVSqVHmez2VeZTOb1v5ROp5+/fHFwOWaPj9+lNE2D5XIJi8Ui0hzm80izGcxIAQRBAKIoQu7+vRsxLwgnxPO1fB1fEwRTmE6n4Ps+TCYTmIzHMPY88DyX+Ae5XMJXqwLxnP3aVuBLS0ZJ0ONqiqBxNWo0uqMR8bs7OwkviSLx3DPkL2AjOY5NfH5vN+EbdZX4KWb1fcw6wayY1+N5XZc8R44Djm2DPRxCrVaDh4XC9YRXQ57X2WtKiVe3UYVuvQpndQHOVK4qDC2L+Pz+3rWYrysK8dyzF+WN2a4asUo4Wqaxlud767qYdeRQnY49xLwWeVqmCaZhgGEM1vK8TsobeX5WTkLJFehEGug68YX8/grPPWM+YVHc0xjoyPZB7/dXeDXibcw7xLyWZVKdZsLpVAvtvx3u/7OnT67+4WXieZ3cL87akco0cs+PH97D6WkbOp1PcHj45rsiS5fO8+c9w7y/oI9qt1vUG0dHb39UyuU7f5+9bz1tM/x/HvV43Oe8d6h/8J/o+D08Zz/rqrJ90fnFPI9kSSxyKShcV1RlGd8lmhOESrHVbKywwgZjB/+rTdQVZG8y9hv23cDJeJxj98lP18tMzmcYBSMS1LFAaA0m7PIXFpueYWADAKEdBblZFdWqAQAAAAIAAAAjAAAAKAIAAAAAAAABAAAAAAAAAAAAAAA
|
||||
|
@@ -35,12 +35,14 @@ Author=Homes32
|
||||
Level=7
|
||||
Selected=True
|
||||
Mandatory=False
|
||||
Version=1.0.2.0
|
||||
Date=2019-10-20
|
||||
Version=1.1.0.0
|
||||
Date=2022-07-01
|
||||
|
||||
[Variables]
|
||||
%LangList%=ar-SA|bg-BG|cs-CZ|da-DK|de-DE|el-GR|en-GB|en-US|es-ES|es-MX|et-EE|fi-FI|fr-CA|fr-FR|he-IL|hr-HR|hu-HU|it-IT|ja-JP|ko-KR|lt-LT|lv-LV|nb-NO|nl-NL|pl-PL|pt-BR|pt-PT|qps-ploc|ro-RO|ru-RU|sk-SK|sl-SI|sr-Latn-CS|sr-Latn-RS|sv-SE|th-TH|tr-TR|uk-UA|zh-CN|zh-HK|zh-TW
|
||||
|
||||
CleanupMui=Run,%ScriptFile%,CleanupMui
|
||||
|
||||
[Process]
|
||||
Echo,"Cleaning up [TargetDir]..."
|
||||
FileDeleteEx,"%TargetDir%\Users\Default\Desktop\Desktop.ini"
|
||||
@@ -51,28 +53,28 @@ FileDeleteEx,"%TargetDir%\Users\Public\Desktop\Desktop.ini"
|
||||
// Just to make sure some other script didn't add them....
|
||||
|
||||
// Causes Explorer hang on boot
|
||||
FileDeleteEx,%TargetSystem32%\WallpaperHost.exe
|
||||
FileDeleteEx,"%TargetSystem32%\WallpaperHost.exe"
|
||||
// Crashes Explorer, Pintool, StartIsBack
|
||||
FileDeleteEx,%TargetSystem32%\Windows.CloudStore.dll
|
||||
FileDeleteEx,"%TargetSystem32%\Windows.CloudStore.dll"
|
||||
// Causes Issues with Pintool
|
||||
FileDeleteEx,%TargetSystem32%\windows.immersiveshell.serviceprovider.dll
|
||||
FileDeleteEx,"%TargetSystem32%\windows.immersiveshell.serviceprovider.dll"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Misc Cleanup
|
||||
|
||||
// Disable Diagnostic Telemetry Service
|
||||
// DiagTrack and diagnosticshub.standardcollector.service are disabled Shell Config
|
||||
DirDeleteEx,%TargetWindows%\DiagTrack
|
||||
DirDeleteEx,%TargetSystem32%\DiagSvcs
|
||||
FileDeleteEx,%TargetSystem32%\diagER.dll
|
||||
FileDeleteEx,%TargetSystem32%\diagtrack.dll
|
||||
DirDeleteEx,"%TargetWindows%\DiagTrack"
|
||||
DirDeleteEx,"%TargetSystem32%\DiagSvcs"
|
||||
FileDeleteEx,"%TargetSystem32%\diagER.dll"
|
||||
FileDeleteEx,"%TargetSystem32%\diagtrack.dll"
|
||||
|
||||
// WMI Repository will be rebuilt at startup
|
||||
DirDeleteEx,%TargetSystem32%\wbem\AutoRecover
|
||||
DirDeleteEx,%TargetSystem32%\wbem\Logs
|
||||
DirDeleteEx,%TargetSystem32%\wbem\Repository
|
||||
DirDeleteEx,%TargetSystem32%\wbem\tmf
|
||||
DirDeleteEx,%TargetSystem32%\wbem\xml
|
||||
DirDeleteEx,"%TargetSystem32%\wbem\AutoRecover"
|
||||
DirDeleteEx,"%TargetSystem32%\wbem\Logs"
|
||||
DirDeleteEx,"%TargetSystem32%\wbem\Repository"
|
||||
DirDeleteEx,"%TargetSystem32%\wbem\tmf"
|
||||
DirDeleteEx,"%TargetSystem32%\wbem\xml"
|
||||
|
||||
// Edge web platform
|
||||
//FileDeleteEx,%TargetSystem32%\edgehtml.dll
|
||||
@@ -85,12 +87,12 @@ DirDeleteEx,%TargetSystem32%\wbem\xml
|
||||
// Unused Language (MUI) Folders
|
||||
|
||||
If,%cb_CleanupLangFolders%,Equal,True,Begin
|
||||
Run,%ScriptFile%,CleanupMui,%TargetSystem32%
|
||||
Run,%ScriptFile%,CleanupMui,%TargetWindows%\Boot\EFI
|
||||
Run,%ScriptFile%,CleanupMui,%TargetWindows%\Boot\PCAT
|
||||
Run,%ScriptFile%,CleanupMui,%TargetWindows%\Boot\PXE
|
||||
Run,%ScriptFile%,CleanupMui,%TargetWindows%\System32\wbem
|
||||
If,%SourceArch%,Equal,x64,Run,%ScriptFile%,CleanupMui,%TargetWindows%\SysWOW64
|
||||
CleanupMui,%TargetSystem32%
|
||||
CleanupMui,"%TargetWindows%\Boot\EFI"
|
||||
CleanupMui,"%TargetWindows%\Boot\PCAT"
|
||||
CleanupMui,"%TargetWindows%\Boot\PXE"
|
||||
CleanupMui,"%TargetWindows%\System32\wbem"
|
||||
If,%SourceArch%,Equal,x64,CleanupMui,"%TargetWindows%\SysWOW64"
|
||||
End
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -124,28 +126,28 @@ Run,%ScriptFile%,RemovePaint3DAssociations
|
||||
|
||||
Echo,"Cleaning up transaction logs..."
|
||||
// Reg Cache
|
||||
FileDeleteEx,%RegistryCache%\*.LOG1
|
||||
FileDeleteEx,%RegistryCache%\*.LOG2
|
||||
FileDeleteEx,%RegistryCache%\*.blf
|
||||
FileDeleteEx,%RegistryCache%\*.regtrans-ms
|
||||
FileDeleteEx,"%RegistryCache%\*.LOG1"
|
||||
FileDeleteEx,"%RegistryCache%\*.LOG2"
|
||||
FileDeleteEx,"%RegistryCache%\*.blf"
|
||||
FileDeleteEx,"%RegistryCache%\*.regtrans-ms"
|
||||
|
||||
// Target
|
||||
FileDeleteEx,%TargetSystem32%\config\*.LOG1
|
||||
FileDeleteEx,%TargetSystem32%\config\*.LOG2
|
||||
FileDeleteEx,%TargetSystem32%\config\*.blf
|
||||
FileDeleteEx,%TargetSystem32%\config\*.regtrans-ms
|
||||
FileDeleteEx,"%TargetSystem32%\config\*.LOG1"
|
||||
FileDeleteEx,"%TargetSystem32%\config\*.LOG2"
|
||||
FileDeleteEx,"%TargetSystem32%\config\*.blf"
|
||||
FileDeleteEx,"%TargetSystem32%\config\*.regtrans-ms"
|
||||
|
||||
// SMI
|
||||
FileDeleteEx,%TargetSystem32%\SMI\Store\Machine\*.LOG1
|
||||
FileDeleteEx,%TargetSystem32%\SMI\Store\Machine\*.LOG2
|
||||
FileDeleteEx,%TargetSystem32%\SMI\Store\Machine\*.blf
|
||||
FileDeleteEx,%TargetSystem32%\SMI\Store\Machine\*.regtrans-ms
|
||||
FileDeleteEx,"%TargetSystem32%\SMI\Store\Machine\*.LOG1"
|
||||
FileDeleteEx,"%TargetSystem32%\SMI\Store\Machine\*.LOG2"
|
||||
FileDeleteEx,"%TargetSystem32%\SMI\Store\Machine\*.blf"
|
||||
FileDeleteEx,"%TargetSystem32%\SMI\Store\Machine\*.regtrans-ms"
|
||||
|
||||
// User
|
||||
FileDeleteEx,%TargetDir%\Users\Default\*.LOG1
|
||||
FileDeleteEx,%TargetDir%\Users\Default\*.LOG2
|
||||
FileDeleteEx,%TargetDir%\Users\Default\*.blf
|
||||
FileDeleteEx,%TargetDir%\Users\Default\*.regtrans-ms
|
||||
FileDeleteEx,"%TargetDir%\Users\Default\*.LOG1"
|
||||
FileDeleteEx,"%TargetDir%\Users\Default\*.LOG2"
|
||||
FileDeleteEx,"%TargetDir%\Users\Default\*.blf"
|
||||
FileDeleteEx,"%TargetDir%\Users\Default\*.regtrans-ms"
|
||||
|
||||
[#Remove3D#]
|
||||
// ===============================================================================================================================
|
||||
@@ -191,60 +193,18 @@ RegHiveUnload,Tmp_Software
|
||||
// Parameters.....: #1 <Path> - Full path to the directory containing the root .mui folders.
|
||||
// Return values..:
|
||||
// Author.........: Homes32
|
||||
// Remarks........:
|
||||
// Related........: CleanupMui_CreateList_Loop, CleanupMui_ExcludeFallback_Loop
|
||||
// Remarks........: Removal is accomplished by running DirDeleteEx on each folder for each language in the language list
|
||||
// excluding languages in the source image's fallback language list.
|
||||
// Related........:
|
||||
// ===============================================================================================================================
|
||||
[CleanupMui]
|
||||
FileDeleteEx,%ProjectTemp%\CleanupMui.script
|
||||
FileCreateBlank,%ProjectTemp%\CleanupMui.script
|
||||
TXTAddLine,%ProjectTemp%\CleanupMui.script,"[Process]",Append
|
||||
|
||||
// Get count of # of supported languages
|
||||
List,Count,%LangList%,%LangCount%
|
||||
List,Count,%SourceFallbackLang%,%FBLangCount%
|
||||
|
||||
// Loop through each supported language
|
||||
Loop,%ScriptFile%,CleanupMui_CreateList_Loop,1,%LangCount%,#1
|
||||
Loop,%ScriptFile%,CleanupMui_ExcludeFallback_Loop,1,%FBLangCount%,#1
|
||||
|
||||
Echo,"Cleaning up unused languages in:#$x#$x[#1]..."
|
||||
Run,%ProjectTemp%\CleanupMui.script,Process
|
||||
GetParam,1,%MuiPath%
|
||||
|
||||
[#CleanupMui_CreateList_Loop#]
|
||||
// ===============================================================================================================================
|
||||
// Name...........: CleanupMui_CreateList_Loop
|
||||
// Description....: Builds a temporary .script containing delete commands for all supported languages.
|
||||
// Syntax.........: CleanupMui_ExcludeFallback_Loop,<Path>
|
||||
// Parameters.....: #1 <Path> - Full path to the directory containing the root .mui folders.
|
||||
// Return values..:
|
||||
// Author.........: Homes32
|
||||
// Remarks........:
|
||||
// Related........: CleanupMui
|
||||
// ===============================================================================================================================
|
||||
[CleanupMui_CreateList_Loop]
|
||||
System,SetLocal
|
||||
// get the current supported language we are testing
|
||||
StrFormat,SPLIT,%LangList%,|,#c,%Language%
|
||||
TXTAddLine,%ProjectTemp%\CleanupMui.script,"DirDeleteEx,#1\%Language%",Append
|
||||
System,EndLocal
|
||||
|
||||
[#CleanupMui_ExcludeFallback_Loop#]
|
||||
// ===============================================================================================================================
|
||||
// Name...........: CleanupMui_ExcludeFallback_Loop
|
||||
// Description....: Removes Source Language and Fallback Languages delete commands from the temporary
|
||||
// .script created by CleanupMui_CreateList_Loop
|
||||
// Syntax.........: CleanupMui_ExcludeFallback_Loop,<Path>
|
||||
// Parameters.....: #1 <Path> - Full path to the directory containing the root .mui folders.
|
||||
// Return values..:
|
||||
// Author.........: Homes32
|
||||
// Remarks........:
|
||||
// Related........: CleanupMui
|
||||
// ===============================================================================================================================
|
||||
[CleanupMui_ExcludeFallback_Loop]
|
||||
System,SetLocal
|
||||
StrFormat,SPLIT,%SourceFallbackLang%,|,#c,%Language%
|
||||
TXTDelLine,%ProjectTemp%\CleanupMui.script,"DirDeleteEx,#1\%Language%"
|
||||
System,EndLocal
|
||||
ForEach,%Language%,%LangList%,Begin
|
||||
List,Pos,%SourceFallbackLang%,%Language%,%LangPos%
|
||||
If,%LangPos%,Equal,0,DirDeleteEx,"%MuiPath%\%Language%"
|
||||
End
|
||||
|
||||
[#SetDefaultOptions#]
|
||||
// ===============================================================================================================================
|
||||
|
Reference in New Issue
Block a user