I am writing an application using Delphi 2010. I would like to have my application start up when windows starts up. I need this to work in the latest versions of Windows XP, 7.0, and the latest servers.
Would storing it under the following key work, or do i need to do something else?
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
thanks for any help
That will only result in it starting when the user running the installation process connects. If you want it to start when Windows starts then try under HKLM.
Be aware that these Run key entries execute when a user logs on. To launch a task on startup, it's better to write windows services, which is quite easy to do in Delphi.
A little help on services: http://delphi.about.com/od/windowsshellapi/a/delphi-windows-service-applications.htm
Related
I have up until now been using my own restart application utility.
But I now see that there is a dedicated restart manager since Vista.
This is useful for me because I now limit my application to Windows 7 or higher.
Currently, I offer a manual restart when the user changes the application language.
Also, after they have downloaded an updated installer (Inno Setup) it shuts the app down and starts the setup program.
I can't work out how to do these thing with the MFC restart manager. It mentions about adding one line of code to my MFC app and how to simulate scenarios. But what about my specific situations?
If you can please direct me to a good tutorial?
Sorry if my question is off topic and I will remove.
This is incredibly strange to me. Neo4j won't start a second time unless I restart Windows.
I installed neo4j Community Edition 3.0.3 on 64-bit Windows 7 and followed this youtube tutorial https://www.youtube.com/watch?v=Foj2tzq84DY. The tutorial was embedded in neo4j's site https://neo4j.com/download-thanks/?edition=community&flavour=winstall64&release=3.0.3&_ga=1.203356307.385208157.1468345542. Even thought the video lists 2.3 it's linked by Neo4j 3.0.3 download and worked fine for 3.0.3.
Everything worked like a charm. I played around with it for a while and things worked fine. I then shut it down, by clicking on stop in the little gui launcher. When I tried to start it up again, through the start menu, nothing seems to happen at all. I went into the Neo4j CE 3.0.3\bin directory and tried running from there, but I see no error messages, no log directory, no error dialog. I just seems to do nothing. I've also tried "neo4j-ce.exe start" and "neo4j-ce.exe restart". Nothing seems to work.
I checked windows services and didn't see any services starting with neo4j. Don't know if default setup runs it as a service, but if so, maybe it's under something else?
I have been able to get things to start up if I restart Windows, but that's a royal pain and cannot imagine that's intentional.
I do see that there's a jar in the bin directory, so I imagine I could start it with a java command, but I don't know the specifics. However, it's most disconcerting that there is no error message at all. I imagine that something didn't shut down properly, but at this point I have no idea what might be going wrong.
Any help is greatly appreciated.
I don't know if this is a bug with the launcher for the community edition of neo4j on windows 7 or not, but what I've found is that when you close the launcher dialog, it does not kill the neo4j-ce process. Thus, since the process is already running, albeit in a stopped state, it won't start again. The challenge there is, of course, that the dialog is gone and you can't click the start button to essentially connect to a database.
The solution is to go into Task Manager and end the "neo4j-ce.exe" process.
Once that is done you can start Neo4j normally.
I need to (force) reboot Windows from inside a Windows Service written in C#.
The ordinary way of doing it, from a desktop application, shutdown.exe, will probably not work at all? I assume I cannot run an EXE file from inside a service..
Look at the Win32 API InitiateSystemShutdown() and/or InitiateSystemShutdownEx() function.
Also refer to this MSDN article: Shutting Down.
I have tested it, but it does not work inside a Windows Service, it seems..
I have an Erlang application that is deployed on a server with Windows Server 2008.
The way I do this:
Copy application folder in Erlang lib directory.
Open command line (cmd). Execute erl.
Execute application:start(app_name) in Erlang shell.
Are there any better approaches to launch the application? How to make the application to launch on Windows startup?
I have no experience with Windows but...
`1. First of all, you might want to have a look to the concept of release in Erlang. Essentially,
When we have written one or more applications, we might want to create a complete system consisting of these applications and a subset of the Erlang/OTP applications. This is called a release.
`2. Then, you might want to create a script that contains something like:
erl -boot ch_rel-1
Where essentially you're starting Erlang/OTP using a boot script that you created above (just follow the instructions in the releases page)
`3. This article explains how to create startup scripts in Windows Server 2008 (not tested, just googled):
http://technet.microsoft.com/en-us/magazine/dd630947.aspx
Hope this helps. Nice question.
Perhaps rebar might help. It makes building an app skeleton and release quite easy. A nice tutorial is here.
After getting familiar with releases, take a look at manual pages (erl -man ) for start_erl and erlsrv. I used them to start embedded system ( http://www.erlang.org/doc/embedded/embedded_nt.html ) in windows 2003, hope it still works for you in windows 2008.
After creating service with erlsrv it is possible to manage it via standard windows command line and GUI tools, e.g. setting start mode and restart policy.
May be you could start just your application by supplying "-s app_name" as erl/start_erl additional flag, but I didn't try that, as I had to go long route with embedded system release. In that case make sure you have "start() -> application:start(?MODULE)." in your "app_name.erl".
I have an application for Windows XP. This application is deployed with the hardware. The application is the only application that ever runs on these machines. These machines are never connected to the internet. I'm interested in instant-on (or quick-on) options that bypass the Windows XP startup for these machines.
This is similar to Windows XP "hibernation", but not exactly. With hibernation, the memory state is only read from disk once - the very next time the system is turned on. I want a memory state permanently stored to disk, so the system always starts from that same spot every time, regardless of how it was shut down. How can I achieve this?
Sounds like you're looking for the Hibernate Once, Resume Many feature of Windows Embedded.
If you like "hibernation", you may use VMWare.
Install a ArchLinux and VMWare on the host machines.
Prepare your Windows XP as the guest OS.
Customize startup process of the host, let it run VMWare and restore Windows to the snapshot.
Hmmm, the short answer is "not easily!", but one way could be to try playing around with replacing the windows shell with your own application / script that launches your own custom interface / state instead of Explorer as the default. Basically it's done using this reg key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\shell
Info on this actually seems to be reasonably scarce after doing a quick Google search, but this link below provides a little more detail:
http://www.trap17.com/index.php/how-change-windows-xp-shell_t20367.html
I think if you do a Google Groups search on "Windows XP shell replacement" you might get some more informative results.
You could try installing TweakUI on them, and having them autologin. Once you do that, just add your application to the Start Up menu (or in the registry, under:
HKLM\Software\Microsoft\Windows\CurrentVersion\Run
Jeff Atwood has a post on this very thing.