new apps, AcronisTrueImage.script, WriteProtectRM.script, WinContig.script

This commit is contained in:
Homes32
2021-01-11 14:47:43 -06:00
parent 0b56cb4c5a
commit cec346bad6
12 changed files with 1107 additions and 76 deletions

View File

@@ -210,6 +210,10 @@ GetParam,1,%FileExt%
Getparam,2,%Program%
Set,%ExeExtList%,".exe|.cmd|.bat|.com|.js|.vbs|.wsf"
// Are hives already loaded? - We don't want to unload them if they were loaded by a script
If,ExistRegSubKey,HKLM,"Tmp_Software",Set,%RegHivesLoaded%,True
Else,Set,%RegHivesLoaded%,False
// Remove . from the file extension if present.
StrFormat,CTRIM,%FileExt%,".",%FileExt%
@@ -219,12 +223,12 @@ List,Pos,%ExeExtList%,%ProgramExt%,%IsExecutable%
If,%IsExecutable%,Equal,0,Halt,"Associate Error: [%Program%] is not an executable file (%ExeExtList%)."
Else,Begin
Echo,"Associating file extension [.%FileExt%] with [%Program%]..."
RegHiveLoad,Tmp_Software,%RegSoftware%
If,%RegHivesLoaded%,Equal,False,RegHiveLoad,Tmp_Software,%RegSoftware%
RegWrite,HKLM,0x1,"Tmp_Software\Classes\.%FileExt%","","%FileExt%file"
RegWrite,HKLM,0x1,"Tmp_Software\Classes\%FileExt%file","","%FileExt% File"
RegWrite,HKLM,0x2,"Tmp_Software\Classes\%FileExt%file\DefaultIcon","","#$q%Program%#$q"
RegWrite,HKLM,0x2,"Tmp_Software\Classes\%FileExt%file\shell\open\command","","#$q%Program%#$q #$q#$p1#$q"
RegHiveUnLoad,Tmp_Software
If,%RegHivesLoaded%,Equal,False,RegHiveUnLoad,Tmp_Software
Echo,""
End