Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Windows Startup

Posted on 1999-07-13
13
Medium Priority
?
252 Views
Last Modified: 2010-05-02
How do I make my program open when windows starts up without putting a link in the startup folder in the startup menu?  I think you have to register the program with windows or something like that.  If you do need to register the program, how would I make it register itself automaticaly?
0
Comment
Question by:mrcool4444
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
13 Comments
 
LVL 1

Accepted Solution

by:
Jaysin28 earned 20 total points
ID: 1524440
You could put your program.exe in the Load= section of the win ini file.  
0
 

Author Comment

by:mrcool4444
ID: 1524441
How would I have it do that automaticaly?
0
 
LVL 1

Expert Comment

by:Jaysin28
ID: 1524442
In the setup program you would have to include a function to open the Windows INI file and add Myapp.exe to the load= statement in the General section of the ini file.  

You should note however that if your planning for your app to be Windows 2000 logo compliant then you can't make any references to INI files because says that in future versions of Windows these files may not exist.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mrcool4444
ID: 1524443
The only thing is I don't want to use a setup program, and how would I have it open the win.ini file and add it to it?
0
 
LVL 1

Expert Comment

by:Jaysin28
ID: 1524444
LoadStr = GetSetting("General","Load","","Win.ini")
LoadStr = Loadstr & "; " & app.EXEName
SaveSetting ("Win.ini", "General", "Load", LoadStr)
0
 

Author Comment

by:mrcool4444
ID: 1524445
Were would I add this to in the code, the General Declorations?  And were it says name, that is were I put the name of my program right?
0
 
LVL 1

Expert Comment

by:Jaysin28
ID: 1524446
no, App.exename returns the name of your program.  I would put the declarations in Form_Load.  How did you plan on installing this app?
0
 

Author Comment

by:mrcool4444
ID: 1524447
Going to file and compile and it creates an .exe that works fine with all computers (or atleast the ones I have tried).
0
 

Author Comment

by:mrcool4444
ID: 1524448
There is an error with that code and I don't know what.  Could you please revise it.
0
 
LVL 1

Expert Comment

by:Jaysin28
ID: 1524449
It would fine on all the computers that have VBRunxxx.dll where xxx is the version of VB you compiled it with.  Have to be careful doing it that way.

AT anyrate, The only way to do without a setup prog would be to make the entries the first time the program is run.  

0
 
LVL 1

Expert Comment

by:Jaysin28
ID: 1524450

Loadstr = GetSetting("Win.ini", "General", "Load","")
0
 

Author Comment

by:mrcool4444
ID: 1524451
Could you start over with the code?
0
 
LVL 7

Expert Comment

by:Vbmaster
ID: 1524452
Why not use the registry, doesn't that INI-thingie just seems like 16-bit programming?

In registry add your exe filename in

HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Run/

This is a much "cleaner" way of doing it, looks more "professional".

How to add into the registry? Check out www.planet-source-code.com there's probably a couple of codes for that there.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question