Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Vista errors

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,51226
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Vista errors
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1] 2   next >   >>
Login
Message << Older Topic   Newer Topic >>
 Vista errors - 8/27/2007 8:04:52 PM   
  SilentBob


Posts: 38
Score: 0
Joined: 3/27/2007
Status: offline
Hi,

I keep getting error 8004100c for several wmi classes, for example the following script

      

I thought it could be something with permissions or so, but even as  admin I get the error . Can't find much about it on the net.

Any idea's what it is or how to solve it?

_____________________________

If you're looking for the truth, STOP lying.
 
 
Post #: 1
 
 RE: Vista errors - 8/28/2007 12:42:12 AM   
  ebgreen


Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
I don't have a vista machine handy right now, but are you sure that the class exists in a vista wmi repository?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to SilentBob)
 
 
Post #: 2
 
 RE: Vista errors - 8/28/2007 4:37:52 AM   
  SilentBob


Posts: 38
Score: 0
Joined: 3/27/2007
Status: offline
If I use wbemtest I can see it, also with Scriptomatic v2 and WMICodeCreator. So I think it's there, but I don't know much about it.

_____________________________

If you're looking for the truth, STOP lying.

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: Vista errors - 8/28/2007 6:59:03 AM   
  ebgreen


Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
Try this and see if you are actually getting anything back:

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI")
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM MSStorageDriver_ATAPISmartData",,48)
WScript.Echo VarType(colItems)
For Each objItem in colItems
Wscript.Echo "-----------------------------------"
Wscript.Echo "MSStorageDriver_ATAPISmartData instance"
Wscript.Echo "-----------------------------------"
Wscript.Echo "InstanceName: " & objItem.InstanceName
Next


EDIT: I've decided that when I have time and I can figure it out easily (or not so easily if it is interesting) I'll start putting the PoSH way to solve things in addition to the VBS way. So to do what you are doing in PoSH:

Get-WmiObject -namespace "root/wmi" MSStorageDriver_ATAPISmartData | Format-List InstanceName


That line should replace your entire code block above.

 
Or if you really want to be succint, here is the same thing with aliases:
 
gwmi -n "root/wmi" MSStorageDriver_ATAPISmartData | fl InstanceName

< Message edited by ebgreen -- 8/28/2007 7:38:48 AM >


_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to SilentBob)
 
 
Post #: 4
 
 RE: Vista errors - 8/29/2007 5:49:08 AM   
  SilentBob


Posts: 38
Score: 0
Joined: 3/27/2007
Status: offline
WScript.Echo VarType(colItems) returns 9, then on the For Each loop it gives the error.
According to W3C 9 indicates an automation object, whatever that means.

(what's PoSH ? python object sharing?)

_____________________________

If you're looking for the truth, STOP lying.

(in reply to ebgreen)
 
 
Post #: 5
 
 RE: Vista errors - 8/29/2007 6:09:31 AM   
  ebgreen


Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
PoSh = Windows PowerSHell. As for your script, I'm running out of ideas since it runs fine on my XP machine and I don't have Vista handy. My guess would be that there is a security issue but I couldn't begin to tell you exactly what the issue would be. It is also possible that the repository is corrupt.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to SilentBob)
 
 
Post #: 6
 
 RE: Vista errors - 8/30/2007 4:47:18 AM   
  mcds99


Posts: 441
Score: 4
Joined: 2/28/2006
Status: offline
Have you tried updating VBS to 5.7?

Some where (in a thread) I saw a link for it, within the last week or so.

_____________________________

Sam

Keep it Simple Make it Fun KiSMiF

(in reply to SilentBob)
 
 
Post #: 7
 
 RE: Vista errors - 8/30/2007 5:09:57 AM   
  SilentBob


Posts: 38
Score: 0
Joined: 3/27/2007
Status: offline
Using Vista, I assume it comes with the latest version, but I checked it anyway


      
I got,
VBScript Version: 5.7
WSH Version: 5.7 6000

I'm thinking it has something to do with user rights or something. But I even disabled User Access Control and it still doesn't work.?

_____________________________

If you're looking for the truth, STOP lying.

(in reply to mcds99)
 
 
Post #: 8
 
 RE: Vista errors - 8/30/2007 6:31:48 AM   
  mcds99


Posts: 441
Score: 4
Joined: 2/28/2006
Status: offline
Funny if I google "error 8004100c" I get your post! :-O

_____________________________

Sam

Keep it Simple Make it Fun KiSMiF

(in reply to SilentBob)
 
 
Post #: 9
 
 RE: Vista errors - 8/31/2007 3:19:45 AM   
  SilentBob


Posts: 38
Score: 0
Joined: 3/27/2007
Status: offline
 whoohoo, nr 1! 


Ok, that was funny for about a minute and then I realized that billions of people on the www don't know what the problem is

Let's make this forum the irst to find a solution

_____________________________

If you're looking for the truth, STOP lying.

(in reply to mcds99)
 
 
Post #: 10
 
 RE: Vista errors - 9/3/2007 8:21:25 PM   
  gdewrance


Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
Not sure if any of this will help.

Firstly Turn off UAC. The easy way is through the Control Panel. Type "UAC" into the search bar at the top of the screen, as ebgreen pointed out it may be permissions. Make sure you are running the query as Administrator WMI needs to run with Admin rights thats why UAC must be off.

The WMI Diagnosis Utility
http://www.microsoft.com/downloads/details.aspx?familyid=d7ba3cd6-18d1-4d05-b11e-4c64192ae97d&displaylang=en

WMI Admin Tools
http://www.microsoft.com/downloads/details.aspx?FamilyId=6430F853-1120-48DB-8CC5-F2ABDC3ED314&displaylang=en

(in reply to SilentBob)
 
 
Post #: 11
 
 RE: Vista errors - 9/4/2007 8:11:52 AM   
  mcds99


Posts: 441
Score: 4
Joined: 2/28/2006
Status: offline
I'm wondering if you re-register vbscript if it gets fixed...

regsrv32 vbscript.dll


????

_____________________________

Sam

Keep it Simple Make it Fun KiSMiF

(in reply to SilentBob)
 
 
Post #: 12
 
 RE: Vista errors - 9/4/2007 9:17:25 AM   
  Parabellum


Posts: 222
Score: 0
Joined: 11/12/2006
From: UK
Status: offline
as gdewrance allready mentioned.. turning of UAC will fix this problem..

I have a vista machine and have tested this script...
If you run it using cscript... it clearly returns an access denied error
with UAC turned off... it works fine.

If turning UAC off is not an option... you will need to look at changing the DCOM permissions using dcomcnfg

!! WARNING INCORRECTLY CHANGING THESE SETTINGS CAN RIGHT AND ROYAL SCREW YOUR PC!!
 

try here for a pointer... but may require much more tweaking than this---> http://blogs.technet.com/askperf/archive/2007/08/14/wmi-troubleshooting-permissions.aspx

(in reply to mcds99)
 
 
Post #: 13
 
 RE: Vista errors - 9/9/2007 5:57:18 AM   
  SilentBob


Posts: 38
Score: 0
Joined: 3/27/2007
Status: offline
Turning off UAC didn't help. Will keep on trying.

WMI Diagnosis utility stops with an error

ERROR: WMIDiag detected issues that could prevent WMI to work properly!.

In the log file are lots of error lines like this one:

30231 21:04:45 (0) ** WMI namespace security for 'ROOT/WMI': .............................................................................. MODIFIED.
30232 21:04:45 (1) !! ERROR: Default trustee 'NT AUTHORITY\AUTHENTICATED USERS' has been REMOVED!
30233 21:04:45 (0) **        - REMOVED ACE:
30234 21:04:45 (0) **          ACEType:  &h0
30235 21:04:45 (0) **                    ACCESS_ALLOWED_ACE_TYPE
30236 21:04:45 (0) **          ACEFlags: &h12
30237 21:04:45 (0) **                    CONTAINER_INHERIT_ACE
30238 21:04:45 (0) **                    INHERITED_ACE
30239 21:04:45 (0) **          ACEMask:  &h13
30240 21:04:45 (0) **                    WBEM_ENABLE
30241 21:04:45 (0) **                    WBEM_METHOD_EXECUTE
30242 21:04:45 (0) **                    WBEM_WRITE_PROVIDER
30243 21:04:45 (0) **
30244 21:04:45 (0) ** => The REMOVED ACE was part of the DEFAULT setup for the trustee.
30245 21:04:45 (0) **    Removing default security will cause some operations to fail!
30246 21:04:45 (0) **    It is possible to fix this issue by editing the security descriptor and adding the ACE.
30247 21:04:45 (0) **    For WMI namespaces, this can be done with 'WMIMGMT.MSC'.
30248 21:04:45 (0) **

< Message edited by SilentBob -- 9/9/2007 6:25:27 AM >


_____________________________

If you're looking for the truth, STOP lying.

(in reply to Parabellum)
 
 
Post #: 14
 
 RE: Vista errors - 9/9/2007 8:56:37 AM   
  Parabellum


Posts: 222
Score: 0
Joined: 11/12/2006
From: UK
Status: offline
hvae you tried doing as it says.. and modifying the security permissions using wmimgmt.msc??

(in reply to SilentBob)
 
 
Post #: 15
 
 RE: Vista errors - 9/10/2007 6:07:36 AM   
  SilentBob


Posts: 38
Score: 0
Joined: 3/27/2007
Status: offline
I opened wmimgmt.msc, but i have no idea what to do with it, so I closed it again . It's a little over my head, need to do some doc hunting for this one.

_____________________________

If you're looking for the truth, STOP lying.

(in reply to Parabellum)
 
 
Post #: 16
 
 RE: Vista errors - 9/10/2007 6:42:11 AM   
  Parabellum


Posts: 222
Score: 0
Joined: 11/12/2006
From: UK
Status: offline
well according to the error you posted... the "Authenticated User" group does not have the correct permissions to the root/wmi namespace...

so run wmimgmt.msc
 
right click WMI Control (local)
 
select Properties
 
click the Security Tab

select Root the WMI from the tree view
 
click security
 
check whether "Authenticated Users" is listed in teh secuirty permissions


Authenticated users should have the follwoing permissions...

Execute Methods                X
Full Write
Partial Write
Provider Write                     X
Enable Account                   X
 

(in reply to SilentBob)
 
 
Post #: 17
 
 RE: Vista errors - 9/10/2007 7:01:54 PM   
  SilentBob


Posts: 38
Score: 0
Joined: 3/27/2007
Status: offline
I checked the settings and they look ok.
Execute Methods, Provider Write, Enable Account are checked, but greyed out.

--edit--

I was thinking that maybe it's not a security issue at all. Maybe it's my harddrives.
On my XP machine there normal ide ata drives. On my Vista laptop there are 2 identical sata drives with a posabillity of a raid setup, wich I doen't use. Maybe the class is just empty? Or would that give an other error?

< Message edited by SilentBob -- 9/10/2007 7:39:35 PM >


_____________________________

If you're looking for the truth, STOP lying.

(in reply to Parabellum)
 
 
Post #: 18
 
 RE: Vista errors - 9/10/2007 8:00:40 PM   
  Parabellum


Posts: 222
Score: 0
Joined: 11/12/2006
From: UK
Status: offline
it's deinitley something with your machine.. as i've tried running this script on several vista machines now.
you could try the following (I found on another forum)

1. Add network service account to administrators group.
2. Add authenticated users to following registry keys:

  * HKCR\CLSID\{73E709EA-5D93-4B2E-BBB0-99B7938DA9E4}
  * HKCR\CLSID\{7C857801-7381-11CF-884D-00AA004B2E24}
  * HKLM\Software\Microsoft\WBEM\CIMOM

(in reply to SilentBob)
 
 
Post #: 19
 
 RE: Vista errors - 9/10/2007 9:56:29 PM   
  SilentBob


Posts: 38
Score: 0
Joined: 3/27/2007
Status: offline
This is getting way over my head. Fiddling with the registry isn't what I was looking for.
I just wanted to write a little Visa gadget that monitors the HDD's temperaure, since I had the script allready on my XP machine, I thought it would be simple. Silly me

_____________________________

If you're looking for the truth, STOP lying.

(in reply to Parabellum)
 
 
Post #: 20
 
 
Page:   [1] 2   next >   >>
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Vista errors Page: [1] 2   next >   >>
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts