Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1159
  • 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
 
QlemoC++ DeveloperCommented:
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
 
QlemoC++ DeveloperCommented:
Is that the error message for "release.exe"? I cannot identify that particular EXE. And it is definitely the EXE itself returning 8.
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
tenchulyoAuthor Commented:
No, it isn't. I 've tried with various .exe files including notepad.exe and I get the same result
0
 
QlemoC++ DeveloperCommented:
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
 
QlemoC++ DeveloperCommented:
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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