RegDelete

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
millansoft
Posts: 47
Joined: 19 Aug 2016, 10:10

RegDelete

21 Nov 2017, 22:34

Hello,

I need to delete a pair of SubKeys,

RegDelete, HKEY_CURRENT_USER\Software\PlayTok
RegDelete, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\winrave.exe

The first one, PlayTok, gets deleted fine, the problem is the second one, it remains untouched, not sure if its because of the space in "App Paths" or the dot in winrave.exe

Anyone could help me?

Thanks a lot
User avatar
KuroiLight
Posts: 327
Joined: 12 Apr 2015, 20:24
Contact:

Re: RegDelete

21 Nov 2017, 22:38

check the value of A_LastError after regdelete, here is a the list of error codes: System Error Codes
Last edited by KuroiLight on 21 Nov 2017, 23:04, edited 1 time in total.
Windows 10, Ryzen 1600, 16GB G.Skill DDR4, 8GB RX 480 | [MyScripts][MySublimeSettings] [Unlicense][MIT License]
01/24/18
[/color]
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: RegDelete

21 Nov 2017, 22:58

You may need to run the script as Admin to modify certain parts of the registry. This code will reopen a non-admin script as admin.

Code: Select all

if !A_IsAdmin
	Run, % "*RunAs " (A_IsCompiled ? "" : A_AhkPath " ") Chr(34) A_ScriptFullPath Chr(34)
Do report back with the error code. Cheers.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
millansoft
Posts: 47
Joined: 19 Aug 2016, 10:10

Re: RegDelete

21 Nov 2017, 23:08

Thanks a lot, was the Admin thing, just confused because it deleted the first one. Thanks again.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ntepa, scriptor2016, vanove and 187 guests