0

I am having an issue with Windows 10 environment variables.

I was attempting to perform an Oracle XE installation which failed and then rolled back.

My issue now is that the ORACLE_HOME env variable is stuck as the value set during installation. What is striking to me is that the value does not appear to be set anywhere.

It is only visible in the command line using set:

Cmd

C:\Users>set .... ORACLE_HOME=C:\app\product\21c\dbhomeXE ... 

System Properties

system properties

regedit

Computer\HKEY_CURRENT_USER\Environment

registry current user

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

registry local machine

Policies

No local policies setting the variables via scripts, checked under:

User Configuration > Windows Settings > Scripts (Logon/Logoff)


The only other note is that the installation was also attempted under a different user.

Where else could this be set?

1 Answer 1

3

Environment variables are set per process, so, the processes can alter their environments variables at runtime for example.

By default, a new process inherits the env variables set in its parent (so, if you start cmd.exe from Explorer.exe then cmd will spawn with the env variables in effect in Explorer.exe at that time).

But if you start cmd.exe from, say, a powershell script, then the cmd.exe env variables will be inherited from the powershell.exe environment variables). The thing is that if a powershell scripts runs, sets a few environement variables for its own use, and then spawns a cmd.exe window, then this cmd window will inherit the environement variables set at this point of time.

So, you'll have to investigate the whole chain: Identify how do you start the command line interpreter that shows the ORACLE_HOME variable, and inspect the parent's env variables with Process Explorer. Process Explorer can show the process list as a tree, this facilitates the identification of the parent (if the parent process is still running).

Process Explorer showing the Environments variables of cmd.exe

1
  • Thank you. I can see indeed that the env vars are inherited from Explorer.exe how can i check how these are set though? Commented Apr 30 at 10:03

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.