System Variables

Praetor

Administrator
Staff member
You know the way you can do Start-->Run-->"notepad" (or "calc" or some other thingy like that) .... how can we make arbitrary ones? :)
 

Christopher

VIP Member
The "run" dialogue just runs a command as if you were running it from the terminal. It looks in the PATH directories and tries to find the executable. All you have to do is create a link in the WINDOWS directory, or add a custom directory in the PATH system variable (System Properties -> Advanced -> Environment Variables button. Find it, click 'Edit'). For example:

Code:
%SystemRoot%\system32;%SystemRoot%;C:\Program Files\Borland\BCC55\Bin\[color=blue][b];C:\Program Files\Praetors 1337 Program\[/b][/color]
(Separate different directory paths with a colon).
 

Praetor

Administrator
Staff member
The "run" dialogue just runs a command as if you were running it from the terminal.
Except it doesnt :(

Take for instance the Micrsoft PowerTools calculator. It's installed to C:\WINDOWS\system32\PowerCalc.exe ... and to activate ... I would have to type PowerCalc.exe ... that makes sense. Now consider Notepad which is installed to c:\WINDOWS\system32\notepad.exe .... I only have to type notepad -- without the exe.

Thats not such a big deal ... what I DO want to do is type something like STATS_A01 and have it open the folder D:\SCHOOL\2A\STATS206\ASSIGN\A01 or something like that.
 

Lorand

<b>VIP Member</b>
That Path thing that Chroder posted would do the job.
However, if you want to be able to open arbitrary folders on that path, make a bat file with contents:
Code:
explorer D:\SCHOOL\2A\STATS206\ASSIGN\%1
name it stats.bat, place it in C:\windows\system32.
Then start/run "stats a01" would open D:\SCHOOL\2A\STATS206\ASSIGN\A01, "stats a02" would open D:\SCHOOL\2A\STATS206\ASSIGN\A02, and so on...
 

Praetor

Administrator
Staff member
Yes I know about the batch files but i was hoping there would be a more convenient technique so i wouldnt have to make a batch for every single thingy i wanted to fire up
 
Top