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

C#

 
AnswerRe: How to block shutdown/logoff in Windows Vista? Pin
Pete O'Hanlon30-Nov-10 10:10
mvePete O'Hanlon30-Nov-10 10:10 
GeneralRe: How to block shutdown/logoff in Windows Vista? Pin
turbosupramk330-Nov-10 10:22
turbosupramk330-Nov-10 10:22 
GeneralRe: How to block shutdown/logoff in Windows Vista? Pin
Pete O'Hanlon30-Nov-10 11:08
mvePete O'Hanlon30-Nov-10 11:08 
GeneralRe: How to block shutdown/logoff in Windows Vista? Pin
turbosupramk330-Nov-10 11:18
turbosupramk330-Nov-10 11:18 
GeneralRe: How to block shutdown/logoff in Windows Vista? Pin
Pete O'Hanlon30-Nov-10 11:21
mvePete O'Hanlon30-Nov-10 11:21 
GeneralRe: How to block shutdown/logoff in Windows Vista? Pin
turbosupramk31-Dec-10 3:07
turbosupramk31-Dec-10 3:07 
GeneralRe: How to block shutdown/logoff in Windows Vista? Pin
Pete O'Hanlon1-Dec-10 3:30
mvePete O'Hanlon1-Dec-10 3:30 
GeneralRe: How to block shutdown/logoff in Windows Vista? Pin
turbosupramk32-Dec-10 9:44
turbosupramk32-Dec-10 9:44 
Thanks!


This worked last night, I'll continue to test it throughout the week. I wrapped it in a c# application that blocks logging off without verification first. The same can be done for XP, but the first command is a bit different, it is " tscon 0 /dest:console " instead.

I through the wait commands in, because a few times that I was testing it would release the session before the lock command could run and then it would not lock the machine, so an unlocked desktop was left sitting at the office, not something I wanted to happen. Thanks for the help and encouragement Pete.

tscon.exe RDP-Tcp#0 /dest:console

wait 1

rundll32.exe user32.dll, LockWorkStation

wait 1

exit 

GeneralRe: How to block shutdown/logoff in Windows Vista? Pin
Pete O'Hanlon3-Dec-10 11:11
mvePete O'Hanlon3-Dec-10 11:11 
QuestionRebooting to safe mode... Pin
Jacob D Dixon30-Nov-10 7:08
Jacob D Dixon30-Nov-10 7:08 
AnswerRe: Rebooting to safe mode... Pin
Henry Minute30-Nov-10 7:52
Henry Minute30-Nov-10 7:52 
GeneralRe: Rebooting to safe mode... Pin
Jacob D Dixon30-Nov-10 8:20
Jacob D Dixon30-Nov-10 8:20 
GeneralRe: Rebooting to safe mode... Pin
Henry Minute30-Nov-10 9:26
Henry Minute30-Nov-10 9:26 
GeneralRe: Rebooting to safe mode... Pin
Jacob D Dixon1-Dec-10 3:44
Jacob D Dixon1-Dec-10 3:44 
GeneralRe: Rebooting to safe mode... Pin
Rose WiFiTech & Electronics Library Research Cen26-Oct-11 5:36
Rose WiFiTech & Electronics Library Research Cen26-Oct-11 5:36 
Questionc# Webbrowser control with frames Pin
Franklin Smith30-Nov-10 2:03
Franklin Smith30-Nov-10 2:03 
AnswerRe: c# Webbrowser control with frames Pin
Henry Minute30-Nov-10 4:09
Henry Minute30-Nov-10 4:09 
GeneralRe: c# Webbrowser control with frames Pin
Franklin Smith30-Nov-10 13:07
Franklin Smith30-Nov-10 13:07 
QuestionC# debug in vs2010 Pin
polycom12330-Nov-10 1:59
polycom12330-Nov-10 1:59 
AnswerRe: C# debug in vs2010 Pin
Luc Pattyn30-Nov-10 3:03
sitebuilderLuc Pattyn30-Nov-10 3:03 
GeneralRe: C# debug in vs2010 Pin
polycom12330-Nov-10 18:39
polycom12330-Nov-10 18:39 
QuestionCSV file logging data on timer event Pin
cages29-Nov-10 10:26
cages29-Nov-10 10:26 
QuestionRe: CSV file logging data on timer event Pin
Luc Pattyn29-Nov-10 10:28
sitebuilderLuc Pattyn29-Nov-10 10:28 
AnswerRe: CSV file logging data on timer event Pin
cages29-Nov-10 10:37
cages29-Nov-10 10:37 
AnswerRe: CSV file logging data on timer event Pin
Luc Pattyn29-Nov-10 10:47
sitebuilderLuc Pattyn29-Nov-10 10:47 

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.