By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,044 Members | 1,291 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,044 IT Pros & Developers. It's quick & easy.

Add to run command

pentahari
P: 60
i create the exe using visual basic 6.0. how can i run the exe using run command with out full path of the exe.

For ex:
open the notepad using run command. (start-->run-->notepad)
open the wordpad using run command. (start-->run-->wordpad)
May 30 '08 #1
Share this Question
Share on Google+
2 Replies


jeffstl
Expert 100+
P: 432
Windows uses a default path within the Run command, and its going to depend on which OS, which version, etc on what that path is set to.

So basically you can either change the default path on a PC to match where your .exe is stored, or you can place your .exe within the directory of the default path.

The path is now managed by Windows 2000 / Windows XP and not the autoexec.bat or autoexec.nt files. To change the system environment variables, follow the below steps.

From the desktop, right-click My Computer and click properties.
In the System Properties window, click on the Advanced tab.
In the Advanced section, click the Environment Variables button.
Finally, in the Environment Variables window, highlight the path variable in the Systems Variable section and click edit. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.

C:\Program Files;C:\Winnt;C:\Winnt\System32

http://vlaurie.com/computers2/Articles/environment.htm
Jun 4 '08 #2

jeffstl
Expert 100+
P: 432
Also note that if you change the default path, things like notepad, etc will no longer be able to be launched the same way since its pointing somewhere else.
Jun 4 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.