Registry shell to determine acrobat command

29 views
Skip to first unread message

Joshua Barney

unread,
Nov 6, 2012, 10:36:25 AM11/6/12
to InterSy...@googlegroups.com
I am trying to shell out either Acrobat.exe or AcroRd32.exe depending on which the workstation has installed. I want to be able to use the /N /T operators to open and silently print a new instance of acrobat for each file.
To determine which version the workstation has I am trying to shell out the following command to save the value of the acrobat registry information so that I can find out if the user's PC has either acrobat.exe or AcroRd32.exe on their system for chaining PDF merges. From command line I would run:
REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AcroExch.Document\Shell\Open\Command >C:\OUTGOING\josh.txt
the different commands that I have tried so far are:
      JOB = 'REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AcroExch.Document\Shell\Open\Command >C:\OUTGOING\josh.txt'
      PRINT CHAR(27):CHAR(2):">":JOB:CHAR(13)
This runs but does not write the capture file
      PRINT CHAR(27):CHAR(2):"P":JOB:CHAR(13)
This errors out
      PRINT CHAR(27):CHAR(2):JOB:CHAR(13)
This crts EG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AcroExch.Document\Shell\Open\Command >C:\OUTGOING\josh.tx

Any suggestion for the inline operator would be great.

Ed Clark

unread,
Nov 6, 2012, 10:50:53 AM11/6/12
to InterSy...@googlegroups.com
You should probably ask this on Accuterm's support lists. but...
Look at Accuterm's documentation for the Shell() function. Your code needs to look something like this:

CRT CHAR(27):CHAR(2):'P':'Shell("':JOB:'",opt)':CHAR(13)
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
> To post to this group, send email to Cac...@googlegroups.com
> To unsubscribe from this group, send email to CacheMV-u...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/CacheMV?hl=en

Joshua Barney

unread,
Nov 6, 2012, 1:23:17 PM11/6/12
to InterSy...@googlegroups.com
      JOB = ";REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AcroExch.Document\Shell\Open\Command >C:\OUTGOING\josh.txt"
      PRINT CHAR(27):CHAR(2):">;REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AcroExch.Document\Shell\Open\Command >C:\OUTGOING\josh.txt":CHAR(13)

Never got an answer back from accuterm but I kept tinkering and using ";" will allow you to run the command prompt line and save the results
Reply all
Reply to author
Forward
0 new messages