Shortcut for PDF File
Posted 09 December 2004 - 16:09
The problem I am having is when I try to create a shortcut for the pdf file. Using the registry functions, I get the path to acrord32.exe. When I try to invoke the Adobe Acrobat reader with the pdf file as an argument, it gives me an error message. Does anybody know the correct way to invoke the Acrobat Reader from the command line with a pdf file? Thanks.
Raj
Posted 10 December 2004 - 14:23
what error do you get?
please post that piece of code, so we can help you.
it should be no problem to start the acrord32 (as found in registry with complete path) with the pdf-to-show (with complete path) and maybe some params ...
Thomas
Posted 10 December 2004 - 18:30
if ( RegDBKeyExist (@APP_PATHS ^ @ACROBAT_PATH) < 0 ) then
MessageBox("Failed to create Surveillance Help entry", WARNING);
else
if (RegDBGetKeyValueEx(@APP_PATHS ^ @ACROBAT_PATH, "Path", nType, szDirValue, nvSize) < 0) then
MessageBox("Failed to create Surveillance Help entry", WARNING);
else
szAcrobatpathentry = szDirValue ^ @ACROBAT_PATH + " " + "FtpBasedSurveillanceSystem.pdf";
nResult = AddFolderIcon(ProgramFolder, // location
"Surveillance Help", // name
szAcrobatpathentry, // executable
svDir, // working dir.
"", // icon path
0, // icon no.
"", // shortcut key
REPLACE); // param. flag
if (nResult != 0) then
MessageBox("Failed to create Surveillance Help entry", WARNING);
endif;
endif;
endif;
I think there should be a better way to do this. I have been instructed to place the .pdf file in the menu. When the user selects the .pdf file, the Acrobat reader should come up and load the file automatically. My users said I should not try to hardcode this in.
Raj
Posted 10 December 2004 - 19:22
Raj
Posted 11 December 2004 - 06:56
For example, I make a variety of shortcuts in my setups such as PDF, HLP, HTML, and TXT.
Posted 11 December 2004 - 19:56
On Windows XP systems, I was unable to create a menu shortcut for the pdf. AddFolderIcon is unsuccessful in creating the menu shortcut.
Can you please show me source code which will implement this? I would greatly appreciate. I have never had problems using AddFolderIcon in creating shortcuts for executables, only with non-exe files.
Raj
Posted 12 December 2004 - 04:01
Therefore, based on my basic FAQ, are you using IS Pro 6.31 and do you have XP selected as a supported platform? 'cause otherwise it's not a properly supported OS.
Edited by Taco Bell, 12 December 2004 - 04:02.
Posted 13 December 2004 - 15:46
Raj
Posted 14 December 2004 - 02:59
Posted 14 December 2004 - 15:08
Posted 14 December 2004 - 16:15
CODE |
szAcrobatpathentry = svDir ^ "FtpBasedSurveillanceSystem.pdf" |
Windows should get the executable which is linked to the file extension and start it ...
Edited by Perotin, 14 December 2004 - 16:16.
Thomas
Posted 14 December 2004 - 19:27
Perotin has the right idea though and that is how I go about it.
Posted 15 December 2004 - 09:16
QUOTE |
Well I can assure you I'm not mistaken. |
So you have been mistaken, but you're not ...
difficulties for not-native-speakers ...
Edited by Perotin, 15 December 2004 - 09:17.
Thomas
Posted 15 December 2004 - 21:09