473,473 Members | 3,363 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Making an app run at system startup

7 New Member
Hello again,
I googled for a way to make my app run at Windows startup and it seems that there are several ways to do it:

- add an appropriate key to the registry
http://aspn.activestate.com/ASPN/Coo.../Recipe/174627
http://www.windowsdevcenter.com/pub/...rtup_0401.html (VB specific but a good description anyway)

- add a shortcut (.lnk file) to Program Files/Autostart
http://mail.python.org/pipermail/pyt...er/015874.html

Which is the best method? I always thought of Autostart as a place for the user to manually add shortcuts and I don't particularly fancy messing with the registry by hand. I expected where would be some simple, ready-made way to do what I want (WinAPI?) but I can't seem to find any.

TIA,
Greg
Nov 1 '07 #1
2 1562
borthouth
7 New Member
If you don't want it to run on startup you can always run a PY file as a service.

If its a windows machine search "srvany" in google, but if you get into trouble and need an example I can provide you with one.
Nov 1 '07 #2
bartonc
6,596 Recognized Expert Expert
Hello again,
I googled for a way to make my app run at Windows startup and it seems that there are several ways to do it:

- add an appropriate key to the registry
http://aspn.activestate.com/ASPN/Coo.../Recipe/174627
http://www.windowsdevcenter.com/pub/...rtup_0401.html (VB specific but a good description anyway)

- add a shortcut (.lnk file) to Program Files/Autostart
http://mail.python.org/pipermail/pyt...er/015874.html

Which is the best method? I always thought of Autostart as a place for the user to manually add shortcuts and I don't particularly fancy messing with the registry by hand. I expected where would be some simple, ready-made way to do what I want (WinAPI?) but I can't seem to find any.

TIA,
Greg
I've always preferred to use the startup directory/shortcut, myself.

The ASPN recipe that you link to is quite old. These days there is the _winreg module for such tasks.
Expand|Select|Wrap|Line Numbers
  1. instacalKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,
  2.                             "SOFTWARE\Universal Library")
  3. self.pmdPath = str(_winreg.QueryValueEx(instacalKey, 'RootDir')[0])
Here are the docs: 22.2 _winreg - Windows registry access.
Nov 1 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
10
by: WhiteSocksGuy | last post by:
Help! I am new to Visual Basic .Net (version 2002) and I am trying to get a System.Timers.Timer to work for me to display a splash screen for about two seconds and then load the main form. I have...
4
by: Larry | last post by:
I have a Perl script using DBD::DB2, that runs during system startup on a Solaris system. The script is working fine during startup on many machines, except on one machine it fails complaining...
7
by: James Crosswell | last post by:
I want to create a class with a static property as follows: class MyClass { private static List<MyHandlerRegisteredHandlers = new List<MyHandler>; } I then want to be able to create...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.