I have to insert this to the registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services\AutoStartOnConnect]
"AutoRun"="d:\\MyFolder\\MyProgram.exe"
How would I do this in C#?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Something like this:
If you use
CreateSubKeyinstead ofOpenSubKey, that will create it if it doesn’t already exist (or open it for write otherwise) – but I suspect that in most cases, if the key doesn’t exist then that indicates the rest of the system isn’t in an appropriate state for your app.