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

C#

 
GeneralRe: paging C# windows Form Pin
Ibrahim.elh6-Nov-14 2:37
Ibrahim.elh6-Nov-14 2:37 
GeneralRe: paging C# windows Form Pin
Eddy Vluggen6-Nov-14 9:37
professionalEddy Vluggen6-Nov-14 9:37 
QuestionHow to use SSL in C# Visual Studio Pin
arunava_sinha4-Nov-14 22:20
arunava_sinha4-Nov-14 22:20 
SuggestionRe: How to use SSL in C# Visual Studio Pin
Kornfeld Eliyahu Peter4-Nov-14 22:39
professionalKornfeld Eliyahu Peter4-Nov-14 22:39 
Questionencrypt the connection string in the app.config file ? Pin
Member 24584674-Nov-14 15:26
Member 24584674-Nov-14 15:26 
AnswerRe: encrypt the connection string in the app.config file ? Pin
Bernhard Hiller4-Nov-14 20:39
Bernhard Hiller4-Nov-14 20:39 
GeneralRe: encrypt the connection string in the app.config file ? Pin
Member 24584675-Nov-14 14:37
Member 24584675-Nov-14 14:37 
QuestionWhat is the best approach to changing the local admin password? Pin
robwm14-Nov-14 11:44
robwm14-Nov-14 11:44 
Hi,

I would like to write a console app that can determine the local administrator account using its SID and then change the password. I have been using a vbscript to do this but ran into an issue where it no longer works properly (long story). I would like to rewrite this as a C# console app instead. I am hoping that a compiled app will sufficiently hide the password being used which would be present in the source code.

The vbscript uses the WMI Win32_UserAccount namespace to determine which local account belongs to the administrator. It's done this way because you don't always know the name of the administrator account (it's renamed for increased security).

I'm fairly new to C# and I'm not sure where to start. I have been doing some searches for awhile now but I'm not finding any good sources on using WMI with C# or any other method for that matter.

What is the proper way to approach this task? Is WMI the wrong way to go about it? I think using WMI would be the easiest approach if I could figure out how to use it. I think I'll need a reference to System.Management for starters.

I'm not necessarily looking for someone to give me a solution but rather offer guidance to get me on the right track. I really want to learn C# but it feels like a huge task at this point even for this simple project. The language is enormous!

Thanks,
Rob
GeneralRe: What is the best approach to changing the local admin password? Pin
PIEBALDconsult4-Nov-14 12:59
mvePIEBALDconsult4-Nov-14 12:59 
GeneralRe: What is the best approach to changing the local admin password? Pin
robwm14-Nov-14 15:10
robwm14-Nov-14 15:10 
AnswerRe: What is the best approach to changing the local admin password? Pin
Garth J Lancaster4-Nov-14 13:15
professionalGarth J Lancaster4-Nov-14 13:15 
GeneralRe: What is the best approach to changing the local admin password? Pin
robwm14-Nov-14 16:44
robwm14-Nov-14 16:44 
GeneralRe: What is the best approach to changing the local admin password? Pin
Garth J Lancaster4-Nov-14 17:04
professionalGarth J Lancaster4-Nov-14 17:04 
GeneralRe: What is the best approach to changing the local admin password? Pin
robwm14-Nov-14 19:41
robwm14-Nov-14 19:41 
GeneralRe: What is the best approach to changing the local admin password? Pin
Garth J Lancaster4-Nov-14 19:43
professionalGarth J Lancaster4-Nov-14 19:43 
GeneralRe: What is the best approach to changing the local admin password? Pin
robwm15-Nov-14 3:50
robwm15-Nov-14 3:50 
GeneralRe: What is the best approach to changing the local admin password? Pin
Garth J Lancaster5-Nov-14 12:21
professionalGarth J Lancaster5-Nov-14 12:21 
GeneralRe: What is the best approach to changing the local admin password? Pin
robwm15-Nov-14 12:36
robwm15-Nov-14 12:36 
QuestionWindows Workflow Foundation - Implement conditional Activites Through C# Code Pin
Member 86262243-Nov-14 19:26
Member 86262243-Nov-14 19:26 
AnswerRe: Windows Workflow Foundation - Implement conditional Activites Through C# Code Pin
OriginalGriff3-Nov-14 20:44
mveOriginalGriff3-Nov-14 20:44 
QuestionGenerate a report after finishing producer-consumer Pin
zhshqzyc3-Nov-14 11:06
zhshqzyc3-Nov-14 11:06 
QuestionWeb service with C# Pin
Patient122213-Nov-14 4:19
Patient122213-Nov-14 4:19 
AnswerRe: Web service with C# Pin
OriginalGriff3-Nov-14 5:05
mveOriginalGriff3-Nov-14 5:05 
AnswerRe: Web service with C# Pin
shaluIT8-Nov-14 14:41
shaluIT8-Nov-14 14:41 
QuestionMessage Closed Pin
3-Nov-14 1:09
Member 112020153-Nov-14 1:09 

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.