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

Hkey_Local_Machine\Software\Microsoft\Windows\CurrentVersion\Run

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?

Hi,

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 .

wow, this is old. but what you said makes sense so I consider it solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.