Run a console application from command dos

  • Thread starter Thread starter ACC
  • Start date Start date
A

ACC

Hi,

Imagine I have a .msi file to install my application and that my
application can be executed by a graphical interface, or simply by DOS
shell.

My problem is that I want to run it from the command dos shell just by
doing "ABC.exe parameter parameter... " and not by doing
"full_path/ABC.exe parameter parameter...

Can anyone tell me how can I make this??


Thank you for your help,

ACC
 
Aboulfazl,

How can I do that? I know how to do it by hand... but I want to do it
automatically! I want to give my application to a client, and when he
installs it the enviorment variable should be set.

Thank you for your help,
ACC
 
Use either PInvoke as below or
Environment.SetEnvironmentVariable for .NET 2.0

[DllImport("kernel32.dll", SetLastError=true)]
static extern bool SetEnvironmentVariable(string lpName, string lpValue);
How can I do that? I know how to do it by hand... but I want to do it
automatically! I want to give my application to a client, and when he
installs it the enviorment variable should be set.
--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
You can use Set Path Command to adding new path (path of your msi ) to
the default path of Windows.

hope this helps you
A.Hadi
 
Back
Top