Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1305
  • Last Modified:

Debugging ReturnValue = 8

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!
0
tenchulyo
Asked:
tenchulyo
  • 7
  • 4
1 Solution
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Isn't that value defined as valid return code of the command you call?
0
 
tenchulyoAuthor 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.
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Is that the error message for "release.exe"? I cannot identify that particular EXE. And it is definitely the EXE itself returning 8.
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
tenchulyoAuthor Commented:
No, it isn't. I 've tried with various .exe files including notepad.exe and I get the same result
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
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.
0
 
tenchulyoAuthor Commented:
Hmmm...I have the user set to administrator on that machine. And like I said...It worked before...Just stopped working...
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Recheck the privs. You would expect they are there, but since something changed, you cannot be certain.
0
 
tenchulyoAuthor Commented:
Yup, still in as an admin on that PC.
0
 
tenchulyoAuthor Commented:
I guess I'm all alone on this one...
0
 
tenchulyoAuthor Commented:
Forget It... I broke down and went to Visual Studio and built a solution from scratch...wmic sucks!
0
 
tenchulyoAuthor Commented:
No one had a better one...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

  • 7
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now