Click here to Skip to main content
15,917,940 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: timer remaining active after the form is closed Pin
Christian Graus9-Apr-07 19:10
protectorChristian Graus9-Apr-07 19:10 
AnswerRe: timer remaining active after the form is closed Pin
WhiteSpy10-Apr-07 3:45
WhiteSpy10-Apr-07 3:45 
QuestionCan someone help me to convert the below vb5 code to vb.net code. Pin
Kusal9-Apr-07 16:44
Kusal9-Apr-07 16:44 
AnswerRe: Can someone help me to convert the below vb5 code to vb.net code. Pin
Christian Graus9-Apr-07 16:50
protectorChristian Graus9-Apr-07 16:50 
AnswerRe: Can someone help me to convert the below vb5 code to vb.net code. Pin
Navneet Hegde9-Apr-07 23:54
Navneet Hegde9-Apr-07 23:54 
QuestionPersisting Custom Collections Pin
Ian_K_9-Apr-07 15:22
Ian_K_9-Apr-07 15:22 
AnswerRe: Persisting Custom Collections Pin
GaryAW10-Apr-07 16:25
GaryAW10-Apr-07 16:25 
QuestionRunning Shutdown from VB.NET Pin
Brian Buydens9-Apr-07 14:15
Brian Buydens9-Apr-07 14:15 
I want to write a windows service that shuts down the computer between 4:30am and 5:30 am every morning provided nobody is currently logged in. The computer is running XP professional, and the windows service I wrote uses the account "LocalSystem".

I have been able to create a windows service, and determine if anyone is logged in but I am running into problems with the shutdown command. I have a timer to check if conditions are right (ie. nobody logged in, and within the specified reboot time interval) and then I run the following code to shut down the system:

System.Diagnostics.Process.Start("Shutdown", "-s -t 1")


I can't seem to get this to work unless I am logged in. If I am not logged it, it does nothing until I log in and then immediately shuts me down. "Shutdown" seems to require a logged in user. Is there a way to shutdown the computer when I am not logged in?

Thanks.
AnswerRe: Running Shutdown from VB.NET Pin
kubben9-Apr-07 16:54
kubben9-Apr-07 16:54 
QuestionGif or Jpg? Pin
Anybloodyid9-Apr-07 10:43
Anybloodyid9-Apr-07 10:43 
AnswerRe: Gif or Jpg? Pin
MatrixCoder9-Apr-07 11:39
MatrixCoder9-Apr-07 11:39 
GeneralRe: Gif or Jpg? Pin
Anybloodyid9-Apr-07 12:24
Anybloodyid9-Apr-07 12:24 
AnswerRe: Gif or Jpg? Pin
Christian Graus9-Apr-07 12:06
protectorChristian Graus9-Apr-07 12:06 
AnswerRe: Gif or Jpg? Pin
Navneet Hegde9-Apr-07 23:57
Navneet Hegde9-Apr-07 23:57 
QuestionHow can I use LinkButton Pin
mghiassi9-Apr-07 7:47
mghiassi9-Apr-07 7:47 
AnswerRe: How can I use LinkButton Pin
MatrixCoder9-Apr-07 9:35
MatrixCoder9-Apr-07 9:35 
QuestionSound Card Interface Pin
harry82279-Apr-07 7:24
harry82279-Apr-07 7:24 
AnswerRe: Prevent form from disposing ? Pin
Dave Kreskowiak9-Apr-07 5:04
mveDave Kreskowiak9-Apr-07 5:04 
QuestionArrayList to database Pin
Guille Tamborini9-Apr-07 3:13
Guille Tamborini9-Apr-07 3:13 
AnswerRe: ArrayList to database Pin
_mubashir9-Apr-07 3:38
_mubashir9-Apr-07 3:38 
QuestionProblem with path of the ms access database Pin
vijay25839-Apr-07 2:43
vijay25839-Apr-07 2:43 
AnswerRe: Problem with path of the ms access database Pin
Colin Angus Mackay9-Apr-07 3:46
Colin Angus Mackay9-Apr-07 3:46 
AnswerRe: Problem with path of the ms access database Pin
Navneet Hegde10-Apr-07 0:00
Navneet Hegde10-Apr-07 0:00 
QuestionPlease help Pin
bapu28899-Apr-07 1:59
bapu28899-Apr-07 1:59 
AnswerRe: Please help Pin
Dave Kreskowiak9-Apr-07 5:06
mveDave Kreskowiak9-Apr-07 5:06 

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.