Solved

Debugging ReturnValue = 8

Posted on 2014-02-27
12
517 Views
Last Modified: 2014-05-14
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
Comment
Question by:tenchulyo
  • 7
  • 4
12 Comments
 
LVL 68

Expert Comment

by:Qlemo
Comment Utility
Isn't that value defined as valid return code of the command you call?
0
 

Author Comment

by:tenchulyo
Comment Utility
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
 
LVL 68

Expert Comment

by:Qlemo
Comment Utility
Is that the error message for "release.exe"? I cannot identify that particular EXE. And it is definitely the EXE itself returning 8.
0
 

Author Comment

by:tenchulyo
Comment Utility
No, it isn't. I 've tried with various .exe files including notepad.exe and I get the same result
0
 
LVL 68

Expert Comment

by:Qlemo
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:tenchulyo
Comment Utility
Hmmm...I have the user set to administrator on that machine. And like I said...It worked before...Just stopped working...
0
 
LVL 68

Expert Comment

by:Qlemo
Comment Utility
Recheck the privs. You would expect they are there, but since something changed, you cannot be certain.
0
 

Author Comment

by:tenchulyo
Comment Utility
Yup, still in as an admin on that PC.
0
 

Author Comment

by:tenchulyo
Comment Utility
I guess I'm all alone on this one...
0
 

Accepted Solution

by:
tenchulyo earned 0 total points
Comment Utility
Forget It... I broke down and went to Visual Studio and built a solution from scratch...wmic sucks!
0
 

Author Closing Comment

by:tenchulyo
Comment Utility
No one had a better one...
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now