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

C#

 
GeneralRe: Farm Database Pin
Dave Kreskowiak14-Jun-07 16:29
mveDave Kreskowiak14-Jun-07 16:29 
GeneralRe: Farm Database Pin
Paul Conrad14-Jun-07 17:26
professionalPaul Conrad14-Jun-07 17:26 
AnswerRe: Farm Database Pin
Russell Jones14-Jun-07 5:28
Russell Jones14-Jun-07 5:28 
Generalpasswords Pin
V.14-Jun-07 3:25
professionalV.14-Jun-07 3:25 
GeneralRe: passwords Pin
Not Active14-Jun-07 3:56
mentorNot Active14-Jun-07 3:56 
GeneralRe: passwords Pin
V.14-Jun-07 4:16
professionalV.14-Jun-07 4:16 
GeneralRe: passwords Pin
V.14-Jun-07 4:16
professionalV.14-Jun-07 4:16 
GeneralRe: passwords Pin
Dave Kreskowiak14-Jun-07 7:12
mveDave Kreskowiak14-Jun-07 7:12 
V. wrote:
Is it possible to get the logged on users pa


Nope.


V. wrote:
restart a windows service under the windows logon accou


You have to supply the username AND PASSWORD in order to do this. The only way to get the users password is to ask for it and have them type it in. Then you can restart the service.

But, in the case of Windows XP, you can have multiple users logged in on the machine at any time. How is your service going to handle this situation? You really can't stop the service and change the account every time someone logs in.

If you have a process that needs to run under the users account, create your application as a normal console or Windows Forms .EXE and put a shortcut to it in the Startup folder. The app runs under the users security context when the user logs in.



A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: passwords Pin
V.14-Jun-07 20:28
professionalV.14-Jun-07 20:28 
Questionadd button to form next maximise minimize buttons Pin
hamid_m14-Jun-07 3:11
hamid_m14-Jun-07 3:11 
AnswerRe: add button to form next maximise minimize buttons Pin
Tarakeshwar Reddy14-Jun-07 3:35
professionalTarakeshwar Reddy14-Jun-07 3:35 
QuestionProblem while Writing to Remote Location in a .netThread Pin
VishalSharmaDev14-Jun-07 3:02
VishalSharmaDev14-Jun-07 3:02 
QuestionWorking with Excel Pin
A M SOMAN14-Jun-07 2:47
A M SOMAN14-Jun-07 2:47 
AnswerRe: Working with Excel Pin
JoeSharp14-Jun-07 2:55
JoeSharp14-Jun-07 2:55 
GeneralRe: Working with Excel Pin
A M SOMAN14-Jun-07 3:10
A M SOMAN14-Jun-07 3:10 
QuestionDatabinding in FormView Pin
souravmoy sau14-Jun-07 2:30
souravmoy sau14-Jun-07 2:30 
AnswerRe: Databinding in FormView Pin
Deepayan Nandi23-Oct-09 10:36
Deepayan Nandi23-Oct-09 10:36 
QuestionCopy a directory somewhere Pin
Russell'14-Jun-07 1:46
Russell'14-Jun-07 1:46 
AnswerRe: Copy a directory somewhere Pin
Manas Bhardwaj14-Jun-07 1:48
professionalManas Bhardwaj14-Jun-07 1:48 
GeneralRe: Copy a directory somewhere Pin
Russell'14-Jun-07 1:52
Russell'14-Jun-07 1:52 
GeneralRe: Copy a directory somewhere Pin
Giorgi Dalakishvili14-Jun-07 1:55
mentorGiorgi Dalakishvili14-Jun-07 1:55 
GeneralRe: Copy a directory somewhere Pin
Russell'14-Jun-07 2:04
Russell'14-Jun-07 2:04 
GeneralRe: Copy a directory somewhere Pin
Giorgi Dalakishvili14-Jun-07 2:12
mentorGiorgi Dalakishvili14-Jun-07 2:12 
GeneralRe: Copy a directory somewhere Pin
Manas Bhardwaj14-Jun-07 1:59
professionalManas Bhardwaj14-Jun-07 1:59 
AnswerRe: Copy a directory somewhere Pin
Shy Agam14-Jun-07 2:13
Shy Agam14-Jun-07 2: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.