473,322 Members | 1,504 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,322 software developers and data experts.

Remote Shutdown let the target PC hang

Hi there,

I've got a serious problem with getting a remote shutdown functionality
working with VB.NET. I am using WMI to query the target PC and invoke the
Win32Shutdown method like this:

Dim aoInParams() As Object = {8}

For Each mngObj As ManagementObject In mngColl
mngObj.Scope.Options.EnablePrivileges = True
mngObj.InvokeMethod("Win32Shutdown", aoInParams)
Next

with mngColl being the ManagementObjectCollection, retrieved earlier.

However, I am experiencing the following behaviours:
- On a target computer with a logged in user, the computer shuts down
without any problems
- On a locked target computer or with nobody logged in, the computer shuts
down until it says "Windows is shutting down". Then, it simply hangs.

In both cases, the InvokeMethod tends to hang.

I also tried to call Win32Shutdown with "12", meaning a forced shutdown, so
that even locked computers can be powered off. But I got the same effects.

Is there any possibility, that the problem resides on the target computer,
i.e. some BIOS option, ACPI setting, driver problem, or something?

I am desperate. Does anyone have a failure proof example of how to powering
off a remote windows XP client with VB.NET?

Best regards and thank you for reading this,
Christian.
Apr 11 '06 #1
0 1692

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

Similar topics

1
by: Tim Gosselin | last post by:
I am writing a tcp tunnel but cannot find a way of detecting when a socket shuts down its read end without writing to the socket. For testing the write end of the remote endpoint I just do a: if...
2
by: Jack | last post by:
It seems that if Finalize takes more than 2 seconds during the process shutdown, the process will just terminate anyway. How can I specifically tells GC that this guy's clean up does suppose to...
0
by: Hansi | last post by:
How can i start a winforms application on remote workstation, no matter who or if there is somebody logged in? My problems: 1) I need to shutdown computers in the evening that have not been...
2
by: yvan | last post by:
Hi, Here is my client/server scenario: Step1: Client connects to server and sends data sucessfully (using Socket.Send()). Step2: Server gracefully exists (calls Socket.Shutdown() and...
3
by: joja15 | last post by:
I am working on a Python script to perform as a remote computer manager. So far I have a WOL function working and I would like to add the ability to show if a machine is on or off (I figured I...
1
by: abhilash6it | last post by:
How can i perform remote shutdown and remote search using VB.Net
1
by: theands | last post by:
Hello everyone I was wondering if someone can assist me. I just installed a fresh copy of debian etch on a server that was previously running windows. Startup time of the server is roughly an...
4
by: mirainc | last post by:
Hi all, I want to do a remote shutdown to PC that is in the same domain as mine. I managed to do a command prompt version and it works but now i need to add it in my application, so i tried...
1
by: Okko Willeboordse | last post by:
All, With Python 2.5 SocketServer features the shutdown method that can be called from another thread to stop the serve_forever loop. However; When the shutdown method is called before...
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...
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: 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....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.