or you could try a Windows PowerShell script; PowerShell is installed on Windows 7 by default.
run powershell.exe
PS C:\> [Environment]::SetEnvironmentVariable("TestVariable", "Test value.", "User")
Then, for example, from cmd.exe
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\>echo %TestVariable%
Test value.
C:\>
Or (in a new) powershell.exe
PS C:\> echo $ENV:TestVariable
Test Value.
PS C:\>
check out http://technet.microsoft.com/en-us/library/ff730964.aspx