Debugging ReturnValue = 8

tenchulyo
tenchulyo used Ask the Experts™
on
Hi,

I'm trying to use WMI to execute a command on a computer and it is giving me the following:


C:\temp>wmic /node:192.168.4.44 /user:capcom\ryu /password:haduken
process call create "release.exe /c [command]"
Executing (Win32_Process)->Create()
Method execution successful.
Out Parameters:
instance of __PARAMETERS
{
        ReturnValue = 8;
};


C:\temp>

I've done this a million times and never got an 8 value message. Any ideas on what the issue could be and how to fix it?


Thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
Isn't that value defined as valid return code of the command you call?

Author

Commented:
I looked it up and the definition is "One of the parameters to the call is not correct" so it is an error...just not sure what that means... I think the usuall is either 0 or 1... it is not working.
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
Is that the error message for "release.exe"? I cannot identify that particular EXE. And it is definitely the EXE itself returning 8.
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Author

Commented:
No, it isn't. I 've tried with various .exe files including notepad.exe and I get the same result
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
Return code 8 for Win32_Process.Create is "Unknown failure" (see http://msdn.microsoft.com/en-us/library/aa389388(v=vs.85).aspx ). Very informative, indeed.

But http://blogs.msdn.com/b/alejacma/archive/2008/04/09/win32-process-create-fails-if-user-profile-is-not-loaded.aspx tells us more about a possible culprit: The user account used in the WMI call needs to have special privileges to allow for loading the user's registry hive, which are the Backup and Restore files and directories privs.
Or you make sure the user profile is active - for testing, you can perform a login with that user on the target machine, and then run wmic. It should work by then if loading the hive is the culprit.

Author

Commented:
Hmmm...I have the user set to administrator on that machine. And like I said...It worked before...Just stopped working...
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
Recheck the privs. You would expect they are there, but since something changed, you cannot be certain.

Author

Commented:
Yup, still in as an admin on that PC.

Author

Commented:
I guess I'm all alone on this one...
Forget It... I broke down and went to Visual Studio and built a solution from scratch...wmic sucks!

Author

Commented:
No one had a better one...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial