🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Excel Exists on machine?

#13824
From: Shane Stump
Date: Wed, 17 Sep 2003 03:06
45 lines
2176 bytes
I used code like the following:

bool IsExcelInstalled(void)
{
   bool bExcelInstalled = false;

  std::auto_ptr<TRegistry> pRegistry(new TRegistry);
  pRegistry->RootKey = HKEY_CLASSES_ROOT;
  if (pRegistry->OpenKey("Excel.Application",false) == true)
  {

     bExcelInstalled = true;
     pRegistry->CloseKey();
  }

  return bExcelInstalled;
}

Regards,

Shane

"Ed Mulroy [TeamB]" <ed@mulroyREMOVETHESECHARS.org> wrote in message
news:3f67b90a@newsgroups.borland.com...
> You could attack it in a couple of ways.
>
> Search for excel.exe
>
> Look for file associations in the registry.
>   For instance HKEY_CLASSES_ROOT\.csv with a value of "Excel.CSV"
>   or one of the other associations it registers such as .xls
>
> All the file associations tell you however is if excel has once been on
the
> machine.  Only searching for excel.exe will tell you that it is on the
> machine now.
>
> .  Ed
>
> > Shane Stump wrote in message
> > news:3f67b06e$1@newsgroups.borland.com...
> > What is the easiest way to tell if a version of Excel is
> > installed on a machine?
>
>
Technical Details
Message-ID: <3f67cfa0$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f67b06e$1@newsgroups.borland.com> <3f67b90a@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,6956ac1eb736942d
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-16 20:09:40 PST
Reply-To: "Shane Stump" <ShaneStump@TanstaaflSoftware.com>
From: "Shane Stump" <ShaneStump@TanstaaflSoftware.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f67b06e$1@newsgroups.borland.com> <3f67b90a@newsgroups.borland.com>
Subject: Re: Excel Exists on machine?
Date: Tue, 16 Sep 2003 22:06:07 -0500
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 209.219.240.162
Message-ID: <3f67cfa0$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1063767968 209.219.240.162 (16 Sep 2003 20:06:08 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail