Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
AnswerRe: textbox control managing behaviour of editing content Pin
Anthony Mushrow26-Sep-08 1:22
professionalAnthony Mushrow26-Sep-08 1:22 
QuestionC# reflection? Pin
ppayal26-Sep-08 0:57
ppayal26-Sep-08 0:57 
AnswerRe: C# reflection? Pin
Simon P Stevens26-Sep-08 4:07
Simon P Stevens26-Sep-08 4:07 
QuestionFileStream Pin
kk.tvm25-Sep-08 22:24
kk.tvm25-Sep-08 22:24 
AnswerRe: FileStream Pin
Programm3r25-Sep-08 22:34
Programm3r25-Sep-08 22:34 
GeneralRe: FileStream Pin
kk.tvm26-Sep-08 0:21
kk.tvm26-Sep-08 0:21 
Questionget current instance of visual studio IDE Pin
Vinod C S25-Sep-08 22:22
Vinod C S25-Sep-08 22:22 
QuestionChange registry key in Vista Pin
sarabjs25-Sep-08 22:06
sarabjs25-Sep-08 22:06 
Hi,

We have a number of computers (>300), for which we need to change a particular registry setting. So I wrote a C# program that uses this code to do that:


RegistryKey regkey = Registry.LocalMachine.OpenSubKey(KeyName, true);
regkey.SetValue(KeyValue, 2);


When I distribute the executable, it works perfectly for all XP machines. But the Vista machines (even while in user accounts with Admin access) throw an error:

System.Security.SecurityException: Requested registry access is not allowed

I've tried looking for solutions online but couldn't follow any. Anyone who can help me change a registry key value in Vista through C# code?

Thanks,

Sarab
AnswerRe: Change registry key in Vista Pin
Guffa25-Sep-08 22:15
Guffa25-Sep-08 22:15 
AnswerRe: Change registry key in Vista Pin
DaveyM6926-Sep-08 0:41
professionalDaveyM6926-Sep-08 0:41 
QuestionHelp Pls, How to get text from textbox or label on forms with winapi Pin
TALHAKOSEN25-Sep-08 22:04
TALHAKOSEN25-Sep-08 22:04 
AnswerRe: Help Pls, How to get text from textbox or label on forms with winapi Pin
Alan Balkany26-Sep-08 3:05
Alan Balkany26-Sep-08 3:05 
GeneralRe: Help Pls, How to get text from textbox or label on forms with winapi Pin
TALHAKOSEN26-Sep-08 3:08
TALHAKOSEN26-Sep-08 3:08 
QuestionHow to turn off UAC using c#? Pin
lovnin25-Sep-08 22:03
lovnin25-Sep-08 22:03 
AnswerRe: How to turn off UAC using c#? Pin
c242326-Sep-08 0:10
c242326-Sep-08 0:10 
AnswerRe: How to turn off UAC using c#? Pin
DaveyM6926-Sep-08 0:44
professionalDaveyM6926-Sep-08 0:44 
AnswerRe: How to turn off UAC using c#? Pin
Paul Conrad26-Sep-08 5:58
professionalPaul Conrad26-Sep-08 5:58 
QuestionOnline Media Player Pin
manishgkumar25-Sep-08 22:02
manishgkumar25-Sep-08 22:02 
AnswerRe: Online Media Player Pin
Ashfield26-Sep-08 1:22
Ashfield26-Sep-08 1:22 
QuestionDragDrop Multiple Items of the ListView Pin
Programm3r25-Sep-08 21:46
Programm3r25-Sep-08 21:46 
AnswerRe: DragDrop Multiple Items of the ListView Pin
Blue_Boy25-Sep-08 22:19
Blue_Boy25-Sep-08 22:19 
GeneralRe: DragDrop Multiple Items of the ListView Pin
Programm3r25-Sep-08 22:36
Programm3r25-Sep-08 22:36 
GeneralRe: DragDrop Multiple Items of the ListView Pin
Blue_Boy25-Sep-08 22:37
Blue_Boy25-Sep-08 22:37 
Questionwrapper class for microsoft Enterprise Library caching Pin
Siddharth Telkar25-Sep-08 21:08
Siddharth Telkar25-Sep-08 21:08 
QuestionC# error Pin
PaulaM25-Sep-08 21:08
PaulaM25-Sep-08 21:08 

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.