System Environment variables are two types
1)User Variables
2)System Variables
*********************************************************************************
User Variables :
*********************************************************************************
In user specific, user or admin can declare the variables
Syntax:
Set Obj = CreateObject("wscript.shell")
set objEnv = Obj.Environment("User")
sUserName = objEnv.Item("UserName") 'these variable should be declare in User environment variables
*********************************************************************************
System Variables :
*********************************************************************************
In System specific only admin can declare the variables
Syntax:
Set Obj = CreateObject("wscript.shell")
set objEnv = Obj.Environment("System")
sUserName = objEnv.Item("UserName") 'these variable should be declare in System environment variables
*********************************************************************************
No comments:
Post a Comment