Introduction:
The value of the TEMP variable on a machine can be modified using a DMS Script. The script can be packaged as a Software Delivery package and deployed to the machine on which the TEMP variable needs to be modified
Environment:
CA Client Automation – All Versions
Instructions:
Use the following script to update the TEMP Environment variable.
REM DISCLAIMER:
REM This job is provided "as is", for informational purposes only.
REM In no event shall Computer Associates or its resellers be liable for any damages
REM whatsoever (including, without limitation, damages for loss of business profits,
REM business information, or other pecuniary loss) arising out of the use of or
REM inability to use this job, even if Computer Associates has been advised of
REM the possibility of such damages.
REM This Script is an example.
REM This Script modifies the Environmental Variable "TEMP" to C:\TEMP
Dim hKey, intval as integer
Dim StrVal as string
hKey=RegOpenKey(HKEY_LOCAL_MACHINE,"SYSTEM\CURRENTCONTROLSET\CONTROL\SESSION MANAGER\ENVIRONMENT")
RegQueryVariable(hKey,"TEMP",StrVal,intval)
' Old Value of the variable
' msgbox(Strval)
RegSetVariable(hkey,"TEMP","C:\TEMP")
RegCloseKey(hkey)
Note: For more information on the parameters, refer ITCM_DMSScriptingLanguage_Ref_ENU Guide