jorge Posted August 1, 2003 Posted August 1, 2003 Hey, How can a load a application when windows start? But i don't whant to make a link in startup. anyone??? Quote Jorge - http://www.blackdot.be/?page=apache.htm
Hughng Posted August 1, 2003 Posted August 1, 2003 What OS are you trying to work with? In Win9x you can use msconfig to set a startup program. In Win2K XP try to make it as a service if you can. Quote
jweissberg808 Posted August 1, 2003 Posted August 1, 2003 there's also a registry key for loading apps at startup - and they won't appear in the startup folder in the start menu. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run Quote
jorge Posted August 2, 2003 Author Posted August 2, 2003 Cool, The registry sound interesting, How can i add them from within a program? Quote Jorge - http://www.blackdot.be/?page=apache.htm
*Experts* mutant Posted August 2, 2003 *Experts* Posted August 2, 2003 You can set it using the RegistryKey class: Dim key As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine 'dim RegistryKey class and set it to LocalMachine key = key.OpenSubKey("Path to the key", True) 'open the sub key key.SetValue("YourAPP", "PATH") 'create new entry key.Close() 'close and flush the key Quote
jorge Posted August 2, 2003 Author Posted August 2, 2003 Thanx mutant, One more question, and how to remove? Quote Jorge - http://www.blackdot.be/?page=apache.htm
*Experts* mutant Posted August 2, 2003 *Experts* Posted August 2, 2003 Same except you change the SetValue line to: key.DeleteValue("YourAPP") 'delete the entry Quote
jorge Posted August 2, 2003 Author Posted August 2, 2003 (edited) Hmmz get a error, Somting about a object reference?? Edited August 2, 2003 by jorge Quote Jorge - http://www.blackdot.be/?page=apache.htm
*Experts* mutant Posted August 2, 2003 *Experts* Posted August 2, 2003 It works for me all right. Are you sure you specified the right path? Thats when that error happens. Quote
jorge Posted August 2, 2003 Author Posted August 2, 2003 this is my path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run OR do i need a '\' at the end? Quote Jorge - http://www.blackdot.be/?page=apache.htm
*Experts* mutant Posted August 2, 2003 *Experts* Posted August 2, 2003 Dont put this in it: HKEY_LOCAL_MACHINE\ You already specified it as the LocalMachine here: Dim key As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine Quote
jorge Posted August 2, 2003 Author Posted August 2, 2003 (edited) Ok thanx let me try... Ok work thanx agen Edited August 2, 2003 by jorge Quote Jorge - http://www.blackdot.be/?page=apache.htm
Diablicolic Posted August 4, 2003 Posted August 4, 2003 (edited) Omg that is awesome, thanks mutant, you helped me too lol. :p ------------------------------------Edit------------------------------- Wait wait, the place where you put the application name. Let's say if I wanted to add notepad at startup, would the Application name be: notepad? notepad.exe? NOTEPAD? ProcessID? And what if I created an application that is named: notepad? Would they both startup (the one from system32 and the one I created?) Edited August 4, 2003 by Diablicolic Quote "Reality is fake, Dreams are for real"
*Experts* mutant Posted August 4, 2003 *Experts* Posted August 4, 2003 You can call it whatever you want, the name of the key isnt tied to the name of the app. But its good to know what starts up so you should put in some name that can easily identify your app. Quote
Diablicolic Posted August 4, 2003 Posted August 4, 2003 Doh! :p Thank you Mutant :cool: Quote "Reality is fake, Dreams are for real"
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.