Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

programmatically launch a program when location is unknown

$
0
0

I need my program to launch an app, as though from a command line. The problem is that I don't know the path to the app. I have tried various forms of SYSTEM, RUNQQ, FINDFILEQ, and FULLPATHQQ to no avail.

The particular present example is launching Adobe Reader, so I need to execute the file AcroRead32.exe. As far as I can see, my program needs the complete to this file in order to launch it. 

I know that I can do a SYSTEM call like "Dir C:\AcroRead32.exe /s > parsethis.txt", and then write code to extract the path from this txt output file. But surely there must be a better way? Even this solution assumes that the app is in the C: drive.

Isn't there some way to return the path to an arbitrary filename from within Fortran?


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>