View Single Post
Old 14th October 2009, 22:00   #8
demiller9
Senior Member
 
Join Date: Mar 2006
Location: Dallas
Posts: 462
Thanks for the suggestions. You're right, the script parser does not like the comments embedded in the SYSTEM plugin call strings. I took those out after I spotted that.

I have pretty much duplicated (in NSIS code) the example MSDN showed, it runs on XP but only gets as far as the IWbemServices::ExecQuery call on Win2000. That call doesn't crash the app, but returns a 0xC0000005 error code.

The latest code is attached to this post.

I will look at trying to run the debugger on WbemTest.exe. Here is the call to CoInitializeSecurity that seems to work on both OS's.
code:
; allocate and initialize SOLE_AUTHENTICATION_INFO
System::Call "*(i ${RPC_C_AUTHN_WINNT}, i ${RPC_C_AUTHZ_NONE}, i 0) i .r2"
; allocate and initialize SOLE_AUTHENTICATION_LIST Structure
System::Call "*(i 1, i r2) i .r3"

System::Call "ole32::CoInitializeSecurity( \
i 0, i -1, i 0, i 0, i ${RPC_C_AUTHN_LEVEL_CALL}, \
i ${RPC_C_IMP_LEVEL_IMPERSONATE}, i r3, i ${EOAC_NONE}, i 0) i.r1"


Don
Attached Files
File Type: nsi bios_sn.nsi (4.8 KB, 308 views)
demiller9 is offline   Reply With Quote