What is the correct way to create and set a new System variable via the command line in Windows 7?
I know that it's possible through the GUI by doing the following:
Control Panel => System => Advanced System settings => Environment variables => Add new System variable
I have read about SetX and this seems like correct way to do it, but I still have some questions:
If I wanted to create an environment variable called
TNS_ADMIN
and set the value as the path to mytnsnames.ora
file, would below be the entire command?SetX TNS_ADMIN \\domain.blah\directory\DBA\OraUpdates /m
Would this automatically get added to the
PATH
variable? Or would I need to update thePATH
variable separately after adding the new System variable?