I was trying to get the EnvSet() but people on the internet say it only works while script runs.
So i went doing it with the registry instead.
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
I accidentally replaced "path" key with my own value.
2 questions
What is the default value in Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\path ? for Win10X64 ?
Second question is:
Why
EnvSet Help
I always use the following code for setting environment variables:
Example:
#RequireAdmin
#include <EnvUpdate.au3>
Local $sAddPath = "C:\Data"
Local $sEnvPath = EnvGet("Path")
If $sEnvPath <> "" And StringRight($sEnvPath, 1) <> ";" Then $sEnvPath &= ";"
MsgBox(0, "Env Path Original", $sEnvPath)
If StringInStr($sEnvPath, $sAddPath) Then Exit MsgBox(0, "Env Path Updated", $sAddPath & ' already add