Windows 7 Forums


Windows 7: User Variable %username%

20 Oct 2010   #1

Windows 7 Ultimate x32
 
 
User Variable %username%

Hi Guys and Girls,

I wonder if someone might be able to help me. We use a product called wildfire 5 with user variables set as follows

WT_PTC_ROOT = C:\PTC\Local_Data\%USERNAME%

WT_PTC_HOME = C:\PTC\Local_Data\%USERNAME%

This seems to work on first look at the set command in dos. The logged on username is shown against the above variable but as soon you restart the machine the above user variables reverts back to the above.

So it is shown in the set comand as

WT_PTC_ROOT = C:\PTC\Local_Data\%USERNAME%

WT_PTC_HOME = C:\PTC\Local_Data\%USERNAME%

Rather than

WT_PTC_ROOT = C:\PTC\Local_Data\wayneg

WT_PTC_HOME = C:\PTC\Local_Data\wayneg

I have tried putting a system variable in as follows

username = %username%

But no luck.

Does anybody have any ideas or work arounds? This works fine in XP without a problem.

Any help would be great.

Cheers, Wayne

My System SpecsSystem Spec

20 Oct 2010   #2

Windows 7 32 bit
 
 

I would take a loot at this:

Setx - Set environment variables

Otherwise, I think with Vista and Windows 7 you have to set registry keys for your product's environment variables.

edit: this may be more to the point. Reading it now:

http://www.robvanderwoude.com/vbstec...nvironment.php

Last edited by MilesAhead; 20 Oct 2010 at 07:04 PM..
My System SpecsSystem Spec
Reply

 User Variable %username% problems?



Thread Tools



Similar help and support threads for: User Variable %username%
Thread Forum
Username "New user" After Installing General Discussion
Set permanent variable in cmd General Discussion
Solved Variable speed dvd burning Hardware & Devices
Change windows username (ComputerName/Username Software
repeated variable bsods BSOD Help and Support


All times are GMT -5. The time now is 11:51 AM.


Seven Forums Android App Seven Forums IOS App Follow us on Facebook

Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32