How to remove environment variable
To clear an environment variable using Setx.exe at a command prompt:
Click Start, point to Programs, and then click Command Prompt. If you want to clear a user environment variable, type the following line
setx <variable> ""
where is the user environment variable. If you want to clear a system environment variable, type the following line
setx <variable> "" -m
where is the system environment variable. Close the command prompt. When you use Setx.exe to clear an environment variable value, the environment variable name is not affected.
Related videos on Youtube
Dao Minh Thu
Updated on September 18, 2022Comments
-
Dao Minh Thu over 1 year
I am use Windows 10 pro. I try to run other Tomcat instance, but I cannot control config (
%CATALINA_HOME%
).This is
systempropertiesadvanced
(hasn'tCATALINA_HOME
variable):I try to echo by cmd (Administrator role)
I try to echo by cmd: (no return result)
Because I want run Tomcat correctly (other Tomcat instance), I must remove variable
CATALINA_HOME
, please help me!-
Mokubai about 8 yearsIf you've cleared to variable yourself then you might want to try rebooting (not shutdown) your computer and see if it gets cleared then.
-
Dao Minh Thu about 8 yearsThank you, yesterday, I did the same your advice, It works. But today, nothing change.
-
DavidPostill about 8 yearsTomcat may be running as a service (on startup), using a batch file which sets
%CATALINA_HOME%
-
Dao Minh Thu about 8 yearsThank you. inside file \bin\startup.bat, I add this line:
set "CATALINA_HOME=C:\data\dcv\liferay\for deploy\liferay-portal-6.2-ce-ga6\tomcat-7.0.62"
, it works. -
DavidPostill about 8 years@dovy Please read Can I answer my own question?. You might want to convert your comment into an answer ;)
-
Dao Minh Thu about 8 yearsThis is merely a trick, It doesn't resolve the above question.
-