Multi-value editor for path environment variable not showing in Windows 11 - environment-variables

For some reason the multi-value editor for my Path environmental variable has stopped showing. So instead of seeing this editor:
Multi-value
I am now seeing the the single line editor which is rather frustrating, since it makes editing the path variable that much more cumbersome
Single-value
Note that this is on Windows 11
I tried checking the registry but couldn't find any relative setting there. I've also checked that the Path variable value is correct and does not contain any funny characters.
Any assistance would be greatly appreciated. Thanks

Related

Path and PATH environment vars

I just found out that me system (Windows 8.1) has two different path variables which differ in capitalization (PATH - user variable, Path - system var). I did not notice it before but I have a vague feeling that I have done something wrong when messing with environment variables. Google is of no use because it is case-insensitive.
My question is: Is it an intended by the system or not? Do I have to fix it?
It's normal, no need to fix. In Windows, environment variable names are case-insensitive.
You can see it if you do:
echo %PATH%
in cmd prompt. It will display the combination of both values.

Programatically get system32 path in command prompt

I'm using a command process in another program that for some odd reason does not have the system32 set in the path environment variable. I can use the %comspec% variable to get the path C:/windows/system32/cmd.exe, but I need to just have the folder by itself.
I am not overly familiar with command prompt programming; is there a way that I can just add the system32 (or equivalent) path programmatically?
What do you mean programmatically? If you're refering to a variable, there is no standard variable for system32. However you could use %WINDIR%\system32 or %systemroot%\system32.
While it appears that there is no environment variable for obtaining the system32 folder (or its equivalent) on a system, I did find a solution involving string manipulation. The following block of code will add the folder where the cmd.exe path is located:
SET str=%ComSpec%
SET str=%str:cmd.exe=%
SET PATH=%PATH%;%str%
It is very nice answer. i have tried and worked out. This problem comes with window7 OS probably.
SET str=%ComSpec%
SET str=%str:cmd.exe=%
SET PATH=%PATH%;%str%

Setting relative path in SublimeLinter's sublimelinter_executable_map

Setup: Portable editions of Sublime Text 2 with its plugin Sublimelinter and node.exe.
sublimelinter_executable_map has to set in a way so that Sublimelinter uses node.exe as JavaScript engine.
Could one do this using a relative path instead of a fully qualified path?
Trying with different forms of relative paths as given in MSDN, the plugin failed to detect node.exe. The console message i got was SublimeLinter: javascript disabled (One of the following JavaScript engines must be installed: node.js, JavaScriptCore)
Your GitHub issue on this topic:
https://github.com/SublimeLinter/SublimeLinter/issues/612
Is a duplicate of these:
https://github.com/SublimeLinter/SublimeLinter/issues/611
https://github.com/SublimeLinter/SublimeLinter/issues/459
This seems to be a hot topic.
I forked the repository and started to code a patch for you, which seems to center around this segment:
https://github.com/SublimeLinter/SublimeLinter/blob/4ef4b2ca08e0224b8af59bf3406c4927432efb94/sublimelinter/modules/base_linter.py#L380
But then, it dawned on me... environment variables. Since this seems to be a prevalent issue with many unsolved requests, it seems that you ought to set the PATH environment variable, and place the location you are looking to be found first, earlier in that variable.
Don't know your Windows version, and the process to set an environment variable will be different for your version, so you ought to experiment with that, and then use that method as the standard for all your environments ( as it seems implied you have more than one to maintain ).
Update: Ruby seems to allow relative paths, but JavaScript does not, because of this section:
https://github.com/SublimeLinter/SublimeLinter/blob/4ef4b2ca08e0224b8af59bf3406c4927432efb94/sublimelinter/modules/base_linter.py#L380
Which hinges on: JAVASCRIPT_ENGINE_WRAPPERS_PATH
So the answer is, unless that code is adapted, no. Relative paths cannot be used for JS.

How do I set a Notepad++ variable?

Printing code with Notepad++ is very handy because of the syntax-highlighting.
Unfortunately I'm experiencing a problem with printing.
Now at the left top of the page $(FULL_CURRENT_PATH) is printed, which is, D:\cppWorkspace\project1\display\GUI\main.cpp
I don't want the whole path, to the project, to be printed. However it also should not only print the file name.
In this case it should be, display\GUI\main.cpp. (which are packages inside the project and the file itself)
I tried to edit or set a Notepad++ variable, but I couldn't find a way to do this.
Hopefully someone knows how this can be fixed.
Thanks in advance,
Dennis
Unfortunately the variables are fixed, and cannot be "set" - at least as of the current version (6.3.1). They are simple replacements, handled in the expandNppEnvironmentStrs method in RunDlg.cpp
You're welcome to suggest an idea on IdeaTorrent (see the hosted apps menu on the Sourceforge project), or vote a similar idea up if one exists.

Path for ShellExecute of IExplorer.exe

I want to use ShellExecute iexplore.exe (with an html file name as a command line arg), even if iexplore isn't associated with html files.
Assuming the user hasn't uninstalled it, how safe is it to do so without supplying a path to the program. This works on my machine, i.e. the default Windows search path contains a path to iexplore.exe. Is it reasonable to expect this on all recent Windows (XP+) machines?
Is there a safer way to ShellExecute iexplore.exe?
(Delphi XE2)
(Although this question stands alone, I'll giving the user the option to run IE in the context of this SO question I asked at the same time: Detect Chrome as browser associated with html files in Windows)
'iexplore.exe' is not in the default search path. It's path is registered in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE key. If this key, for any reason, is missing or pointing to a wrong location, your approach won't work. I would think the probability of this happening would be quite low.
As one alternative, you can use Internet Explorer object. With a broken registry or similar, this may also fail, but it sounds like a more official way to me.
ie := CreateOleObject('InternetExplorer.Application');
ie.Visible := True;
ie.Navigate('http://example.com');
IE Object reference here.

Resources