Jump to content

Recommended Posts

Posted

Greeting,

Can anybody help me for the code below?

Local $var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinRAR archiver", "UninstallString")

MsgBox(4096, "KEY", $var)

I am try to get the result "C:\Program Files\WinRAR\uninstall.exe" which I can get from Regedit. but for some reason, the msgbox show me nothing just the title "KEY"

BUT:

in same time, the demo code work,

Local $var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir")

MsgBox(4096, "Program files are in:", $var)

Thanks

usera

Posted

is that possible rights (registry) issue? , if yes, how can I get that information?

  On 9/24/2012 at 3:07 PM, 'usera said:

Greeting,

Can anybody help me for the code below?

Local $var = RegRead("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstallWinRAR archiver", "UninstallString")

MsgBox(4096, "KEY", $var)

I am try to get the result "C:Program FilesWinRARuninstall.exe" which I can get from Regedit. but for some reason, the msgbox show me nothing just the title "KEY"

BUT:

in same time, the demo code work,

Local $var = RegRead("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersion", "ProgramFilesDir")

MsgBox(4096, "Program files are in:", $var)

Thanks

usera

Posted

Thanks Colyn1337,

now it is:

Local $var = RegRead("HKLMSOFTWAREMicrosoftWindowsCurrentVersionUninstallWinRAR archiver", "UninstallString")

still same

  On 9/24/2012 at 3:11 PM, 'Colyn1337 said:

Try using "HKLM" at the beginning instead of HKEY_LOCAL_MACHINE

  On 9/24/2012 at 3:11 PM, 'Colyn1337 said:

Try using "HKLM" at the beginning instead of HKEY_LOCAL_MACHINE

Posted

  On 9/24/2012 at 3:11 PM, 'Colyn1337 said:

Try using "HKLM" at the beginning instead of HKEY_LOCAL_MACHINE

Why? They're both the same.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

  On 9/24/2012 at 3:15 PM, 'guinness said:

Why? They're both the same.

I've had better luck with the shortname, there's a limit to how long the reg query string can be. Tho offhand I don't recall what it is.

@usera

is it a 64bit box? If so you'll want to use HKLM64

Also, add this code right after your regread() so maybe we can catch an error:

If @error Then msgbox(0, "error", @error)

if there's a number in the error text box, please post it.

Edited by Colyn1337
Posted

  On 9/24/2012 at 3:29 PM, 'Colyn1337 said:

I've had better luck with the shortname, there's a limit to how long the reg query string can be.

Strange as I've never come across this issue.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

Thanks colyn1337,

Changed to HKLM64 it works, yes it is 64 bit OS

Thanks

  On 9/24/2012 at 3:29 PM, 'Colyn1337 said:

I've had better luck with the shortname, there's a limit to how long the reg query string can be. Tho offhand I don't recall what it is.

@usera

is it a 64bit box? If so you'll want to use HKLM64

Also, add this code right after your regread() so maybe we can catch an error:

If @error Then msgbox(0, "error", @error)

if there's a number in the error text box, please post it.

Posted

  On 9/24/2012 at 3:48 PM, 'Colyn1337 said:

Always a pleasure.....

Happy scripting!

Thanks again,

How or where you get the hklm64 information?

Posted

Help file surprisingly.

  Quote

When running on 64-bit Windows if you want to read a value specific to the 64-bit environment you have to suffix the HK... with 64 i.e. HKLM64.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

  On 9/24/2012 at 4:08 PM, 'guinness said:

Help file surprisingly.

why this one ok?

Local $var = RegRead("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersion", "ProgramFilesDir")

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...