Syntax

setx /s <host> /u <domain\user> /p <pw> <variable> <value>

Example:

Some users were missing %JAVA_HOME% variable for a proprietary software and I set it remotely with this command:

setx /s PC1234 /u itdb\kek /p 123456 JAVA_HOME "C:\Program Files\Java\jre1.8.0_73"

Note: Requires administrator access on the remote client


Next Post Previous Post