I've added the necessary registry key to have my app run when windows loads:


MyProgram = c:\MyDir\MyProgram.exe

..I've also tryed adding it to the Programs\StartUp folder.

My app still won't load when windows does. Other apps do, and I was wondering what might be preventing my app, and only my app, to not load. Is it Security? Trust Level? or what?
I've searched everywhere for an answer, even here on DaniWeb. I cannot find anything. My Application requires that it be ran as Administrator, i was thinking that might have something to do with it. But I'm not sure. Any ideas please?

7 Years
Discussion Span
Last Post by chriswelborn


You can try this;

Dim oReg As RegistryKey = Registry.CurrentUser
   Dim oKey as RegistryKey = oReg.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
   oKey.SetValue("MyVBApp", cPGM)

You must be trying to run on Windows 7. It does not permit to make make files using dot net in autorun at local machiene level of regestries.. Local machiene is same for every user. So, that can cause potential problems for other user. make in currentUser level..
Same holds while working creating files programatically in the drive where ur OS is installed.. Try creating file in another logical partition and things should work fine..
-Mohit Khanna


In Windows XP the code is working fine. But hey mohitkhanna it's 18 days old thread and the chriswelborn might already have the solution .

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.