473,406 Members | 2,273 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,406 software developers and data experts.

Anyone use Win32Shutdown on a ME pc?

cj
If TimeValue(Now) TimeValue(ShutdownTime) Then
Dim WMIService, Computer As Object
WMIService =
GetObject("Winmgmts:{impersonationLevel=impersonat e,(Debug,Shutdown)}")
For Each Computer In WMIService.InstancesOf("Win32_OperatingSystem")
Computer.Win32Shutdown(8 + 4, 0) 'shutdown
Next
End If

My problem is it doesn't work on ME. Well, it prompts me for a
password. I don't use passwords on my old ME pc. Any help would be
appreciated. It's an old pc but it still serves it function and it
would be nice to modify one of my programs on it to shut it down
automatically.
Jun 28 '07 #1
3 1638
Hi cj,

Sorry this is not a direct answer to your question.

Please note Windows ME support is retired:

http://support.microsoft.com/lifecyc...=6519&x=12&y=5
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 29 '07 #2
cj
Yea, I know, but I had hoped someone here would know the answer--maybe
someone still will answer. It's a personal project.

Walter Wang [MSFT] wrote:
Hi cj,

Sorry this is not a direct answer to your question.

Please note Windows ME support is retired:

http://support.microsoft.com/lifecyc...=6519&x=12&y=5
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Jun 29 '07 #3
cj
First let me note that while I denote 8 + 4 in my code as shutdown it's
actually power off + forced. Power off is what I personally mean when I
refer to shutting down a machine and what I desire. But I want to get
that straight before I get into the solution as they aren't the same
thing to Win32Shutdown.

In working with Windows ME my frustration is that 8 + 4 acted like log
off which was all the more interesting because I don't have users set up
on my ME machine. So I started testing all the options of
Win32Shutdown. First I confirmed 0 + 4 which is log off does the same
thing I 8 + 4 is doing. I then tried 2 + 4 or forced reboot and it
worked. Although I could see little use of 1 + 4 or forced shutdown w/o
the power off I tried it as well and found that for some reason it turns
the power off after shutdown. Hey that's what I was looking for. So
for what it's worth it would seem that to power off a ME machine you use
shutdown vs power off parameters in Win32Shutdown.
cj wrote:
If TimeValue(Now) TimeValue(ShutdownTime) Then
Dim WMIService, Computer As Object
WMIService =
GetObject("Winmgmts:{impersonationLevel=impersonat e,(Debug,Shutdown)}")
For Each Computer In WMIService.InstancesOf("Win32_OperatingSystem")
Computer.Win32Shutdown(8 + 4, 0) 'shutdown
Next
End If

My problem is it doesn't work on ME. Well, it prompts me for a
password. I don't use passwords on my old ME pc. Any help would be
appreciated. It's an old pc but it still serves it function and it
would be nice to modify one of my programs on it to shut it down
automatically.
Jul 5 '07 #4

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

Similar topics

1
by: lawrence | last post by:
I'm trying to read up on the rfc's that govern form inputs. Much of what I'm reading is stuff I didn't know before and some of it is alarming. This one left with me questions: ...
1
by: Harag | last post by:
Hi all Classic ASP, Textpad Local "test" WebServer. IIS5 Well my MS script debugger isn't running and I can't findout why. I'm sick of it failing on me so was looking for an alternative. I...
13
by: penguin732901 | last post by:
Checking back for discussions, there was a lot of talk about 2000 being slower than 97, but not so much lately. What is the latest opinion? Anyone care to set up a poll for how many NG members...
4
by: Hai Nguyen | last post by:
I'm learning C sharp and do not like vb much. I'm creatiing a wepage using panel to test myself. I tried to use these code below, which is written in VB, and to transform them to c sharp but I got...
7
by: Skc | last post by:
Hullo Just like to check whether anyone has tried RentACoder. I intend to farm out a small job that must use C#, WinForms, ADO.Net for around US$400, but don't know whether RentACoder is...
8
by: Dgates | last post by:
Has anyone typed up an index for the O'Reilly book "C# and VB.NET Conversion?" I'm just learning C#, and often using this little book to see which VB.NET terms translate directly to some term in...
0
by: Gareth | last post by:
I cannot find a reference anywhere to anyone having done this successfully... can anyone enlighten me on how you get a SSL login page working with ASP.NET and forms authentication. I have...
0
by: DKn | last post by:
Hi, I am doing shutdown for a remote system using this method InvokeMethod("Win32Shutdown", inParams, null); in C#.Net 2.0. Once the shutdown is done, how to get the status , whether the...
1
by: DKn | last post by:
Hello, I am using win32Shutdown WMI method for the operations like Shutdown,restart, logoff and power off for the remote system in C#.Net windows appliaction. The flags need to pass for Normal...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.