WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > Check which Opera version is installed/Cannot read Opera HKLM key
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
voyteckst
Junior Member

Registered: Oct 2006
From: Poland

Check which Opera version is installed/Cannot read Opera HKLM key

Hi,

I have following problem. I have plugin for Opera and want to install it with NSIS. To check Opera "Plugin Path" I'm reading registry entries with ReadRegStr. But unfortunately Opera 9.x keeps its reg in HKCU and Opera 10.x keeps its reg in HKLM. I can read HKCU but cannot read HKLM (but only for Opera). Below sample code - commented entry is red properly. Changing spaces (in Opera reg) to no spaces results nothing. I'm running installer with admin rights:

code:
ReadRegStr $0 HKCU "Software\Opera Software" "Plugin Path" MessageBox MB_OK "$0" # ReadRegStr $1 HKLM "Software\RegisteredApplications" "Firefox" ReadRegStr $1 HKLM "Software\Opera Software" "Plugin Path" MessageBox MB_OK "$1" ${If} $0 != "" StrCpy $0 $INSTDIR ${ElseIf} $1 != "" StrCpy $1 $INSTDIR ${Else} MessageBox MB_ICONSTOP "Opera nie jest zainstalowana." Abort ${EndIf}

Quick Link | Report this post to a moderator | IP: Logged

voyteckst is offline Old Post 11-03-2009 01:52 PM
Click Here to See the Profile for voyteckst Click here to Send voyteckst a Private Message Find more posts by voyteckst Add voyteckst to your buddy list Edit/Delete Message Reply w/Quote
MSG
Senior Member

Registered: Oct 2006
From:

It's extremely unlikely that an admin wouldn't have read-access to that regkey, so if ReadRegStr doesn't read anything, that probably means the regstring doesn't exist (or is empty).

Quick Link | Report this post to a moderator | IP: Logged

MSG is offline Old Post 11-04-2009 07:40 AM
Click Here to See the Profile for MSG Click here to Send MSG a Private Message Find more posts by MSG Add MSG to your buddy list Edit/Delete Message Reply w/Quote
voyteckst
Junior Member

Registered: Oct 2006
From: Poland

The problem is, that this registry exists... I have another installers created and ReadRegStr allways work.

Quick Link | Report this post to a moderator | IP: Logged

voyteckst is offline Old Post 11-04-2009 07:53 AM
Click Here to See the Profile for voyteckst Click here to Send voyteckst a Private Message Find more posts by voyteckst Add voyteckst to your buddy list Edit/Delete Message Reply w/Quote
MSG
Senior Member

Registered: Oct 2006
From:

Maybe Opera 10 is a 64bits application? That would require you to use SetRegView 64. NSIS is a 32bits application so it obviously uses 32bits registry.

http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.7.6

Quick Link | Report this post to a moderator | IP: Logged

MSG is offline Old Post 11-04-2009 08:07 AM
Click Here to See the Profile for MSG Click here to Send MSG a Private Message Find more posts by MSG Add MSG to your buddy list Edit/Delete Message Reply w/Quote
voyteckst
Junior Member

Registered: Oct 2006
From: Poland

Ok, I've got solution. This error was because of manually created reg entry in HKLM. I have exported it, deleted and re-imported and now it works fine (but I'm unable to see this reg with regedit... nevermind).

Quick Link | Report this post to a moderator | IP: Logged

voyteckst is offline Old Post 11-04-2009 08:33 AM
Click Here to See the Profile for voyteckst Click here to Send voyteckst a Private Message Find more posts by voyteckst Add voyteckst to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 04:37 AM. Post New Thread    Post A Reply
  Last Thread   Next Thread
WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > Check which Opera version is installed/Cannot read Opera HKLM key
Show Printable Version
 | 
Email this Page
 | 
Subscribe to this Thread

Forum Jump:
 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is off
vB code is ON
Smilies are ON
[IMG] code is ON