|
All,
A February thread in this list described how to use 'rundll32.exe' via STRPCCMD
to access PC documents from an RPG application. This works well, but rundll32
only provides one parameter - the file name.
Executing the command: STRPCCMD PCCMD('rundll32 url.dll,FileProtocolHandler
"mysheet.xls"') does indeed call Excel from a green-screen app, but does not
permit passing the /r 'read only' switch that prevents users from altering the
document. We would like to prevent that.
Microsoft document
http://support.microsoft.com/default.aspx?scid=kb;en-us;283225 indicates the
"url.dll,FileProtocolHandler" technique is old-school and
"shell32.dll,ShellExecute" should be used instead. It appears that
"ShellExecute"
does allow params to be passed, but I'll be darned if it will work for me.
Any number of variations of the string:
"STRPCCMD PCCMD('rundll32 shell32.dll,ShellExecute
0,"open","z:\mysheet.xls","/r","",5') " have been tried but they all end up with
a Windows error box "An exception occurred while trying to run
"shell32.dll,ShellExecute...". Am I just having trouble with single- and
double-quotes or is there something fundamentally deeper that I don't understand
about passing params to PC programs?
JK
---- Msg sent via Internet America Webmail - http://www.internetamerica.com/
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.