telmob Posted December 23, 2012 Share Posted December 23, 2012 I've been searching this for a while here on the forums, and i've found CMenu, but apparentely it doesn't work for Win7 x64.I'm trying to add the following in windows context menu:Menu (on file .exe, .com OR folder) ->Submenu Command (on file .exe, .com & folder) ->Submenu Command2 (on file .exe, .com)I have tried a bunch of applications to perform this apparentely simple task, but so far... not possible.I need to do this in Autoit via regwrite.Can this be done? Link to comment Share on other sites More sharing options...
Newb Posted December 23, 2012 Share Posted December 23, 2012 You can always try a good function which solves 99% of the problems.It's called SEARCH BUTTON. FireFox 1 I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it. Link to comment Share on other sites More sharing options...
telmob Posted December 23, 2012 Author Share Posted December 23, 2012 If you bothered to read my post you would find i've already used that function. But i guess you're just a common compulsive poster.... Link to comment Share on other sites More sharing options...
telmob Posted December 23, 2012 Author Share Posted December 23, 2012 Thank you for this, but i'm looking for a submenu option. Link to comment Share on other sites More sharing options...
Newb Posted December 23, 2012 Share Posted December 23, 2012 (edited) I can already guess how deep your search was. I guess AZJIO search lasted 10 seconds more than yours and produced a great result. Moreover, I've used search now and I found more than something related to your question. Whatever, not worth having the search results of a "common compulsive poster". Have a nice day. Edited December 23, 2012 by Newb I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it. Link to comment Share on other sites More sharing options...
johnmcloud Posted December 23, 2012 Share Posted December 23, 2012 Do you mean like this, right? Link to comment Share on other sites More sharing options...
guinness Posted December 23, 2012 Share Posted December 23, 2012 Look in my signature at _ShellAll. UDF List:  _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
AZJIO Posted December 23, 2012 Share Posted December 23, 2012 (edited) If I were using Win7, I would have made the utility allows you to create menus. I like it and the algorithm is simple. expandcollapse popupWindows Registry Editor Version 5.00 ;///////////////////////////////////////////////////////// Submenu DLL ///////////////////////////////////////////////////////// [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\dllfile\shell\OpenActions] "MUIVerb"="Action" "SubCommands"="ResHacker;IcoFX;regsvr32;regsvr32_u;upx;upx_d" ; "Icon"="\"C:\Windows\system32\SHELL33.dll,-8\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ResHacker] @="Open in ResHacker" "icon"="\"C:\\Program Files\\ResHacker\\ResHacker.exe\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ResHacker\command] @="\"C:\\Program Files\\ResHacker\\ResHacker.exe\" \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\IcoFX] @="Open in IcoFX" "icon"="\"C:\\Program Files\\IcoFX\\IcoFX.exe\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\IcoFX\command] @="\"C:\\Program Files\\IcoFX\\IcoFX.exe\" \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\regsvr32] @="regsvr32 (Yes)" "icon"="regedit.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\regsvr32\command] @="regsvr32.exe \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\regsvr32_u] @="regsvr32 (No)" "icon"="regedit.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\regsvr32_u\command] @="regsvr32.exe /u \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\upx] @="> UPX" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\upx\command] @="upx.exe -7 --compress-icons=0 \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\upx_d] @="UPX >" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\upx_d\command] @="upx.exe -d \"%1\"" ;///////////////////////////////////////////////////////// Submenu EXE ///////////////////////////////////////////////////////// [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\OpenActions] "MUIVerb"="Action" "SubCommands"="ResHacker;IcoFX;as_srv;upx;upx_d;Runscanner_EXE" ; "Icon"="\"C:\Windows\system32\SHELL33.dll,-8\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ResHacker] @="Open in ResHacker" "icon"="\"C:\\Program Files\\ResHacker\\ResHacker.exe\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ResHacker\command] @="\"C:\\Program Files\\ResHacker\\ResHacker.exe\" \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\IcoFX] @="Open in IcoFX" "icon"="\"C:\\Program Files\\IcoFX\\IcoFX.exe\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\IcoFX\command] @="\"C:\\Program Files\\IcoFX\\IcoFX.exe\" \"%1\"" # Start service # -------------------------------------------------------------------------------------------- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\as_srv] @="Start the service" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\as_srv\command] @="AutoIt3.exe \"C:\\Program Files\\Script\\srv.au3\" \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\upx] @="> UPX" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\upx\command] @="upx.exe -7 --compress-icons=0 \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\upx_d] @="UPX >" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\upx_d\command] @="upx.exe -d \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Runscanner_EXE] @="Starting with a guest registry" "icon"="regedit.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Runscanner_EXE\command] @="Runscanner.exe /y /t 0 \"%1\"" ;///////////////////////////////////////////////////////// Submenu REG ///////////////////////////////////////////////////////// [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\regfile\shell\OpenActions] "MUIVerb"="Action" "SubCommands"="reg1;reg2;reg3" "icon"="regedit.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\reg1] @="reg-backup" "icon"="AutoIt3.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\reg1\command] @="AutoIt3.exe \"C:\\Program Files\\Script\\reg-backup.au3\" \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\reg2] @="reg2au3" "icon"="AutoIt3.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\reg2\command] @="AutoIt3.exe \"C:\\Program Files\\Script\\reg2au3.au3\" \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\reg3] @="Import in the guest registry" "icon"="regedit.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\reg3\command] @="Runscanner.exe /y /t 0 reg import \"%1\"" But to me the reg-file suffices Edited December 23, 2012 by AZJIO My other projects or all Link to comment Share on other sites More sharing options...
telmob Posted December 23, 2012 Author Share Posted December 23, 2012 (edited) I can already guess how deep your search was. I guess AZJIO search lasted 10 seconds more than yours and produced a great result.Moreover, I've used search now and I found more than something related to your question.Whatever, not worth having the search results of a "common compulsive poster".Have a nice day.Again..... it is you that hasn't read enough... Azijo made the tool, so why would he spend much time searching for it?Now tell me, can you see in he's post the words "Context Menu"? Tell me if you can, if not, please just stop bothering me.Microsoft has this very badly documented, i've searched everywhere, and i don't understand how do i owe you any explanations....Do you mean like this, right?Exactly like that.Look in my signature at _ShellAll.I tried it but i didn't see the option to create submenus. I'll look ito it again, thank you If I were using Win7, I would have made the utility allows you to create menus. I like it and the algorithm is simple....But to me the reg-file sufficesAgain... Thank you! I also preffer to use the registry instead of tools. Going to try it now.Edit: Tried it! It is almost perfect! Finally! Thank you so much for this AZIJO!Know how i can get the option to add the folder option also?In a very near future i'll try to create a tool my this purpose myself. Edited December 23, 2012 by telmob Link to comment Share on other sites More sharing options...
johnmcloud Posted December 23, 2012 Share Posted December 23, 2012 Exactly like that.I have used the same "method" posted by AZJIO, you can find the documentation here:http://msdn.microsoft.com/en-us/library/windows/desktop/hh127467(v=vs.85).aspx Link to comment Share on other sites More sharing options...
AZJIO Posted December 23, 2012 Share Posted December 23, 2012 Know how i can get the option to add the folder option also?HKEY_CLASSES_ROOTFolderHKEY_CLASSES_ROOTDirectoryHKEY_CLASSES_ROOTDriveHKEY_CLASSES_ROOT - Combines both sectionsHKEY_LOCAL_MACHINESOFTWAREClasses - All UsersHKEY_CURRENT_USERSOFTWAREClasses - Current user My other projects or all Link to comment Share on other sites More sharing options...
guinness Posted December 23, 2012 Share Posted December 23, 2012 I also have other shell functions in my signature. UDF List:  _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
telmob Posted December 23, 2012 Author Share Posted December 23, 2012 HKEY_CLASSES_ROOTFolderHKEY_CLASSES_ROOTDirectoryHKEY_CLASSES_ROOTDriveHKEY_CLASSES_ROOT - Combines both sectionsHKEY_LOCAL_MACHINESOFTWAREClasses - All UsersHKEY_CURRENT_USERSOFTWAREClasses - Current userNot wanting o be annoying, but do you have any idea how i can create a menu that appears only when a folder or a .exe or .com is selected? Link to comment Share on other sites More sharing options...
careca Posted December 23, 2012 Share Posted December 23, 2012 (edited) This is what u need, just use the regedit entries in autoit. Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\Test] "MUIVerb"="Test" "SubCommands"="ex1;ex2;ex3" "icon"="*.ico" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex1] @="ex1" "Icon"="ex1.ico" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex1\command] @="Someexe.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex2] @="ex2" "Icon"="ex2.ico" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex2\command] @="Someexe.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex3] @="ex3" "Icon"="ex3.cpl" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex3\command] @="Someexe.exe" btw, to make it to allways show, regardless of where you right click, be it a folder or a file, change "[HKEY_CLASSES_ROOTDirectoryBackgroundshellTest]" to "[HKEY_CLASSES_ROOT*shellTest]" Edited December 23, 2012 by careca Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
guinness Posted December 23, 2012 Share Posted December 23, 2012 (edited) But that won't work when selecting a .exe or .com file only. Those registry keys are Global regardless. Edited December 23, 2012 by guinness UDF List:  _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
careca Posted December 23, 2012 Share Posted December 23, 2012 (edited) But that won't work when selecting a .exe or .com file only. Those registry keys are Global regardless. My bad. in order to use it only on exe's and com files Change "[HKEY_CLASSES_ROOTDirectoryBackgroundshellTest]" to "[HKEY_CLASSES_ROOTexefileshellTest]" and "[HKEY_CLASSES_ROOTcomfileshellTest]" Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\exefile\shell\Test] "MUIVerb"="Test" "SubCommands"="ex1;ex2;ex3" "icon"="exemenu.ico" [HKEY_CLASSES_ROOT\comfile\shell\Test] "MUIVerb"="Test" "SubCommands"="ex1;ex2;ex3" "icon"="commenu.ico" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex1] @="ex1" "Icon"="ex1.ico" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex1\command] @="Someexe.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex2] @="ex2" "Icon"="ex2.ico" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex2\command] @="Someexe.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex3] @="ex3" "Icon"="ex3.ico" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex3\command] @="Someexe.exe" Edited December 23, 2012 by careca Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
telmob Posted December 27, 2012 Author Share Posted December 27, 2012 (edited) Sorry i took so long to reply. xmas time..... Thanks for your help Careca. So... my new problem is the following. This works: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\Test] "MUIVerb"="Test" "SubCommands"="ex1;ex2;ex3" "icon"="*.ico" [HKEY_CLASSES_ROOT\exefile\shell\Test] "MUIVerb"="Test" "SubCommands"="ex1;ex2;ex3" "icon"="exemenu.ico" [HKEY_CLASSES_ROOT\comfile\shell\Test] "MUIVerb"="Test" "SubCommands"="ex1;ex2;ex3" "icon"="commenu.ico" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex1] @="ex1" "Icon"="ex1.ico" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex1\command] @="Someexe.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex2] @="ex2" "Icon"="ex2.ico" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex2\command] @="Someexe.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex3] @="ex3" "Icon"="ex3.ico" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex3\command] @="Someexe.exe" But this doesn't: RegWrite("HKEY_CLASSES_ROOT\Directory\shell\Test", "MUIVerb", "REG_SZ", "Test") RegWrite("HKEY_CLASSES_ROOT\Directory\shell\Test", "SubCommands", "REG_SZ", "ex1;ex2;ex3") RegWrite("HKEY_CLASSES_ROOT\Directory\shell\Test", "icon", "REG_SZ", "*.ico") RegWrite("HKEY_CLASSES_ROOT\exefile\shell\Test", "MUIVerb", "REG_SZ", "Test") RegWrite("HKEY_CLASSES_ROOT\exefile\shell\Test", "SubCommands", "REG_SZ", "ex1;ex2;ex3") RegWrite("HKEY_CLASSES_ROOT\exefile\shell\Test", "icon", "REG_SZ", "exemenu.ico") RegWrite("HKEY_CLASSES_ROOT\comfile\shell\Test", "MUIVerb", "REG_SZ", "Test") RegWrite("HKEY_CLASSES_ROOT\comfile\shell\Test", "SubCommands", "REG_SZ", "ex1;ex2;ex3") RegWrite("HKEY_CLASSES_ROOT\comfile\shell\Test", "icon", "REG_SZ", "commenu.ico") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex1", "", "REG_SZ", "ex1") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex1", "Icon", "REG_SZ", "ex1.ico") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex1\command", "", "REG_SZ", "Someexe.exe") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex2", "", "REG_SZ", "ex2") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex2", "Icon", "REG_SZ", "ex2.ico") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex2\command", "", "REG_SZ", "Someexe.exe") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex3", "", "REG_SZ", "ex3") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex3", "Icon", "REG_SZ", "ex3.ico") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex3\command", "", "REG_SZ", "Someexe.exe") what!? Apparentely this is the problem: RegWrite("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerCommandStoreshellex1", "", "REG_SZ", "ex1") Edited December 27, 2012 by telmob Link to comment Share on other sites More sharing options...
BrewManNH Posted December 27, 2012 Share Posted December 27, 2012 Try putting #RequireAdmin at the top of the script. HKLM is a protected section of the registry and you need the proper permissions for writing in it. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
telmob Posted December 27, 2012 Author Share Posted December 27, 2012 Thanks for the quick reply. Still doesn't work. I've even tried compiling it without luck. Link to comment Share on other sites More sharing options...
telmob Posted December 27, 2012 Author Share Posted December 27, 2012 (edited) Solved by using this: if stringinstr(@OSArch,"64") then $hklm="HKLM64" else $hklm="HKEY_LOCAL_MACHINE" endif So: RegWrite($hklm & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ex1", "", "REG_SZ", "ex1") Edited December 27, 2012 by telmob Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now