locked
Windows 10 Win32_Process.Create returns error 8 RRS feed

  • General discussion

  • I created a VBScript my Help Desk guys use to deploy our Sophos Anti-Virus to computers either locally or remotely. This has worked flawlessly for Windows XP, 7, and 8.1. We just approved Windows 10 for IT personnel only (validating and testing), but my script does not work for Windows 10.

    The script copies the installer (~10MB 7zip SFX self-extracting EXE) to the remote computer, then uses the Win32_Process.Create method to launch the installer. I then watch "__InstanceDeletionEvent Within 1 Where TargetInstance ISA 'Win32_Process'" for the process ID to end. With Windows 10, I get return code 8 (Unknown failure) every time.

    Things I have tried:

    Just to test, I tried launching notepad.exe remotely on a Windows 10 machine. Although non-interactively (as expected), notepad.exe launches without issue and returns a 0 (success).

    I noticed the Sophos installer (SFX archive) has the UAC "shield" on the icon, so I thought maybe UAC has something to do with it. The SFX EXE itself does not have a manifest, but the setup.exe inside the archive does. I edited the setup.exe manifest to run "asInvoker", but it still will not launch via WMI. I added a manifest to the SFX archive with "asInvoker", but it still will not launch via WMI. To note, I also tried execution as "highestAvailable" for both the SFX and setup.exe.

    I also have a Comodo code-signing certificate, so I signed the EXE. Still will not execute via WMI.

    I would appreciate any input others may have here. Any other ideas? I used PsExec in an earlier incarnation of the script, but I had random issues with that, and I would rather stick with WMI.

    Thank you all in advance!

    Eric

    • Changed type Bill_Stewart Tuesday, September 15, 2015 6:22 PM
    Thursday, August 13, 2015 8:34 PM

All replies

  • This really isn't a scripting problem per se, but this may apply:

    http://blogs.msdn.com/b/alejacma/archive/2008/04/09/win32-process-create-fails-if-user-profile-is-not-loaded.aspx


    -- Bill Stewart [Bill_Stewart]

    Thursday, August 13, 2015 9:00 PM
  • Ha! Thank you, Bill. I was actually just reading that same page when I saw your reply.

    I realize the WMI quirks are not the fault of scripting, but I decided to post here since I am trying to fix a script.

    Now the question... how to load a profile before creating the process? I am looking through WMI Code Creator and only see a "ChangeOwner" method for Win32_UserProfile, a "Rename" method for Win32_UserAccount, and I am not seeing any other classes that stick out as a possibility.

    Any ideas on how to do this? The page you linked to talks about a LoadUserProfile API, but I am not sure how exactly to apply this to a VBScript.

    Thank you again for the reply!

    Eric

    Thursday, August 13, 2015 9:09 PM
  • As far as I know, you have to log on interactively on the remote computer first.


    -- Bill Stewart [Bill_Stewart]

    Thursday, August 13, 2015 9:14 PM
  • Unfortunately, this does not seem to help. If I try to run the script even against my local machine, I still get the same error. I am a local Administrator and logged in locally. I even booted my laptop (also Windows 10), logged in locally, then tried to run the script against it. Same deal. Error 8.

    I can use the script to install to XP, 7, 8.1, 2008R2, 2012R2, physical, virtual, user logged in, no user logged in... It has worked without issue, but not on 10. :-(

    Eric

    Thursday, August 13, 2015 9:24 PM
  • The problem with WMI is it does not load the profile.  I recommend contacting the vendor of the installer to discuss why their installer doesn't work in Windows .


    \_(ツ)_/

    Thursday, August 13, 2015 9:29 PM