Click here to Skip to main content
15,928,983 members
Home / Discussions / C#
   

C#

 
GeneralRegistry problem..! Pin
QzRz28-Oct-04 8:03
QzRz28-Oct-04 8:03 
GeneralRe: Registry problem..! Pin
Christian Graus28-Oct-04 9:39
protectorChristian Graus28-Oct-04 9:39 
GeneralRe: Registry problem..! Pin
QzRz28-Oct-04 9:45
QzRz28-Oct-04 9:45 
GeneralRe: Registry problem..! Pin
Christian Graus28-Oct-04 9:48
protectorChristian Graus28-Oct-04 9:48 
GeneralRe: Registry problem..! Pin
Alex Korchemniy28-Oct-04 10:04
Alex Korchemniy28-Oct-04 10:04 
GeneralRe: Registry problem..! Pin
Dave Kreskowiak28-Oct-04 16:49
mveDave Kreskowiak28-Oct-04 16:49 
GeneralRe: Registry problem..! Pin
QzRz29-Oct-04 6:19
QzRz29-Oct-04 6:19 
GeneralRe: Registry problem..! Pin
Dave Kreskowiak29-Oct-04 11:34
mveDave Kreskowiak29-Oct-04 11:34 
Using the original code you posted, take the two backslashes off the end of the path to the Run key:
// Change the next line to return the actual path to the .EXE.
// Your original code assumed that the current directory is the one the
// .EXE was launched from.  This is rarely the case!
string path = Application.StartupPath + "\\MyApp.exe";
// Change the next line.  Remove the two backslahes from the end of 'Run'...
RegistryKey App = Registry.LocalMachine.OpenSubKey("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
App.SetValue("MyApp", path);



RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: Registry problem..! Pin
QzRz29-Oct-04 11:46
QzRz29-Oct-04 11:46 
GeneralRe: Registry problem..! Pin
Dave Kreskowiak29-Oct-04 18:49
mveDave Kreskowiak29-Oct-04 18:49 
GeneralRe: Registry problem..! Pin
QzRz29-Oct-04 23:14
QzRz29-Oct-04 23:14 
Generalresponding to javascript in html Pin
JeromeKJerome28-Oct-04 8:02
JeromeKJerome28-Oct-04 8:02 
GeneralRe: responding to javascript in html Pin
Heath Stewart28-Oct-04 15:48
protectorHeath Stewart28-Oct-04 15:48 
GeneralRe: responding to javascript in html Pin
JeromeKJerome28-Oct-04 16:17
JeromeKJerome28-Oct-04 16:17 
GeneralRe: responding to javascript in html Pin
Heath Stewart29-Oct-04 5:28
protectorHeath Stewart29-Oct-04 5:28 
GeneralRe: responding to javascript in html Pin
JeromeKJerome29-Oct-04 8:08
JeromeKJerome29-Oct-04 8:08 
GeneralRe: responding to javascript in html Pin
JeromeKJerome29-Oct-04 9:27
JeromeKJerome29-Oct-04 9:27 
GeneralRe: responding to javascript in html Pin
JeromeKJerome29-Oct-04 13:41
JeromeKJerome29-Oct-04 13:41 
GeneralRe: responding to javascript in html Pin
Heath Stewart30-Oct-04 3:16
protectorHeath Stewart30-Oct-04 3:16 
GeneralRe: responding to javascript in html Pin
JeromeKJerome1-Nov-04 8:09
JeromeKJerome1-Nov-04 8:09 
GeneralRe: responding to javascript in html Pin
Heath Stewart1-Nov-04 8:11
protectorHeath Stewart1-Nov-04 8:11 
GeneralVisual Studio Add-In C# Pin
Nxsis28-Oct-04 7:54
Nxsis28-Oct-04 7:54 
GeneralRe: Visual Studio Add-In C# Pin
Heath Stewart28-Oct-04 15:40
protectorHeath Stewart28-Oct-04 15:40 
GeneralOffice Programming with C# Pin
Member 140011328-Oct-04 7:02
Member 140011328-Oct-04 7:02 
GeneralRe: Office Programming with C# Pin
Heath Stewart28-Oct-04 15:35
protectorHeath Stewart28-Oct-04 15:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.