Error 13 from GetObject ("Type Mismatch")
Tech-Archive recommends: Fix windows errors by optimizing your registry
I wrote a program using VB 6, XP Pro and WMI. It works in my XP Pro
system but not in a Windows 2003 Server. I copied the relevant code to
a script and the script works with Windows 2003 Server. The following
is the script code that works; it is essentially identical to the VB
code that does not work. The error I am getting is Error 13 from
GetObject ("Type Mismatch"). I sure don't understand what "Type
Mismatch" is supposed to say.
Pathname =
"winmgmts:Win32_LogicalFileSecuritySetting.path='F:\Users\Sam\FileSecuritySetting.vbs'"
Set wmiFileSecSetting = GetObject(Pathname)
RetVal = wmiFileSecSetting.GetSecurityDescriptor(wmiSecurityDescriptor)
If Err <> 0 Then
WScript.Echo "GetSecurityDescriptor failed" & VBCRLF & Err.Number &
VBCRLF & Err.Description
WScript.Quit
End If
WScript.Echo wmiSecurityDescriptor.Owner.Domain & "/" &
wmiSecurityDescriptor.Owner.Name & "; " &
wmiFileSecSetting.Description
.
Relevant Pages
- Re: Windows/Macro Language Info?
... The point is that malware is often using Windows _features_. ... I totally understand the difference between client and server side (and you ... subverted by script code (the facilities to change file size, dates, etc. ... (comp.lang.cobol) - RE: NFS on w2k3 server question
... new Windows 2K3 server and it will work properly after migrating from ... Window NT4.0 to Windows 2K3. ... logon script migration is specific to how the logon ... it is recommended that you contact Microsoft Customer Support ... (microsoft.public.windows.server.migration) - Re: Windows 2008 Limitlogin
... We are using windows 2008 64 bit Enterprise, we are trying to limit concurrent user login using limit login but unfortunetely always fail. ... I'm one of the people that Paul was referring to who has written a script to control concurrent sessions. ... It currently prevents regular users from logging in more than once by first warning them of where their other session exists and then uses WMI to log the user off forcefully. ... For admins who log in to Windows Server, a separate perl script that ties into a 3rd party perl module must be used because for some reason WMI on Server is ignored. ... (microsoft.public.windows.server.active_directory) - RIS prestaging problem
... When trying to prestage Windows XP clients in a Windows 2003 Server ... The script also sets the Remote ... (microsoft.public.win2000.setup) - Re: Login Time Restrictions
... Write a script that knows how to set hours. ... Use user manager from domains from an NT4 machine to modify the W2K Pro ... I have a lot of experience> with Windows NT 4.0 but I am still learning where things> have been moved to in Windows 2000 Professional. ... One of> these items is the ability to restrict a user from logging> into a workstation between certain hours. ... (microsoft.public.win2000.security) |
|