Article View: borland.public.delphi.commandlinetools
Article #275Re: opening the Delphi application with the working file you double-clicked
From: Frank Van Overwalle
Date: Fri, 04 Feb 2005 08:45
Date: Fri, 04 Feb 2005 08:45
42 lines
2804 bytes
2804 bytes
Hi Mike, Thanks for the help. But how do I tell InstallShield 3.5 to change the registry so that I can add %1 at the end of the command line? I tried to drag and paste the registry key from HKEY_CLASSES_ROOT in the source to the destination in order to edit the key (as indicated in the InstallShield 3.5 help), but that does not work. So I could not even try editing the key. Is there another way? Thanks for helping out. "Mike Williams (TeamB)" <mlwilliams@gmail.com> wrote in message news:42024511$1@newsgroups.borland.com... > Frank Van Overwalle wrote: > >> Like is customary in Word, Excel and so on, once you double-click a >> working document, and Word opens with that particular working file. >> >> Similarly, I want to open my Delphi Application (fit.exe) with the >> file that I double-clicked (eg, test.ft2). The installshield already >> takes care of linking the application with the *.ft2 extension, but >> how can I tell the program which working file was clicked last? How >> can it "read" that filename from Windows? >> >> Thanks for helping out. > > When you set up the file association in windows you specify how the > program should handle the file. Generally the filename is passed on > the command line. For instance, notepad.exe is typically associated > with *.TXT files and if you look at the settings for that you'll see > something like the following: > > C:\WINDOWS\system32\NOTEPAD.EXE %1 > > The name of the file that was launched is passed in place of the %1. > Therefore, in your application you just need to open the file passed as > ParamStr(1). > > -- > -Mike (TeamB)
Technical Details
Message-ID:
<420336aa@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4202421a@newsgroups.borland.com> <42024511$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: ff8f1,cb1989cda2056a17 X-Google-Attributes: gidff8f1,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Frank Van Overwalle" <Frank.VanOverwalle@vub.ac.be> From: "Frank Van Overwalle" <Frank.VanOverwalle@vub.ac.be> Newsgroups: borland.public.delphi.commandlinetools References: <4202421a@newsgroups.borland.com> <42024511$1@newsgroups.borland.com> Subject: Re: opening the Delphi application with the working file you double-clicked Date: Fri, 4 Feb 2005 09:45:33 +0100 Lines: 44 Organization: Vrije Universiteit Brussel X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: 134.184.35.54 Message-ID: <420336aa@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1107506858 134.184.35.54 (4 Feb 2005 00:47:38 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail