|
-
October 19th, 2010, 10:55 AM
#1
[RESOLVED] Runing rar.exe windows server 2008
I wrote a little tool to rar files:
Code:
ProcessStartInfo procStartInfo = new ProcessStartInfo(rar, "command");
procStartInfo.RedirectStandardOutput = true;
procStartInfo.RedirectStandardError = true;
procStartInfo.UseShellExecute = false;
// Do not create the black window.
procStartInfo.CreateNoWindow = true;
// Now we create a process, assign its ProcessStartInfo and start it
Process proc = new Process();
proc.StartInfo = procStartInfo;
proc.Start();
while (proc.HasExited == false)
{
proc.WaitForExit();
}
textBox1.AppendText("Done");
It works good if i run into windows XP SP3, but when i try to run it into windows server 2008 (no admin rights) it starts compressing but hangs while compressing (no return any error), if i close the the tool suddenly the rar.exe process works and continue compressing.
At the same time if i run with "procStartInfo.UseShellExecute = true;" it works good and compress good (but i not want the black screen showed).
Any idea about why this happens?
Thanks in advance for your help.
Last edited by Zeokat; October 19th, 2010 at 10:58 AM.
-
October 19th, 2010, 11:41 AM
#2
Re: Runing rar.exe windows server 2008
Take a look at the ProcessStartInfo properties. You'll find one that allows you to hide the main window.
-
October 19th, 2010, 01:10 PM
#3
Re: Runing rar.exe windows server 2008
Well.... it can do the trick but i can´t capture standadrd ouput.
-
October 19th, 2010, 01:54 PM
#4
Re: Runing rar.exe windows server 2008
 Originally Posted by Zeokat
Well.... it can do the trick but i can´t capture standadrd ouput.
That's a different question. You'll need to add handlers to capture std error and std out.
-
March 21st, 2011, 11:37 PM
#5
Re: [RESOLVED] Runing rar.exe windows server 2008
Hi Guys,
I am facing the same problem. In C++ with system command I am compressing text file using rar.exe. Its working fine on Windows Xp. But when the same program runs on Windows server 2003 machine, Sometimes the processing gets stuck. In task manager if I terminate rar.exe, the process continues in normal ways. This issue is not occuring frequently, case would once in thousand requests.
Can you please help me with the same.
Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|