🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10419

Re: ShellExecute on LNK files

#10419
From: Marc
Date: Wed, 28 Apr 2004 19:16
49 lines
2190 bytes
Hi

I am desparetly reposting this question, I am searching 
everywhere and still can't find the answer, I am beginning to 
wonder if this is even possible.

I can get any LNK file to run except office XP and 2003, has anyone ever experienced this problem.  I have previously 
posted code and a description of the error I am getting
Any type of suggestion is welcomed.

Thanks for your time
Marc


"Marc" <bukwheat@axess.com> wrote:
>
>Hi
>
>Does anyone know why a ShellExecute does not work on LNK files
>of OfficeXP and 2003.  This works with most LNK files but not 
>office.  
>
>I get an Invalid Parameter error.
>
>Thanks in advance for the help
>Marc
>
>PS:
>Here is my code, maybe I am not seeing something obvious.
>
>void __fastcall TForm1::Button1Click(TObject *Sender)
>{
>    SHELLEXECUTEINFO execinfox;
>    memset (&execinfox, 0, sizeof (execinfox)) ;
>    execinfox.cbSize = sizeof (execinfox) ;
>    execinfox.lpVerb = "open" ;
>    execinfox.lpDirectory = "C:\\Documents and Settings\\All Users\\Start Menu\\Programs\\Office XP";
>    execinfox.lpFile = "Microsoft Excel.lnk";
>    execinfox.lpParameters = "";
>
>    // Run the program.
>    if (! ShellExecuteEx (&execinfox))
>    {
>        ShowMessage ("Could not create process");
>        return ;
>    }
>}
>
Technical Details
Message-ID: <40900315$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <408036d4$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,7148159e8e963fa1
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-04-28 12:40:37 PST
From: "Marc" <Bukwheat@axess.com>
Sender: "Marc" <Bukwheat@axess.com>
Reply-To: "Marc" <Bukwheat@axess.com>
Subject: Re: ShellExecute on LNK files
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 138.11.254.204     
X-Forwarded-For: unknown
References:  <408036d4$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <40900315$1@newsgroups.borland.com>
Date: 28 Apr 2004 12:16:37 -0700
X-Trace: newsgroups.borland.com 1083179797 207.105.83.66 (28 Apr 2004 12:16:37 -0700)
Lines: 50
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail