-
Sep 11th, 2013, 03:47 PM
#1
Thread Starter
Fanatic Member
Problum decompile chm file with spaces in filename.
hi I made some code to decompile chm files. I use hh.exe to decompile the file.
It works fine but if there is any spaces in the filename it just does not decompile.
I have even tried putting quotes around the file name with any luck any idea,s
Here the code I done.
Code:
Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "hh.exe";
p.StartInfo.Arguments = "-decompile " + txtoutput.Text + " " + txtInput.Text;
try
{
p.Start();
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
txtoutput.Text is were the chm get's decompiled to
txtInput is the input filename.
Thanks.
-
Sep 11th, 2013, 04:45 PM
#2
Re: Problum decompile chm file with spaces in filename.
If you run hh.exe manually with a file path with spaces in it, does it work?
If it does, then putting quotes around txtInput should work.
Code:
Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "hh.exe";
p.StartInfo.Arguments = "-decompile " + txtoutput.Text + " \"" + txtInput.Text + "\"";
try
{
p.Start();
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
-
Sep 11th, 2013, 05:27 PM
#3
Thread Starter
Fanatic Member
Re: Problum decompile chm file with spaces in filename.
No I tried with quotes in the path and with out if a file is called test.chm then it work but if it's called te st.chm does not work even with and without quotes. not sure I even tryed converting the path to a DOS path and no luck. Only way I can think of is making a copy of the file replacing the spaces with underscores then running hh.exe on that.
-
Sep 11th, 2013, 06:51 PM
#4
Re: Problum decompile chm file with spaces in filename.
So if you go into the command prompt and run hh.exe (not running it through your code) with "te st.chm" does it work as expected?
-
Sep 12th, 2013, 02:08 AM
#5
Thread Starter
Fanatic Member
Re: Problum decompile chm file with spaces in filename.
no same result does not decompile seems hh.exe does not like spaces in the file name or the path full stop.
one more way around is I may have to copy the file say to the Temp folder remove spaces then extract the contents and move it back latter. other than that I think I need t maybe dig into the API maybe look at the SDK anyway thanks for your help.
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
|