Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 10th, 2025, 9:25 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: ReadRegistryKey
PostPosted: May 17th, 2006, 4:11 pm 
Offline

Joined: November 5th, 2004, 2:01 pm
Posts: 17
Location: Preston
OK - I need to check if acrobat reader is installed on the end user machines, I know that you use

var areader = ReadRegistryKey("HKEY_LOCAL_MACHINE\\SOFTWARE\\Adobe\\Acrobat Reader")

or at least I hope that's right, but for the life of me I cannot get it to work.

All I want is to be able to to do is have a popup box appear if it is not installed

I have acrobat reader on the CD, but I need to let them know that it has to be installed. I've spoken to one or two of the end users and they haven't a clue, so putting a note that says "install acrobat reader if necessary" isn't going to work.

Any help would be gratefully received and would hopefully save the last of my hair :?

Thanks

David


For this message Davinor has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Reg Read
PostPosted: May 17th, 2006, 4:18 pm 
Offline

Joined: November 10th, 2004, 5:21 pm
Posts: 26
Location: Cranwell, Lincolnshire
David,
Get FoxitReader from here:
www.foxitsoftware.com/foxitreader/
It's free, does not need to be installed and reads pdf files.
Using Opus you can launch the exe file with the option parameter of the pdf you want to be viewed and it works a treat.
Regards
John


For this message John Beal has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: May 17th, 2006, 5:25 pm 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
You have missed the second parameter from the call to ReadRegistryKey(()

Syntax:
ReadRegistryKey( RegistryPath, Key )

Return:
The data contained within the Key. For example, if the RegistryPath entered was for Illuminatus Opus Pro and the specified registry key was "Version", the return value would be the current version installed on your computer.
If the key does not exist the return string is empty.

Parameters:
RegistryPath – This is the path where the registry file is stored. This parameter is required and must be surrounded by quote marks.
Key – Enter the name of the registry key. The Return Value will be the value of this key. This parameter is required and must be surrounded by quote marks.

_________________
ddww Opus Developer


For this message Duncan Lilly has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: May 18th, 2006, 11:32 am 
Offline

Joined: November 5th, 2004, 2:01 pm
Posts: 17
Location: Preston
Hi Folks
It's obvious even to me that I am denser than normal. :?
I need to check that acrobat reader is installed on an end users machine and if it is not, change the page to the installation page.

HOW DO I DO IT!!! 'cos it's driving me nuts :evil:

David


For this message Davinor has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: May 18th, 2006, 1:20 pm 
Offline

Joined: November 3rd, 2004, 2:11 pm
Posts: 323
Take a look at this post. I've tried it with Acrobat Reader 7.07 installed and uninstalled and it works.

http://www.digitalgrapevine.info/viewtopic.php?t=1202&highlight=readregistrykey

If you have additional questions on how to employ it, post away.

For example, I took your variable and assigned it either YES or NO based on the presence of Reader. You could then take it further by saying if NO go to such and such a page, and if YES, launch your PDF.

Code:
for (i=7;i>3; i--)   
{
  strPath = SYSTEM_PROGRAMS_DIR + "\\Adobe\\Acrobat " + i.toString()+".0\\Reader\\AcroRd32.exe"
  strFile = OpenFile(strPath,false,true)
  if (strFile != null)
  {
areader='YES';
  }
else{
areader='NO';
}
}

_________________
Opus Pro XE 9.1 Win7 64-bit Core i3 8MB RAM


For this message bwpatric has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: May 18th, 2006, 1:46 pm 
Offline

Joined: November 5th, 2004, 2:01 pm
Posts: 17
Location: Preston
Hi
Thanks for that - I'd have been here at christmas cursing fluently.
I copied the script into the publication, however it happily tells me that it is not installed.. it is.


strFile = OpenFile(strPath,false,true)
if (strFile != null)
{
areader='YES';
}
else{
areader='NO';
}
}

I understand sort of - how it is put together but if

if (strFile != null)

is true shouldn't "yes" and "no" be reversed

of course I could be completely wrong - it wouldn't be the first time.

David


For this message Davinor has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: May 18th, 2006, 2:22 pm 
Offline

Joined: November 3rd, 2004, 2:11 pm
Posts: 323
if (strFile != null)

This says that if strFile is not null, i.e., there is something there, then Adobe is installed.

Otherwise it means nothing is installed because nothing's there.

_________________
Opus Pro XE 9.1 Win7 64-bit Core i3 8MB RAM


For this message bwpatric has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: May 18th, 2006, 2:29 pm 
Offline

Joined: November 5th, 2004, 2:01 pm
Posts: 17
Location: Preston
OK - I'll go with that, so any ideas why it thinks I have not got reader installed?
the path for it is
Program Files\Adobe\Acrobat 7.0\Reader\AcroRead32.exe

David


For this message Davinor has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: May 18th, 2006, 2:35 pm 
Offline

Joined: November 3rd, 2004, 2:11 pm
Posts: 323
Would it be possible to send me your publication?

_________________
Opus Pro XE 9.1 Win7 64-bit Core i3 8MB RAM


For this message bwpatric has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: May 19th, 2006, 11:26 am 
Offline

Joined: November 5th, 2004, 2:01 pm
Posts: 17
Location: Preston
Thank You, Thank You, Thank You, Thank You, Thank You, Thank You, Thank You, Thank You, Thank You, Thank You, Thank You, Thank You,

I humbly bow to your obviously superior intelligence :D

Never in a month of Sunday's would I have got that - may I suggest it is posted somewhere under the incredibly useful things you need (samples and tutorials) so that others may have access to it.

David[/i]


For this message Davinor has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 64 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group