Yashied Posted August 1, 2010 Posted August 1, 2010 (edited) This function opens a registry editor (regedit.exe) in the specified hive ($sKey). Enjoy!expandcollapse popup_RegJump('HKCR\AutoIt3Script') Func _RegJump($sKey) Local $Root, $Text = StringSplit($sKey, '\', 2) If IsArray($Text) Then $Text = $Text[0] Else $Text = $sKey EndIf Switch $Text Case 'HKEY_CLASSES_ROOT', 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE', 'HKEY_USERS', 'HKEY_CURRENT_CONFIG' $Root = $Text Case 'HKCR' $Root = 'HKEY_CLASSES_ROOT' Case 'HKCU' $Root = 'HKEY_CURRENT_USER' Case 'HKLM' $Root = 'HKEY_LOCAL_MACHINE' Case 'HKU' $Root = 'HKEY_USERS' Case 'HKCC' $Root = 'HKEY_CURRENT_CONFIG' Case Else Return 0 EndSwitch Local $Class = '[CLASS:RegEdit_RegEdit]' Local $Key = 'HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit' Local $Delay = Opt('WinWaitDelay', 0) Local $Prev, $Result = 1 If WinExists($Class) Then WinClose($Class) If Not WinWaitClose($Class, '', 5) Then $Result = 0 EndIf EndIf If $Result Then $Prev = RegRead($Key, 'Lastkey') If @error Then $Prev = 0 EndIf If Not RegWrite($Key, 'Lastkey', 'REG_SZ', StringReplace($sKey, $Text, $Root, 1)) Then $Result = 0 Else If Not Run('regedit.exe') Then $Result = 0 If IsString($Prev) Then RegWrite($Key, 'Lastkey', 'REG_SZ', $Prev) EndIf EndIf EndIf EndIf Opt('WinWaitDelay', $Delay) Return $Result EndFunc ;==>_RegJump Edited December 22, 2013 by Yashied ahmettben and JScript 2 My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
JScript Posted August 1, 2010 Posted August 1, 2010 @Yashied Cool, I'll use on my WindowsXP LiveCD (CDLogon.au3)!!! http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!
Fire Posted August 1, 2010 Posted August 1, 2010 (edited) Before i used regjump utlity from Sysinternals for this tasks.But now no need use it! Really Great! Thank you very much Yashied. +5 from me for Great Job. Thank you. Edited August 1, 2010 by Fire [size="5"] [/size]
Digisoul Posted August 3, 2010 Posted August 3, 2010 Good Job Yashied. 73 108 111 118 101 65 117 116 111 105 116
gcue Posted September 21, 2010 Posted September 21, 2010 yashield, this works awesome.. any chance we can get it working when checking remote pc registry? i tried changing that last key to a remote registry path - didnt work i also opened regedit, chose a remote path manually, exited regedit... saw that the lastkey value was the remote registry path "hostname\hklm.." but this didnt work. *sigh* any ideas?
ahmettben Posted April 3, 2012 Posted April 3, 2012 (edited) how to use the sample.? #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 401, 258, 192, 124) $Button1 = GUICtrlCreateButton("HKLM-Run", 151, 192, 99, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 "HKLMSOFTWAREMicrosoftWindowsCurrentVersionRun";go key EndSwitch WEnd Edited April 3, 2012 by ahmettben
JScript Posted April 3, 2012 Posted April 3, 2012 (edited) Hi, Like this: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 401, 258, 192, 124) $Button1 = GUICtrlCreateButton("HKLM-Run", 151, 192, 99, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _RegJump('HKLMSOFTWAREMicrosoftWindowsCurrentVersionRun') EndSwitch WEnd Regards, João Carlos. Edited April 3, 2012 by JScript ahmettben 1 http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!
guinness Posted April 3, 2012 Posted April 3, 2012 (edited) You have to include the function _RegJump into your script. Please read the Help file about Functions as this is a problem that can be easily solved by simply understanding of how AutoIt works. Edited April 3, 2012 by guinness JScript 1 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
JScript Posted April 3, 2012 Posted April 3, 2012 You forgot to add the function in your script! Regards, João Carlos. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!
guinness Posted April 3, 2012 Posted April 3, 2012 (edited) No, copy the function above and paste into your code. Seriously open that Help file and start learning about functions.Like this:; Your code Func _RegJump() ; UDF code. EndFuncIf it doesn't work this time post in your own thread as you're hijacking this example thread with questions that can be answered by reading the Help file. Edited April 3, 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
spf Posted May 5, 2013 Posted May 5, 2013 (edited) RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit', 'LastKey', 'REG_SZ', '. . .') run('regedit -m') Edited May 5, 2013 by spf
4EverMaAT Posted September 16, 2019 Posted September 16, 2019 On 8/2/2010 at 3:12 AM, Fire said: Before i used regjump utlity from Sysinternals for this tasks.But now no need use it! Really Great! Thank you very much Yashied. +5 from me for Great Job. Thank you. But with regjump (SysInternals) there was a switch -c that allowed the program to automatically read clipboard contents and jump to that location. Can this autoit script do (or be made to do) something similar? I could run a shortcut that would then check clipboard contents for registry key and jump to it. Earthshine 1
Earthshine Posted September 16, 2019 Posted September 16, 2019 Why are you Necroposting? Start your own thread 4EverMaAT 1 My resources are limited. You must ask the right questions
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