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

C#

 
GeneralRe: Block Windows "Guest" account Pin
marca2921-Feb-11 3:13
marca2921-Feb-11 3:13 
Hi, thanks for your answer. With this solution I can block users that belong to the Windows Guest group. I want to block user with name guest. The guest account you can turn on/off on windows.

I got an answer on another forum

string username = Environment.UserName;
if (username.ToLower() == "guest")
Application.Exit();

One problem is that the application can be used on many different language OS, if we are using chinese OS do we have to translate "guest" to chinese before or is there another way to determine this?

We can translate "guest" but it is easy if there is another way to solve it.
GeneralRe: Block Windows "Guest" account Pin
RobCroll1-Feb-11 12:14
RobCroll1-Feb-11 12:14 
QuestionAny injection experts? Pin
dawmail33331-Jan-11 20:47
dawmail33331-Jan-11 20:47 
AnswerRe: Any injection experts? Pin
Eddy Vluggen1-Feb-11 7:22
professionalEddy Vluggen1-Feb-11 7:22 
GeneralRe: Any injection experts? Pin
dawmail3331-Feb-11 9:23
dawmail3331-Feb-11 9:23 
GeneralRe: Any injection experts? Pin
Eddy Vluggen1-Feb-11 20:31
professionalEddy Vluggen1-Feb-11 20:31 
QuestionDebug.WriteLine Pin
Ray Cassick31-Jan-11 15:45
Ray Cassick31-Jan-11 15:45 
AnswerRe: Debug.WriteLine Pin
Luc Pattyn31-Jan-11 16:16
sitebuilderLuc Pattyn31-Jan-11 16:16 
GeneralRe: Debug.WriteLine Pin
Ray Cassick31-Jan-11 16:38
Ray Cassick31-Jan-11 16:38 
AnswerRe: Debug.WriteLine Pin
Luc Pattyn31-Jan-11 16:44
sitebuilderLuc Pattyn31-Jan-11 16:44 
GeneralRe: Debug.WriteLine Pin
Ray Cassick31-Jan-11 17:01
Ray Cassick31-Jan-11 17:01 
GeneralRe: Debug.WriteLine Pin
Pravin Patil, Mumbai31-Jan-11 19:00
Pravin Patil, Mumbai31-Jan-11 19:00 
AnswerRe: Debug.WriteLine Pin
Abhinav S31-Jan-11 20:04
Abhinav S31-Jan-11 20:04 
QuestionExecute code only if query successful Pin
Joe Stansfield31-Jan-11 11:29
Joe Stansfield31-Jan-11 11:29 
AnswerRe: Execute code only if query successful Pin
Not Active31-Jan-11 12:07
mentorNot Active31-Jan-11 12:07 
QuestionRe: Execute code only if query successful Pin
Paw Jershauge31-Jan-11 12:24
Paw Jershauge31-Jan-11 12:24 
AnswerRe: Execute code only if query successful Pin
RobCroll31-Jan-11 12:33
RobCroll31-Jan-11 12:33 
AnswerRe: Execute code only if query successful Pin
Pravin Patil, Mumbai31-Jan-11 19:03
Pravin Patil, Mumbai31-Jan-11 19:03 
AnswerRe: Execute code only if query successful Pin
Michael Kingsford Gray1-Feb-11 1:09
Michael Kingsford Gray1-Feb-11 1:09 
GeneralRe: Execute code only if query successful Pin
Joe Stansfield1-Feb-11 11:10
Joe Stansfield1-Feb-11 11:10 
AnswerRe: Execute code only if query successful Pin
meaningoflights1-Feb-11 17:58
meaningoflights1-Feb-11 17:58 
QuestionHow to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy31-Jan-11 3:23
professionalChesnokov Yuriy31-Jan-11 3:23 
AnswerMessage Removed Pin
31-Jan-11 3:38
Pravin Patil, Mumbai31-Jan-11 3:38 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy31-Jan-11 4:02
professionalChesnokov Yuriy31-Jan-11 4:02 
AnswerRe: How to load 100,000 list view items without application freeze? PinPopular
Dave Kreskowiak31-Jan-11 3:40
mveDave Kreskowiak31-Jan-11 3:40 

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.