Hey
I would like to know how i can make my program execute just as the computer switches on.
I tried putting the program in the startup folder but it doesn't execute right as the desktop is loaded and takes about 10 secs to execute.
Is there a priority option or something that i am unaware of?
Is it possible to do this?
Set Priority for a program
Page 1 of 15 Replies - 290 Views - Last Post: 05 February 2012 - 07:24 AM
Topic Sponsor:
Replies To: Set Priority for a program
#2
Re: Set Priority for a program
Posted 03 February 2012 - 05:30 AM
i don't know for any priority option but you can do this by writing to registry.
to disable running at startup you must delete regKey:
Dim regKey As Microsoft.Win32.RegistryKey
regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
Dim AppName As String = "YourAppName" & ".exe"
Dim AppPath As String = Application.StartupPath & "\" & AppName
regKey.SetValue(AppName, AppPath)
regKey.Close()
to disable running at startup you must delete regKey:
regKey.DeleteValue(AppName, False)
#4
Re: Set Priority for a program
Posted 03 February 2012 - 08:54 PM
sela007, on 03 February 2012 - 05:30 AM, said:
i don't know for any priority option but you can do this by writing to registry.
to disable running at startup you must delete regKey:
Dim regKey As Microsoft.Win32.RegistryKey
regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
Dim AppName As String = "YourAppName" & ".exe"
Dim AppPath As String = Application.StartupPath & "\" & AppName
regKey.SetValue(AppName, AppPath)
regKey.Close()
to disable running at startup you must delete regKey:
regKey.DeleteValue(AppName, False)
I created my program only to work on windows 7.So i need a good solid piece of code which will not fail.Are you certain that this coding will work on Windows 7 without any errors or failing?
Ionut, on 03 February 2012 - 06:25 AM, said:
At the bottom of this page you will find the startup order in WindowsXP(for newer versions you have to make some compatibility tests).
Thanks but i wrote my program only to work on windows 7.So i need help to get this done in windows 7
#5
Re: Set Priority for a program
Posted 04 February 2012 - 01:26 AM
Quote
I created my program only to work on windows 7.So i need a good solid piece of code which will not fail.Are you certain that this coding will work on Windows 7 without any errors or failing?
This is why you have to test your application before deployement. Plus, if you work with registry, you have to make sure you access the same keys on 32-bit and 64-bit Windows versions.
As I recall, services(as in any version of Windows) start first, so you might create a startup service that will load your application. This way your application starts at machine level(startup folder is defined by each user that logs on the computer) and the user needs administrator rights to disable it
#6
Re: Set Priority for a program
Posted 05 February 2012 - 07:24 AM
Ionut, on 04 February 2012 - 01:26 AM, said:
Quote
I created my program only to work on windows 7.So i need a good solid piece of code which will not fail.Are you certain that this coding will work on Windows 7 without any errors or failing?
This is why you have to test your application before deployement. Plus, if you work with registry, you have to make sure you access the same keys on 32-bit and 64-bit Windows versions.
As I recall, services(as in any version of Windows) start first, so you might create a startup service that will load your application. This way your application starts at machine level(startup folder is defined by each user that logs on the computer) and the user needs administrator rights to disable it
I am sorry but i dont know how to achieve this.How do i create a service to open my program as the computer starts up? I need a solid piece of coding to create this service on click (when the user clicks a command button i want that service to be created)
Any idea of how to do this? and i need to know how i can remove the service if the user decides to do so.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|