Click here to Skip to main content
15,921,884 members
Home / Discussions / C#
   

C#

 
GeneralRe: SMTP via socket problem Pin
DannyAdler23-Mar-06 22:49
DannyAdler23-Mar-06 22:49 
GeneralRe: SMTP via socket problem Pin
Dave Kreskowiak24-Mar-06 2:45
mveDave Kreskowiak24-Mar-06 2:45 
QuestionGDI+ Pin
Fouad_kayali23-Mar-06 14:01
Fouad_kayali23-Mar-06 14:01 
AnswerRe: GDI+ Pin
Christian Graus23-Mar-06 16:39
protectorChristian Graus23-Mar-06 16:39 
QuestionPeeping Tom Pin
IceWater4223-Mar-06 13:58
IceWater4223-Mar-06 13:58 
AnswerRe: Peeping Tom Pin
Luis Alonso Ramos23-Mar-06 15:21
Luis Alonso Ramos23-Mar-06 15:21 
GeneralRe: Peeping Tom Pin
IceWater4224-Mar-06 22:53
IceWater4224-Mar-06 22:53 
GeneralRe: Peeping Tom Pin
Luis Alonso Ramos25-Mar-06 6:56
Luis Alonso Ramos25-Mar-06 6:56 
QuestionHow to associate files with programs? Pin
nogola23-Mar-06 11:39
nogola23-Mar-06 11:39 
AnswerRe: How to associate files with programs? Pin
Ed.Poore23-Mar-06 12:21
Ed.Poore23-Mar-06 12:21 
AnswerRe: How to associate files with programs? Pin
kasik23-Mar-06 13:17
kasik23-Mar-06 13:17 
AnswerRe: How to associate files with programs? Pin
IceWater4223-Mar-06 17:55
IceWater4223-Mar-06 17:55 
Question.NET 2003 queues Pin
spin vector23-Mar-06 10:40
spin vector23-Mar-06 10:40 
QuestionRemote Registry editing? Pin
Joshua Lunsford23-Mar-06 10:13
Joshua Lunsford23-Mar-06 10:13 
AnswerRe: Remote Registry editing? Pin
oykica23-Mar-06 21:21
oykica23-Mar-06 21:21 
GeneralRe: Remote Registry editing? Pin
Joshua Lunsford24-Mar-06 8:37
Joshua Lunsford24-Mar-06 8:37 
Yeah i got the remote viewing under control...

With remote editing, I can do it with VBscript easy:
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")<br />
objReg.SetStringValue HKEY_LOCAL_MACHINE,strPointerKey,strPointerEntry,strPointerValue<br />
objReg.CreateKey HKEY_LOCAL_MACHINE,strMyKey


surely .NET can do it. this is what i tried:

RegistryKey LM = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine,WSID);<br />
RegistryKey inventoryKeys = LM.OpenSubKey("SOFTWARE\\CompanyName\\AppName");<br />
inventoryKeys.SetValue("ValueName","Value");


and the error message is:

Get REG values: System.UnauthorizedAccessException: Cannot write to the registry key.
at Microsoft.Win32.RegistryKey.ValidateState(Boolean needWrite)
at Microsoft.Win32.RegistryKey.SetValue(String name, Object value)
at testReg.Class1.update() in c:\projects\testreg\class1.cs:line 48: 03/24/20
06 02:41:01 PM



-- modified at 14:58 Friday 24th March, 2006
Questionargs in main Pin
nogola23-Mar-06 10:04
nogola23-Mar-06 10:04 
AnswerRe: args in main Pin
Dan Neely23-Mar-06 10:38
Dan Neely23-Mar-06 10:38 
GeneralRe: args in main Pin
nogola23-Mar-06 10:46
nogola23-Mar-06 10:46 
GeneralRe: args in main Pin
Sean8923-Mar-06 10:51
Sean8923-Mar-06 10:51 
GeneralRe: args in main Pin
Igor Velikorossov23-Mar-06 10:54
Igor Velikorossov23-Mar-06 10:54 
GeneralRe: args in main Pin
Igor Velikorossov23-Mar-06 10:53
Igor Velikorossov23-Mar-06 10:53 
GeneralRe: args in main Pin
nogola23-Mar-06 10:58
nogola23-Mar-06 10:58 
GeneralRe: args in main Pin
Igor Velikorossov23-Mar-06 11:03
Igor Velikorossov23-Mar-06 11:03 
GeneralRe: args in main Pin
nogola23-Mar-06 11:13
nogola23-Mar-06 11:13 

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.