Saturday, 15 May 2010

c# - Registry entry does not run application on startup -


I'm trying to launch a program on Windows Startup, which is the key HKey_Current_User \ Software \ Microsoft \ Windows \ CurrentVersion \ Run \ / code> In Registry If I do something like firefox .exe, then it works. But if I target my .exe, then it does nothing, though I can launch it by clicking .exe.

I add a log to see that it was initially unsuccessful but nothing was written, so I think it has never been launched.

Of course, I tried to shut down any antivirus.

Is there anything to setup in CSPRJ? This is a native WinForm project, but I've probably forgotten something.

  registry rkApp = registry. Local Macine OpenSubby ("Software \\ Microsoft \\ Windows \\ Current version \\ Run \", true); RkApp.SetValue ("MyAPP", application.executionablePath.ToString ());  

No comments:

Post a Comment