|
hi
im not sure on the correct name of what i want to do so seaching is very hard for me.
anyway what i want to do is store an external exe into my app then expand it at runtime when needed deleting it when the program has finished.
ie
i have an exe called patch.exe and i need to pass say these params to it
patch -a -b -c.
i can run it and do what i like if i tell my app the full path to the file
(ie c:\patcher\patch.exe)but would like to unpack the exe from my app into the same dir as the app run it then delete it.
so instead of
proc.StartInfo.FileName = "c:\patcher\patch.exe" its
proc.StartInfo.FileName = "patch.exe" and it runs the unpacked exe
hope this makes sense
choss
|
|
|
|
|
Why not just place the patch into the setup package, and then run it from your executable?
|
|
|
|
|
im currently doing that but i want to add a new feature with maybe 100 patches to go with it and at least want the patch files stored in the exe
i also just would like to now how everyone else does it
|
|
|
|
|
Why in the world would you want to package patches with the original distributable? Why not just rebuild the app, and forgo the patches.
As far as everyone else, nobody does it this way. There is probably a part of the app that checks the web, and DLs the patches and installs them. Embedding them makes no sense at all.
|
|
|
|
|
edboe wrote: Why in the world would you want to package patches with the original distributable?
because my current app will act as a gui for a dos program which i have made over 100 patches for and each patch is a seperate file i want all of these contained in the exe and theres is no generic patch as it check the md5 of each selected bin file and wont patch if a mismatch is found.
edboe wrote: As far as everyone else, nobody does it this way.
everybody in my scene does it this way
|
|
|
|
|
Have you tried Resgen.exe?
|
|
|
|
|
You can also check this article:
http://msdn2.microsoft.com/en-us/library/7k989cfy(VS.80).aspx
|
|
|
|
|
Why not just store the .exe as an embedded resource in your app?
|
|
|
|
|
Does it matter if I open the .csproj file or .sln file to EDIT my project?
I have one sln file that contains two projects. I tried to open one of the .csproj files and I was able to view in the Solution Explorer the sln and the two projects that belong to the sln and other information.
Is there a valid reason for me to open .sln instead of .csproj when have multiple projects?
|
|
|
|
|
The .sln file contains information about the projects that are required to compile your whole solution. The .csproj just contains information about which files are in the particular project and how to compile them. If opening your .csproj file results in all the projects getting loaded, then VS is basically opening the .sln in the background. You should just open the .sln file.
|
|
|
|
|
You can do it. Just back up the original in case you change something that is critical.
|
|
|
|
|
i designed a mobile application,
is this application can be run on Nokia 9110 Communicator?
thanks for help
MD_NADA
|
|
|
|
|
That isn't enough information to answer your question. What operating system does the Nokia 9110 Communicator run? Did you use the .NET Compact framework to build your application or some other framework?
|
|
|
|
|
I may be wrong, but i think it uses geos. If that is the case, no.
|
|
|
|
|
i designed a mobile application,
is this application can be run on Nokia 9110 Communicator?
thanks for help
MD_NADA
|
|
|
|
|
hi,
how do i highlight syntax in c# as soon as I open a text file which contains c# code in it into a richtextbox in windowsforms.
Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.
|
|
|
|
|
veluru krishna wrote: how do i highlight syntax in c# as soon as I open a text file which contains c# code in it into a richtextbox in windowsforms.
You might want to read up on the subject of Language Processors. Syntax highlighting is a form of language processing.
|
|
|
|
|
.NET doesn't provide such a control. Use the search function at the top to search for articles.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
hi,
when use the following code
SaveFileDialog dlg = new SaveFileDialog();
dlg.Filter = "Text Files|*.txt|Comma Seperated Files|*.csv|All Files|*.*";
dlg.InitialDirectory = @"C:\";
saveFileDialog1.OverwritePrompt = true;
if (dlg.ShowDialog() == DialogResult.OK)
{
using (System.IO.StreamWriter writer = new System.IO.StreamWriter(dlg.FileName))
{
writer.Write(this.richTextBox1.Text);
writer.Flush();
}
}
it saves a file but unfortunately it saves it without newline characters ie.,. I want to save my work as it is displayed in the multiline text box.can you help me please
Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.
|
|
|
|
|
Are you viewing your file with notepad.exe? RichTextBox delimits the lines with a \n instead of the windows typical \r\n , that's why some editors have troubles with it. Proper editors like NotePad++ or UltraEdit have no problems with a \n on windows.
You might do that:
writer.Write(richTextBox1.Text.Replace("\n", Environment.NewLine));
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Good day.
I would like to know if there is an API i can use to change windows service to run under LocalSystem account from a user account. Currently I am using the API below to change the service from using a LocalSystem account to a user account.
public static int ChangeService(string Name, string Password, string serviceName)
{
ManagementBaseObject inParams = null;
ManagementObject srvc = new ManagementObject("Win32_Service.Name='" + serviceName + "'");
inParams = srvc.GetMethodParameters("Change");
inParams["StartName"] = Name; //account name .\\localaccount;
// 'domain\\domainaccount' (or account@somedomain on XP and up)
inParams["StartPassword"] = Password; // password
ManagementBaseObject outParams = srvc.InvokeMethod("Change", inParams, null);
return System.Convert.ToInt32(outParams.Properties["ReturnValue"].Value);
}
But the problem now is that i cant change the service back to LocalSystem.
Many thanks in advance.
Kulile --- RSA
|
|
|
|
|
Hi all
I am using the code below to open an internet explorer window:
System.Diagnostics.Process.Start(
"iexplore.exe",
"http://www.codeproject.com"
);
It works well, but in ie7, it opens a new window every time. But i want to open a new tab instead of a new window. Is there any way to do this?
Thanks
ozgur.nevres
|
|
|
|
|
Stupid IE7, i don't like it.
Well, that doesn't work because it starts a whole new process, you want to tell the existing process to open up a new tab... i have no idea how to do that
But i shall investigate... AWAY!
|
|
|
|
|
Have you tried starting http://www.codeproject.com as a process in stead of iexplore??
System.Diagnostics.Process.Start("http://www.codeproject.com");
I haven't got IE7 installed so cannot test, i'm sorry, but maybe it's the trick
- - - --[ i love it when a plan comes together ]-- - - -
|
|
|
|
|
GREAT! It worked.
Many thanks!
And it is better than first one, cz it is using the default browser, not ie only. I changed my default browser to opera, and it opened a new tab in opera.
ozgur.nevres
|
|
|
|