Sardius Posted June 17, 2011 Share Posted June 17, 2011 Hi all,I have a VB script that I'm attempting to run at T-9 (via SetupParams in WINNT.SIF). I've simplified the script for readability:FOR EACH Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf("win32_WindowsProductActivation") WScript.Echo Obj.ProductID IF (Err <> 0) THEN WScript.Echo Err.Description & ": 0x" & Hex(Err.Number) END IFNEXTThe script works just fine if run manually as a user, but it fails when run at T-9. The reason for failure is "Object required" (0x1A8).After a bit of debugging, it seems that "Obj" does not return an object (I'm not really sure what it returns...but it certainly doesn't work).After browsing these forums, I saw comments that WMI wasn't available at T-12/T-13. Is this also the case for T-9? As a workaround, I can probably run the script via RunOnceEx...but it bugs me that I can't get this to work at T-9. Any other thoughts or clever tricks? Link to comment Share on other sites More sharing options...
gunsmokingman Posted June 17, 2011 Share Posted June 17, 2011 Read this Link it might help you Link to comment Share on other sites More sharing options...
Sardius Posted June 20, 2011 Author Share Posted June 20, 2011 Read this Link it might help youFantastic! It doesn't solve my problem but that's some really interesting information. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now