|
Try executing the process directly, rather than piping it through the command prompt.
si.StartInfo.FileName = "racadm.exe";
si.StartInfo.Arguments = "getsysinfo";
Also, you might want to wait for the process to exit before closing it:
si.Start();
si.WaitForExit();
string output = si.StandardOutput.ReadToEnd();
si.Close();
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi, thanks for the reply.
I tried your suggestions and string output is empty, just as it is with the first code block?
Have you any other ideas?
|
|
|
|
|
Try using the full path to racadm.exe , rather than leaving cmd to find it.
|
|
|
|
|
Hi, I have tried the full path as well as relying on the environment variable as I did in my example, either way string output is blank?
Thanks for replying, have you any other ideas?
|
|
|
|
|
turbosupramk3 wrote: have you any other ideas? No, but having had a quick look at the documentation I suspect this may not work, owing to the type of program it is. You may need to talk to Dell about it.
|
|
|
|
|
turbosupramk3 wrote: I'm trying to capture the output of a Dell executable command The most simple way is to redirect the output to a file. From a console;
C:\> racadm getsysinfo > "C:\myoutput.txt"
turbosupramk3 wrote: // this works below The only difference between the code-blocks are the arguments you're passing. Means that the redirect works, and that something else is wrong.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Agreed, which is why I posted the topic.
I tried:
racadm getsysinfo > "C:\myoutput.txt"
in the command prompt and produced an empty text file. I think it is the way racadm is written, I'm just trying to get help to figure out a work around?
Thanks for replying.
|
|
|
|
|
turbosupramk3 wrote: Agreed, which is why I posted the topic. That means that the code is correct. Changing it will not help.
turbosupramk3 wrote: in the command prompt and produced an empty text file. That means that there was no output. The code is not only correct, it is showing the correct result.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
There is an output, I just don't believe that the racadm output method is the same as the dir command which I why I was trying to figure out a work around and referenced that the exe might have not been written well.
I don't have the output here at home, but in the command window it will output parameters and values or it will output an error, it does not return empty in the command window.
If the command window can receive an output, so can my code, I'm just not sure how to catch it.
|
|
|
|
|
turbosupramk3 wrote: There is an output The computer proved that nothing is written to stdout. The command on the console does what you're trying to do from code, and the results will be the same.
turbosupramk3 wrote: I don't have the output here at home, but in the command window it will output parameters and values or it will output an error, it does not return empty in the command window. Instead of reading "StandardOutput", try reading from "StandardError".
turbosupramk3 wrote: the exe might have not been written well. Writing things to stdout is something that's shown in each Hello-World example. It's default behaviour that's hard to change.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Try reading stderr as well as (or instead of) stdout.
|
|
|
|
|
Hi Bob,
I did try that and still received an empty output
|
|
|
|
|
I want divide the data of my datagrid in pages. For example I have 30 rows I would have 3 pages of 10 rows then have 2 buttons, one for "next page" and one for "previous page".
|
|
|
|
|
Im have little or no experience with WPF but this is something that I got from Googling
Paging in Datagrid WPF[^]
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
Why? All that does is make it restrictive, and prevents the user from adjusting the view to their requirements. One of the major issues with Windows applications is that the user should be able to adjust the sizes to their own preference.
|
|
|
|
|
There are a few ways to accomplish this. The most obvious way is via using a CollectionView and filtering the pages based on their ordinals. This is pretty straightforward to do and shouldn't take you much work. An alternative approach would be to have a boolean visibility property on your data and use this to update the visibility of the data on the grid by using a BooleanToVisibilityConverter and collapsing the rows that shouldn't be visible. I've known people take this second approach because of a perceived performance impact with the CollectionView approach.
BTW - you should really have asked this in the WPF forum here on CP, rather than here.
|
|
|
|
|
Thanks for the answers but someone can write me the code?
|
|
|
|
|
You've been given the keywords to search on. If you use those keywords, there are numerous examples that show exactly how to do this on the web.
|
|
|
|
|
|
|
|
|
Collin Jasnoch wrote: You do not need to be snide about the code base existing in another forum an my seeking advice from this forum. Such correspondence only hurts this community.
I wouldn't say that Richard's response was "snide" or in any way hurt anyone - it was accurate and good advice. Perhaps you are being a little over-sensitive?
I don't know who you think downvoted you, or even why - there is no sign of a downvote on your original message - but I doubt if it was Richard.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
I don't recall downvoting this, but if I did it was a mistake for which I apologise. My original response to your question should have made my feeling clear enough - that questions such as this really belong on the forum associated with the product in question.
|
|
|
|
|
I should design a soft ware in C# that able to conver speech to the text (for the persian language) can any one guide me how can i do this?
|
|
|
|