🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Remove program from windows startup problem

#12391
From: Martin C
Date: Fri, 05 Dec 2003 20:40
19 lines
1403 bytes
Hi,

I am trying to remove my program from the windows startup list in the
registry programmatically using the following code:

TRegistry *Registry = new TRegistry;
Registry->RootKey = HKEY_LOCAL_MACHINE;
if(Registry->OpenKey("\\Software\\Microsoft\\Windows\\CurrentVersion\\Run",
false)==true)
{
        Registry->DeleteKey("Project1");
}

but unfortunately the code doesn't do anything and the program can't be
removed from the registry !!!

Can someone tell me please what exactly I am doing wrong, or missing here...

thanks
Technical Details
Message-ID: <3fd0ed25@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,ff7b3ea91fca4aca,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-12-05 13:10:10 PST
From: "Martin C" <martinc@aol.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Remove program from windows startup problem
Date: Fri, 5 Dec 2003 12:40:06 -0800
Lines: 21
Organization: V Safe
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: 81.10.4.238
Message-ID: <3fd0ed25@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1070656805 81.10.4.238 (5 Dec 2003 12:40:05 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail