|
-
Jul 5th, 2001, 01:02 AM
#1
Thread Starter
Frenzied Member
autostart app with windows - 2 questions
hey guys.
first question, how can i make my application start up when windows starts up?
second, i want before windows loads (in autoexec I guess) to have the screen still in dos to pause and ask a question
would you like to run the program (My App)? Y/N
If the person chooses no, Windows will load as usual and not load my application,
if the person chooses yes, windows will load my application when it starts.
I guess this will probably be in batch files that run from the autoexec. Is that right?
If you know how to do this, could you please let me know.
Thanks
Wengang
Wen Gang, Programmer
VB6, QB, HTML, ASP, VBScript, Visual C++, Java
-
Jul 5th, 2001, 02:34 AM
#2
Well, you've got 2 options really :
- Finding out what version of windows the user has, then finding the start menu folder, and putting your app or a shortcut to your app into the start menu\Startup folder ...
- The much simpler way of the registry. Plus, this way the users won't delete this from starting up.
Place a new key in one of the following folders :
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
For looking at how to write to the registry take a look at this page ... Basically, you need a dword key put in there. Doesn't matter what you call it, but set the value equal to the path to your file -
i.e. My_New_Key as the name, "C:\Path\File.exe" as the value.
-
Jul 5th, 2001, 02:39 AM
#3
As for the second question, I can't help you really with that one, but you're right in that it's the Autoexec.bat file.
Be warned that this isn't actually needed by the windows startup, so if you have a clever bastard user, they might have disabled windows from looking at this to boot faster - not likely though granted.
Do a search on this site for autoexec as this has been answered at least 3 times to my knowledge. Hope the above helps for no.1
Alex
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|