Article View: borland.public.cppbuilder.nativeapi
Article #15678Re: How to run a app when restart
From: Giuliano
Date: Fri, 20 Jun 2003 17:41
Date: Fri, 20 Jun 2003 17:41
39 lines
2352 bytes
2352 bytes
On Sat, 21 Jun 2003 01:24:09 +0800, "Sky" <huangc913@msn.com> wrote: >hello everybody > >some installation need restart computer when installing, >and it will auto start after restarting, is it like the >auto run group, add it to startup group? or other method? >any hint? >TIA > >Sky > At system level (i.e. you don't need to login) there are two registry keys that are used to start a program once when the system starts: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx Just put the string(s) with the name of your executable, then - at the next machine boot - you will see executing the program. For example: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce] "MyProg"="MyProg.exe" There is an ulterior key used to start programs whenever the system starts: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run At the user level, there are two other registry keys: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce The former executes programs each time a user logs in with that profile, instead the latter executes the program only once the next time that an user logs in with that profile. Giuliano
Technical Details
Message-ID:
<pog6fv4uv71j3d2mi21v94i9ib9cl8oq9m@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3ef34338@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,631f8a9b91e587b1 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-06-20 10:55:00 PST From: Giuliano <gcardinali@remove.adhoc.net> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: How to run a app when restart Date: Fri, 20 Jun 2003 19:41:10 +0200 Message-ID: <pog6fv4uv71j3d2mi21v94i9ib9cl8oq9m@4ax.com> References: <3ef34338@newsgroups.borland.com> X-Newsreader: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 213.152.192.189 X-Trace: newsgroups.borland.com 1056131112 213.152.192.189 (20 Jun 2003 10:45:12 -0700) Lines: 39 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail