Hi guys,
my target is to set a local variable usually done with the set command within a batch file using a vbs script.
I created a vbs script who creates a registry key in HKCU\Environment.
I call the vbs within the batch file (simply the name no call or start or cmd) but from that point on I can not see the
either the variable or its value. I check whether the script works or not putting a set command after calling the vbs
script. There is no trace of the variable just create with the vbs script.
Something like this:
test.vbs
DOS_VAR = "MIA_ter"
set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.RegWrite "HKEY_CURRENT_USER\Environment\"&DOS_VAR, "03"
prova.bat
test.vbs
set
pause
Any hint, please?
I need to work this way, because I've got an old DOS batch file but some variables must be set accordingly on who is
currently logged on my Windows machine.
TIA,
Alex.