Having a bit of trouble finishing a function that, after it verifies the path of a document, uses
pdfInstallPath = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\MyApp\\27", "InstallPath", true);
File.Open(pdfInstallPath.."sample.pdf", "", SW_SHOWNORMAL);
*pdfInstallPath returns the correct pathing information, without the trailing backslash.
This code returns "The Specified File could not be found" (after being run through:
--Check to see if an error occurred.
error = Application.GetLastError();
-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end
I have tried appending the backslash \ using .. and \\, but have not had any luck. If you could tell me where I'm going wrong, it would be appreciated.
Thanks again for your time and help
- Thomas
pdfInstallPath = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\MyApp\\27", "InstallPath", true);
File.Open(pdfInstallPath.."sample.pdf", "", SW_SHOWNORMAL);
*pdfInstallPath returns the correct pathing information, without the trailing backslash.
This code returns "The Specified File could not be found" (after being run through:
--Check to see if an error occurred.
error = Application.GetLastError();
-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end
I have tried appending the backslash \ using .. and \\, but have not had any luck. If you could tell me where I'm going wrong, it would be appreciated.
Thanks again for your time and help
- Thomas
Comment