Hello.
This has been discussed several times here, but apparentely the solution is yet to be found.
If i have this context menu example here:
(I posted several extension examples so you could understand better)
You can test this script above without messing your registry. It will self-delete after 10 seconds.
How can i get all the selected files/folders from context into script, so i can associate them with pre-defined actions?
Guinness has also been helping but i think its time i made another post regarding this matter, since all solutions are limited or not working properly.
This has been discussed several times here, but apparentely the solution is yet to be found.
If i have this context menu example here:
[ autoit ]
if stringinstr(@OSArch,"64") then $hklm="HKLM64" else $hklm="HKEY_LOCAL_MACHINE" endif RegContext() Sleep(10000) UnregContext() Func RegContext() RegWrite("HKEY_CLASSES_ROOT\Directory\shell\SRP Enforcer", "MUIVerb", "REG_SZ", "SRP Enforcer") RegWrite("HKEY_CLASSES_ROOT\Directory\shell\SRP Enforcer", "SubCommands", "REG_SZ", "Add folder to allow list") RegWrite("HKEY_CLASSES_ROOT\Directory\shell\SRP Enforcer", "icon", "REG_SZ", @ScriptDir & "\Graphics\Protected.ico") RegWrite("HKEY_CLASSES_ROOT\exefile\shell\SRP Enforcer", "MUIVerb", "REG_SZ", "SRP Enforcer") RegWrite("HKEY_CLASSES_ROOT\exefile\shell\SRP Enforcer", "SubCommands", "REG_SZ", "Add to allow list;Add to block list") RegWrite("HKEY_CLASSES_ROOT\exefile\shell\SRP Enforcer", "icon", "REG_SZ", @ScriptDir & "\Graphics\Protected.ico") RegWrite("HKEY_CLASSES_ROOT\comfile\shell\SRP Enforcer", "MUIVerb", "REG_SZ", "SRP Enforcer") RegWrite("HKEY_CLASSES_ROOT\comfile\shell\SRP Enforcer", "SubCommands", "REG_SZ", "Add to allow list;Add to block list") RegWrite("HKEY_CLASSES_ROOT\comfile\shell\SRP Enforcer", "icon", "REG_SZ", @ScriptDir & "\Graphics\Protected.ico") RegWrite("HKEY_CLASSES_ROOT\.A6P\shell\SRP Enforcer", "MUIVerb", "REG_SZ", "SRP Enforcer") RegWrite("HKEY_CLASSES_ROOT\.A6P\shell\SRP Enforcer", "SubCommands", "REG_SZ", "Add to allow list") RegWrite("HKEY_CLASSES_ROOT\.A6P\shell\SRP Enforcer", "icon", "REG_SZ", @ScriptDir & "\Graphics\Protected.ico") RegWrite("HKEY_CLASSES_ROOT\.AC\shell\SRP Enforcer", "MUIVerb", "REG_SZ", "SRP Enforcer") RegWrite("HKEY_CLASSES_ROOT\.AC\shell\SRP Enforcer", "SubCommands", "REG_SZ", "Add to allow list") RegWrite("HKEY_CLASSES_ROOT\.AC\shell\SRP Enforcer", "icon", "REG_SZ", @ScriptDir & "\Graphics\Protected.ico") RegWrite($hklm & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Add folder to allow list", "", "REG_SZ", "Add folder to allow list") RegWrite($hklm & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Add folder to allow list", "Icon", "REG_SZ", @ScriptDir & "\Graphics\Allowed.ico") RegWrite($hklm & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Add to allow list", "", "REG_SZ", "Add to allow list") RegWrite($hklm & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Add to allow list", "Icon", "REG_SZ", @ScriptDir & "\Graphics\Allowed.ico") RegWrite($hklm & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Add to allow list\command", "", "REG_SZ", "Someexe.exe") RegWrite($hklm & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Add to block list", "", "REG_SZ", "Add to block list") RegWrite($hklm & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Add to block list", "Icon", "REG_SZ", @ScriptDir & "\Graphics\Blocked.ico") RegWrite($hklm & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Add to block list\command", "", "REG_SZ", "Someexe.exe") EndFunc Func UnregContext() RegDelete("HKEY_CLASSES_ROOT\Directory\shell\SRP Enforcer") RegDelete("HKEY_CLASSES_ROOT\exefile\shell\SRP Enforcer") RegDelete("HKEY_CLASSES_ROOT\comfile\shell\SRP Enforcer") RegDelete("HKEY_CLASSES_ROOT\.A6P\shell\SRP Enforcer") RegDelete("HKEY_CLASSES_ROOT\.AC\shell\SRP Enforcer") RegDelete($hklm & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Add folder to allow list") RegDelete($hklm & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Add to allow list") RegDelete($hklm & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Add to block list") EndFunc
(I posted several extension examples so you could understand better)
You can test this script above without messing your registry. It will self-delete after 10 seconds.
How can i get all the selected files/folders from context into script, so i can associate them with pre-defined actions?
Guinness has also been helping but i think its time i made another post regarding this matter, since all solutions are limited or not working properly.