How to set a Path variable on a different, non-system partition

newdev

New member
Local time
6:43 AM
Messages
4
I'm trying to run notepad++ from latest version of Git Bash in Windows 7 Ult.

I run notepad++.exe as a portable from :

"D:\0..Apps.p\Notepad++.p\notepad++.exe"

but when I add this to System Variables > Path, it doesn't run.

I shouldn't have to use anything other than the filename,
if my system is configured correctly, right? such as the "start" argument?

>start notepad.exe

Also, could someone help me understand how to properly use wildcard * for System Variables > Path ?
b/c I would ideally like to just set D:\0..Apps.p\* as a Path variable so I could open any of the portables
from within Git Bash.

Thank You
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Asus
OS
Windows 7 Ultimate x64
CPU
i7
Memory
16 gb
Hard Drives
ssd
Browser
chrome
Environment variables, including path, are loaded when a process start, so remember to close the console and open it again for the change to make effect.
Additionally, when setting system-wide environment variables, it may be a good thing to at least log-off and login again into your account for the change to take effect. User-wide variables suffice to restart the affected programs.

Note that start notepad.exe won't run Notepad++, as its executable is named differently as you posted before (D:\0..Apps.p\Notepad++.p\notepad++.exe), so the command should be start notepad++.exe.
Also, note that the start program is rarely needed, only if you need more advanded functions, so you can leave it as notepad++.exe. And also, the .exe extension is assumed if ommited, so you can simplify it even more up to notepad++:p. Pretty descriptive of what it does.

As long as I know, Windows don't support wildcards for the path variable, so you'll have to list every single folder there. As an alternative, you could point the path to a folder containing a bunch of bat files whose sole purpose is to launch the programs all over the place. Or even better, just create desktop/taskbar shortcuts and launch all programs with a single click.
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
Thanks! You've answered a main question I had: no support for wildcards in the path variable.

Further experimenting, I discovered that - probably b/c my Notepad++ is portable,
then Git Bash does attempt to start it up, except I'm getting error messages and it won't start :

"Checking certificate of D:\SciLexer.dll : Cannot find the requested object." and

"Authenticode check failed: signing certificate or hash is not recognized"

"Load langs.xml failed!"

Load stylers.xml failed >
"C:\Users\d\AppData\Roaming\Notepad++\stylers.xml"

BUT ! I haven't updated this portable in years, so they may be packing it differently now --
I should install the current portable and recheck - in the interests of properly completing this experiment.

----------------------
But to end on a positive note -- if I enter a Path variable for the simple
ShellExView by Nirsoft, which is also a portable, then even opening Git Bash
from the desktop will start up shexview when I type it in as a simple filename, no file extension.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Asus
OS
Windows 7 Ultimate x64
CPU
i7
Memory
16 gb
Hard Drives
ssd
Browser
chrome
Just tried newest version of portable - same problem -
so this is an issue w/ Notepad++, to be pursued further on their site
for related problems.

Thanks again!
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Asus
OS
Windows 7 Ultimate x64
CPU
i7
Memory
16 gb
Hard Drives
ssd
Browser
chrome
I wonder if metapad.exe might work better. Dunno, never tried changing environment :)
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Antec desktop; Acer Aspire laptops
OS
Windows 7 Professional 64-bit
CPU
Desktop i5; Acers i5 & i7
Memory
desktop 16GB; 1 Acer 8GB & 1 Acer 16GB
Hard Drives
1TB split into 2 equal partitions [OS and data] usable by RJS
Internet Speed
AT&T DSL
Browser
FF, GChrome, msIE
Other Info
Windows 7 Firewall, Emsisoft AM/AV, MSE [scan-only], SpywareBlaster, Ruiware/BillP combine
RolandJS - appreciate your reply, b/c you've prompted me to return and complete this thread, like so:

It's one more humbling lesson for any beginner - of the absolutely cold logic a computer follows.

After numerous times in & out of Environment Variables applet,
I finally realized that the path simply ends with the name of the folder
that contains the executable - NOT ending in .exe .

and, it doesn't even need the double quotes that Windows Shift > Rclick > Copy as Path
puts around a file path (at least on my current setup).

So once I got everything cleaned up in a proper manner,
by gosh the portable version of notepad++ (newest as of yesterday) fired right up - no complaints.

Further proof is that it works equally in cmd.exe as well as Powershell 7.0.2.

Thx again :D
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Asus
OS
Windows 7 Ultimate x64
CPU
i7
Memory
16 gb
Hard Drives
ssd
Browser
chrome
newdev, thanks for that thorough follow-up - I learned stuff today!
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Antec desktop; Acer Aspire laptops
OS
Windows 7 Professional 64-bit
CPU
Desktop i5; Acers i5 & i7
Memory
desktop 16GB; 1 Acer 8GB & 1 Acer 16GB
Hard Drives
1TB split into 2 equal partitions [OS and data] usable by RJS
Internet Speed
AT&T DSL
Browser
FF, GChrome, msIE
Other Info
Windows 7 Firewall, Emsisoft AM/AV, MSE [scan-only], SpywareBlaster, Ruiware/BillP combine
Back
Top