LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

two questions on system path and exe launching

Hi all,

How to retrieve the system directory path under windows ? I want to use it to check if a file exist. Is there a variable defined for this directory ?

I launch acrobat reader to load a help file with the LauncExecutable function. Is there a way to already send a command to acrobat to have a display looking like when pressing F5 key. I tried fakekeystroke but it doesn't work.

Thanks

ArnO
0 Kudos
Message 1 of 3
(3,132 Views)
Hi Arno...
The answer to the first question is easy... try using the function GetWindowDirs()from the system configuration section of the programmer's toolbox (toolbox.fp)
This returns the path of the windows installation and the system directory...

As for the F5 question... Pressing F5 togles the bookmark display. You don't say which option (bookmarks shown or hidden) you actually want.
Now I'm sure someone will correct me if I'm wrong, but I think that acrobat will display a document in bookmark view if bookmarks exist in the PDF, and not if they don't, so there is no way to force the startup display unless you have access to PDF writing software.
If you are using launcheExecutable to run acrobat, then I can't see anyway that you could programatically change
this either. One option would be to run acrobat as an activeX server, and you would probably be able to control the display mode (I haven't checked this... just guessing!!) Of course the extra work of writing the activeX code may well persuade you that the default view isn't so bad...
Message 2 of 3
(3,132 Views)
Thank you Slaine for your answers.

For the second point my pdf file is generated from word by acrobat maker and the summary of my word doc is shown as a bookmark display under acrobat reader if I toggle the F5 key. I will check if I can insert infos in my pdf with acrobat maker to force acrobat reader to activate the bookmark automatically. The activeX solution is to long for my deadlines.

ArnO
0 Kudos
Message 3 of 3
(3,132 Views)