471,321 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,321 software developers and data experts.

Run a console application from command dos

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

Feb 20 '06 #1
4 1816
You can set environment variable( Path) to ignoring the fullPath

Regards,
A.Hadi

Feb 20 '06 #2
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
Aboulfazl Hadi wrote:
You can set environment variable( Path) to ignoring the fullPath

Regards,
A.Hadi


Feb 20 '06 #3
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.
Aboulfazl Hadi wrote:
You can set environment variable( Path) to ignoring the fullPath

--
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

Feb 20 '06 #4
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

Feb 24 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Mark Allison | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.