Horje
auto update environmental variables windows Code Example
auto update environmental variables windows
Set oShell = WScript.CreateObject("WScript.Shell")
filename = oShell.ExpandEnvironmentStrings("%TEMP%\resetvars.bat")
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set oFile = objFileSystem.CreateTextFile(filename, TRUE)

set oEnv=oShell.Environment("System")
for each sitem in oEnv 
    oFile.WriteLine("SET " & sitem)
next
path = oEnv("PATH")

set oEnv=oShell.Environment("User")
for each sitem in oEnv 
    oFile.WriteLine("SET " & sitem)
next

path = path & ";" & oEnv("PATH")
oFile.WriteLine("SET PATH=" & path)
oFile.Close
auto update environmental variables windows
@echo off
%~dp0resetvars.vbs
call "%TEMP%\resetvars.bat"




Shell

Related
what is for ubuntu debian or rpm Code Example what is for ubuntu debian or rpm Code Example
How to install ctlptl Code Example How to install ctlptl Code Example
Prerequisite packages installation for Docker Code Example Prerequisite packages installation for Docker Code Example
Checking dependencies BASH Code Example Checking dependencies BASH Code Example
update component tns-android Code Example update component tns-android Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10