|
Hi,
I have a C# program that will start another external program (such as notepad). The C# program needs to pass arguments and the working directory to the external program. I have attempted to do this like:
Process process = new Process();
try
{
process.StartInfo.UseShellExecute = false;
process.StartInfo.FileName = @"c:\Windows\notepad.exe";
process.StartInfo.Arguments = @"c:\test.txt";
process.StartInfo.WorkingDirectory = @"c:\temp";
process.Start();
process.WaitForExit();
}
catch
{
MessageBox.Show("Error running " + strExe, "Error", MessageBoxButtons.OK);
}
Notepad does start and opens the correct file, but the Working Directory has not been set.
I have tried setting the current directory of the C# applicaiton, then running the notepad process, but the Working Directory is still not set.
Please help!
Pete
|
|
|
|
|
How do you know this isn't working?
How do you know what Notepad is receiving for its working directory? Its file open/save dialogs remember the last directory you used.
|
|
|
|
|
I've found out that it does work after all. I started a batch file that printed the current directory and ran this from the process and it did print the Working Directory!!!
I've spent ages trying to get it working with Notepad and kept trying the File/Save As... to see if the folder was the Working Directory. I didn't realise that it was always the last one used.
Pete
|
|
|
|
|
How did you know that the WorkingDirectory was not set?
|
|
|
|
|
I've found out that it does work after all. I started a batch file that printed the current directory and ran this from the process and it did print the Working Directory!!!
I've spent ages trying to get it working with Notepad and kept trying the File/Save As... to see if the folder was the Working Directory. I didn't realise that it was always the last one used.
Pete
|
|
|
|
|
Sir,
I have created a setup of windows application. It works fine now if I want to change the installer manufacturer, author etc I have to do to the original code. Is there some way that I develop an application in which I load the installer and change its properties and save it with new properties. Or during installation I should be given to change the properties.
Looking forward for your reply.
Thank You.
|
|
|
|
|
Waheed Ur Rehman wrote: Sir,
what if there is Madam xD
Anyway, you cannot change properies of wmi installer after build.
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi Frnd's ....
Can anyone say how to read no of characters in image using C#.net...
Tks in Adv ...
G.Sam....
|
|
|
|
|
Hi,
I think for this you have to implement an ocr-application. This is a really hard issue, which was solved by several components (all really expensive).
Maybe you should try something different
Regards
Sebastian
|
|
|
|
|
First you already asked this question and got your answer, the answer isn't going to change because you ask it twice.
Second did you even bother to read the reply from 'williamnw' on your other question? I'd advice you to take his advice.
|
|
|
|
|
Ssh! But he are troll. I just don't think he's realised it yet, what with the labotamy and everthing.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
You asked the same question a few hours ago, and got the same answer then - You can't just open an image like a text file, and read the text out of it - you need to use OCR software, which isn't straightforward or simple.
Maybe this will help[^]
|
|
|
|
|
|
hi frnd's
how we can create web custom control in c#.net
|
|
|
|
|
|
In my windows based application I have a common User Control called “IItvCMenu” and I have 63 other user Controls that are inherited from the above. Like;
public partial class UWeather : IItvCMenu
{
}
Before I had a Picture Control in IItvCMenu user control and later I want to remove.
But I removed it from IItvCMenu and but now I have 63 error in other user control’s.designer.cs class.
((System.ComponentModel.ISupportInitialize)(this.mailbox)).BeginInit();
Error comes now in each designer form,.. mailbox is my picture control’s name.
I can’t delete it from Design view in inherited user controls.
How can I erase this issue?
|
|
|
|
|
Hi Frnd's...
I'm New to C#.net.Can anyone say how to Create Web Control Library in c#.net Step by step Process
Tks in Adv...
G.sam...
|
|
|
|
|
0/10
If you cannot be bothered to spell or punctuate properly, then I can't be bothered to answer your, frankly worrying, query.
What I would recommend is the following:
- Open up the control panel and run 'Add/remove programs'
- Remove EVERYTHING listed. even PronSurfer2000
- Shut down your machine and remove all the power cables.
- Take it back to the store.
The web is full of help and how-to's, if you cannot even attempt to find some information, then why should any of us help? Go on, answer that Mr Clever-Can't-Even-Choose-The-Right-Country-For-My-Profile!
And get a frogging spell checker!
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Tks i know that...By.. T
|
|
|
|
|
williamnw wrote: Clever-Can't-Even-Choose-The-Right-Country-For-My-Profile!
5!!!!!
|
|
|
|
|
|
Hi,
what do you mean with program files? If these are text files, you could read the file into memory, overwrite the existing one, write your header using a StreamWriter, followed by writing the content of the file from memory.
Regards
Sebastian
|
|
|
|
|
|
So a class file is nothing more than a text file with a specific extension (e.g. cs). So you could use StreamReader/StreamWriter to add a header to each file.
|
|
|
|
|
Friends
I have a problem in c# windows application. I have a form which has controls like Combo Box, Text Box, User Control, Radio button and so on.If i modify any value in the control it should alert me when i close the form.Otherwise it should not.Suggest me the ways and events in which i can i do this.Please help me
|
|
|
|