Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I'm building an app that I would li

Status
Not open for further replies.

stevemelaaron

Programmer
Sep 14, 2000
25
0
0
US
I'm building an app that I would like to have run on Windows startup. I also would like to allow the user to toggle this feature on and off in an options screen. Other than placing the app's .exe file in the Startup folder, is there a way to do this?
 
If you are under NT, you can use an NT service. Under 9x, you could toggle an ini file or change the registry. Put the exe under the start menu and when it runs, have it check the ini/reg status. If it is ok, run it. If not, don't. I hope this helps!
Brett Please visit my websites!
 
Hi Steve,
The following registry key holds a list of programs which are run on windows startup:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

If you look at this in regedit, you'll see a list of string values. The value name represents the program title and the value data represents the location of the executable program. You can add a key here and have it run on startup. I've tried this in Windows 95, 98, 98SE and NT without any problems.

If you need to toggle the startup option, you can add and remove the value using the Win32API. If you need details of this, post a reply and i'll post the code for you.

Hope this helps
Andrew
 
I want to print a file directly to the printer without user interface. I tryed this with StartDoc API function. But its not printing anythig even after passing all the required parameter. What is the problem? is any other way to print directly to the printer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top