473,320 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

psshutdown issue: shutdowns computers when using a logoff command!!

Hello!

I created a VB.Net program that retrieves particular computers names from the Active Directory and that then logs off all those machines every night (via a Scheduled Task) using the well-known already-existing "psshutdown" program.
I am using the following syntax in order to perform the logoff:
"psshutdown -f -o -u MyUsername -p MyPassword \\MyMachine"

The first time I use it in order to log off a machine that has not been logged off yet, then it works fine!
But if I reuse the same command (that you have above!) to a computer that has already been logged off, then this causes the computer to be shut down (with a message on the screen that looks like the following: "It is now safe to turn off your computer"), which I don't want!!!!!
Is this a bug?
Is there any aother way using psshutdown or another program in order to be able to log off a machine when not logged off yet and not to do anything when not yet logged on ?

I would really appreciate if someone could give me a hand on this matter.
Thank you in advance.
Julien.
Jul 21 '05 #1
0 1161

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Doug Ly | last post by:
Hi , connect to Blah user blah using blah ------------------------------------------------------------------------ Database Connection Information Database server = DB2/6000 7.2.3...
3
by: NK | last post by:
Hello, I am a beginner of DB2 and I am in a trouble that I can't access to sample database. Please see below. ENV : OS AIX-5.2/ DB2 8.1.2 SYMPTOM: I don't have any DB2 client terminal so...
1
by: bjbounce2002 | last post by:
Hello, I am using forms with command buttons to close form or run action queries. The error messages such as "Null value in required field" or "duplicate value in primary key" are suppressed....
1
by: Julien | last post by:
Hello I created a VB.Net program that retrieves particular computers names from the Active Directory and that then logs off all those machines every night (via a Scheduled Task) using the...
0
Gilfindore
by: Gilfindore | last post by:
I am working on an uninstaller for a small game that I am working on and have managed to make it work except on the uninstaller itself. I am using windows XP Media Center and VB.Net 2003. I have...
6
by: =?Utf-8?B?U2hhd24gU2VzbmE=?= | last post by:
Greetings! I was researching AJAX to provide a solution to displaying status messages while a long process executed. I found several examples online and was able to use their code to get a quick...
1
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
3
by: gra | last post by:
Hi Access 2002 I have a Command Buton using some VB code to open an Excel spreadsheet. However, when the spreadsheet opens it doesn't refresh the data. The spreadsheet is a pivot table which...
0
debasisdas
by: debasisdas | last post by:
Using Merge command (supported version 9 onwards) ======================================== Used to go for insert/update in a single command based on some condition. Example #1 merge...
13
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
This is a follow-up to my post "Silverlight video doesn't work when file is streamed from handler in ASP.net" at...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.