Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WMI & remote reboot

3 views
Skip to first unread message

Jerald Rawdon

unread,
Feb 10, 2001, 11:22:51 PM2/10/01
to
I am attempting to reboot a remote Windows Me system. The code I am using
is:

Set OpSysSet =
GetObject("winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}\\Dell4
00").ExecQuery("select * from Win32_OperatingSystem where Primary=true")

For Each OpSys In OpSysSet

Call OpSys.Reboot

Next

NOTE: I have hardcoded the computer name for testing

Whenever I try to run this code I get an automation error of:

-2147022986
The object exporter specified was not found

When I run this same code on a remote Win2K system it has the desired
result.

I have searched all over looking for information on this error but cannot
find anything. Can anyone tell me what I could be doing wrong here? Any help
would be appreciated!

Thanks!

JR


kem...@my-deja.com

unread,
Feb 11, 2001, 6:25:30 AM2/11/01
to
hi,

if u could explain the code, i would be grateful
to you

thnkx


Sent via Deja.com
http://www.deja.com/

Jerald R. Rawdon Jr.

unread,
Feb 11, 2001, 3:51:43 PM2/11/01
to
Might I suggest that you review this article:

http://msdn.microsoft.com/library/techart/mngwmi.htm

It explains the code I used as well as provides an excellent backgrounder on
WMI in general.

JR

<kem...@my-deja.com> wrote in message news:965sr8$q80$1...@nnrp1.deja.com...

Jerald R. Rawdon Jr.

unread,
Feb 11, 2001, 4:15:56 PM2/11/01
to
For those interested in this post I have, after significant trial and error,
happened upon a configuration that allows the code below to work on WinMe &
Win9x systems. Windows NT and Windows 2000 systems always work correctly.

After reviewing this article:

http://msdn.microsoft.com/library/psdk/wmisdk/cimomcmd_65yr.htm

it became apparent that Win9x systems required further configuration than
simply installing the core WMI components and then running the code below.
In fact, even after configuring the system as the article outlines, I still
could not get the code to work --but I was getting different error messages
now. I started looking at some of the other registry values not listed
within the article. Values located within the following key:

HKEY_LOCAL_MACHINE\Software\Microsoft\WBEM\CIMOM

Specifically these values:

EnableDefaultRemoting
EnableAnonConnections

By default they were set at a value of "0". I began to experiment with
setting them to "1", setting one value to "1" and the other to "0" and visa
versa. I messed around until I finally found the right configuration that
would allow the code below to work. It turned out to be:

AutostartWin9x = "1"
EnableDefaultRemoting = "0"
EnableAnonConnections = "1"

Once I had this configuration I could successfully run the code below to
reboot remote Win9x systems that have the core WMI components installed.

A couple of caveats; Windows Me systems reboot successfully but on the next
reboot the system is unstable to the point where it must be rebooted again
before it can be used. Not really a ideal situation. The Win95 OSR2 system I
tried would receive the reboot request but then hang at the "Windows is
shutting down" screen. Again, not exactly ideal. Fortunately, Windows 2000
and Windows NT 4.0 SP4+ work great. The other caveat is that I could find no
documentation anywhere on EnableDefaultRemoting --and more importantly--
EnableAnonConnections. The implication of the name itself gives rise to
security concerns.

If anyone has any information they could share on this matter I would be
greatly appreciative. There seems to be a real dearth of info on using WMI
for remote rebooting of Win9x systems.

JR


"Jerald Rawdon" <raw...@jermar.com> wrote in message
news:t8c4slj...@news.supernews.com...

0 new messages