Ask a Question related to Adobe Acrobat Windows, Design and Development.
-
Russ_Seligman@adobeforums.com #1
Calling Acrobat file from WScript.Shell ActiveX object
WinXP, Acrobat 6
When I type the name of a PDF file at the Windows command prompt, the file opens properly. Then I create the following JavaScript script:
var WshShell = new ActiveXObject( "WScript.Shell" );
WshShell.Run( WScript.Arguments( 0 ) );
When I run this script and pass it the PDF filename (e.g., "scriptname foo.pdf"), nothing happens. Theoretically, this script should do nothing more than pass my arguments to the command line, but still nothing happens. This works fine on Acrobat 5, but doesn't work on Acrobat 6.
After much investigating, I have determined what's causing this problem. There's a registry entry in HKEY_CLASSES_ROOT\AcroExch.Document\shell\Open\com mand. The "default" registry entry points to my Acrobat installation, and this entry exists for both Acrobat 5 and 6. But with Acrobat 6, there's an additional entry:
command
REG_MULTI_SZ
34TL`lX!!!bQ'!!$,CC!ViewerProgramFiles>8$FU!6LT@Ax uDd[[]r{7 "%1"
I don't know what this entry is for, but when I delete it, then my script works fine. So apparently the call in the script is trying to use this (multibyte?) command, instead of the "default" command.
So deleting the entry is a manual workaround for this bug. But that's not a good general solution.
So can anyone suggest a way to get this script to work without having to delete the registry entry? Also, what does that registry entry do? And are there side-effects of deleting it?
Russ_Seligman@adobeforums.com Guest
-
WScript.Shell is not working after windows update
Group: I am using a method "Run" of the control "WScript.Shell" to execute a third party tool which converts TIFF to PDF. This was working fine... -
Q: ActivePerl - calling an ActiveX object
I have a 3rd-party ActiveX object (as a DLL) that I am trying to call from Perl (ActivePerl 5.8) The function that I am calling takes three 'in'... -
WScript.Shell to execute Ms-DOS commands?
Good morning everybody, How can I use WScript.Shell to execute Ms-DOS commands and can I see the outputs commands in the asp page? In the... -
WScript.Shell
It's most likely some sort of a permissions issue. The file is created and written to okay? What are you running in the batch file? Are you... -
Error:: Activex componet can not create object:"WScript.Shell"
I am trying to use the shell object to send keys to the explorer browser to run the send page funcion. I am receiving the above error only when I... -
Aandi_Inston@adobeforums.com #2
Re: Calling Acrobat file from WScript.Shell ActiveX object
Interesting. I see this set in a lot of places (e.g. Word documents).
I've found several questions but only one answer on the web: that it
is private data used by Windows Installer for "advertisment of file
types", whatever that means.
All I can think of is that if you are changing the executable manually
in the registry, you may be breaking the secret cross references in
the command subkey.
Aandi Inston
Aandi_Inston@adobeforums.com Guest



Reply With Quote

