Hi all.
I am using a text box in windows form to enter the name and when the button is clicked it has to change the computer name to the name in the text box.
I have tried using [DllImport("Kernel32.dll")] but dint succeed. Please help me out in this regard.
Loading
Tanmay SarkarPosted Jul 16, 2010, 9:32 PM
Thank you!
DamodarPosted Jul 16, 2010, 1:14 PM
I actually fixed the problem but in a different way. I wrote a VBScript file, extension .vbs and called it using C# (Process class).
I am using XP Embedded. I shall try out changing the registry value also.
Tanmay SarkarPosted Jul 16, 2010, 12:36 PM
try to change Registry Value. I am sure it will work.
But in windows 7 the connection on specific target of registry is denied. I am also asking a question in this forum that "Registry value can't change in windows 7 where it well work in XP" but still no on reply. on that post i give a ans as we can get the value (but not editing)
The Registry location is in Local Machine:
SOFTWARE\Microsoft\Windows NT\CurrentVersion
after a little search on that path you will find the valu that you want.
Please mark it as ans if it help you.
Thank you!