954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

VB.Net Application won't AutoRun with CurrentVersion\Run...

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?

chriswelborn
Newbie Poster
13 posts since Jul 2009
Reputation Points: 19
Solved Threads: 0
 

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)
Luc001
Posting Whiz
376 posts since Mar 2010
Reputation Points: 85
Solved Threads: 98
 

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

mohitkhanna
Newbie Poster
1 post since Jun 2011
Reputation Points: 10
Solved Threads: 0
 

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 .

NETProgrammer
Light Poster
49 posts since May 2011
Reputation Points: 7
Solved Threads: 5
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: