Re: [H] Windows 7 environment variables

2010-03-05 Thread Thane Sherrington

At 05:03 PM 3/4/2010, Christopher Fisk wrote:

On Thu, 4 Mar 2010, Thane Sherrington wrote:


At 04:29 PM 3/4/2010, Thane Sherrington wrote:
I have a little batch file that uses %username% to do some 
stuff.  That works fine in Windows XP and Vista, but in 7, it 
becomes username-PC$ - so if the username is Fred, %username% is 
Fred in XP and Fred-PC$ in 7.  Of course, that breaks the batch 
file.  Am I doing something wrong or did MS really change this?


Interesting.  Just checked on another 7 machine (this one 7 
Ultimate instead of 7 Home Premium) and it shows the variable 
normally.  Now I'm really confused.


Has the username been changed?  Try creating a new user and testing 
that and changing the name of a user that is working properly.


The username hadn't been changed (it was the one from the Windows 
install) but when I created a new username, it worked fine.  I then 
deleted the first username and recreated it and it worked fine 
too.  Ahh, Microsoft - life would be so boring without your little tricks. :)


T 





Re: [H] Windows 7 environment variables

2010-03-05 Thread Thane Sherrington

At 05:10 PM 3/4/2010, Eli Allen wrote:

The username comes from what is entered when you login not the actual
username


Yeah, but I'm clicking on the user to go into Windows, so I'm not 
typing anything.


T 





Re: [H] Windows 7 environment variables

2010-03-05 Thread Thane Sherrington

At 05:14 PM 3/4/2010, JRS wrote:

When you run set from the command prompt, what does it show as the user?


It was showing Fred-PC$.  After recreating the user, it works.  Weird.

T



 --
JRS
stei...@pacbell.net


Facts do not cease to exist just
because they are ignored.



- Original Message 
 From: Thane Sherrington th...@computerconnectionltd.com
 To: hardware@hardwaregroup.com
 Sent: Thu, March 4, 2010 12:42:50 PM
 Subject: Re: [H] Windows 7 environment variables

 At 04:29 PM 3/4/2010, Thane Sherrington wrote:
  I have a little batch file that uses %username% to do some 
stuff.  That works
 fine in Windows XP and Vista, but in 7, it becomes username-PC$ - 
so if the
 username is Fred, %username% is Fred in XP and Fred-PC$ in 7.  Of 
course, that
 breaks the batch file.  Am I doing something wrong or did MS 
really change this?


 Interesting.  Just checked on another 7 machine (this one 7 
Ultimate instead of
 7 Home Premium) and it shows the variable normally.  Now I'm 
really confused.


 T





[H] Windows 7 environment variables

2010-03-04 Thread Thane Sherrington
I have a little batch file that uses %username% to do some 
stuff.  That works fine in Windows XP and Vista, but in 7, it becomes 
username-PC$ - so if the username is Fred, %username% is Fred in XP 
and Fred-PC$ in 7.  Of course, that breaks the batch file.  Am I 
doing something wrong or did MS really change this?


T




Re: [H] Windows 7 environment variables

2010-03-04 Thread Thane Sherrington

At 04:29 PM 3/4/2010, Thane Sherrington wrote:
I have a little batch file that uses %username% to do some 
stuff.  That works fine in Windows XP and Vista, but in 7, it 
becomes username-PC$ - so if the username is Fred, %username% is 
Fred in XP and Fred-PC$ in 7.  Of course, that breaks the batch 
file.  Am I doing something wrong or did MS really change this?


Interesting.  Just checked on another 7 machine (this one 7 Ultimate 
instead of 7 Home Premium) and it shows the variable normally.  Now 
I'm really confused.


T 





Re: [H] Windows 7 environment variables

2010-03-04 Thread Stan Zaske
So am I confused, that you're still using batch files. Written anything 
in BASIC lately? No offense, just couldn't resist. LOL



On 3/4/2010 2:42 PM, Thane Sherrington wrote:

At 04:29 PM 3/4/2010, Thane Sherrington wrote:
I have a little batch file that uses %username% to do some stuff.  
That works fine in Windows XP and Vista, but in 7, it becomes 
username-PC$ - so if the username is Fred, %username% is Fred in XP 
and Fred-PC$ in 7.  Of course, that breaks the batch file.  Am I 
doing something wrong or did MS really change this?


Interesting.  Just checked on another 7 machine (this one 7 Ultimate 
instead of 7 Home Premium) and it shows the variable normally.  Now 
I'm really confused.


T






Re: [H] Windows 7 environment variables

2010-03-04 Thread Thane Sherrington

At 04:57 PM 3/4/2010, Stan Zaske wrote:
So am I confused, that you're still using batch files. Written 
anything in BASIC lately? No offense, just couldn't resist. LOL



On 3/4/2010 2:42 PM, Thane Sherrington wrote:

At 04:29 PM 3/4/2010, Thane Sherrington wrote:

I have a little batch file that uses %username% to do some stuff.
That works fine in Windows XP and Vista, but in 7, it becomes 
username-PC$ - so if the username is Fred, %username% is Fred in 
XP and Fred-PC$ in 7.  Of course, that breaks the batch file.  Am 
I doing something wrong or did MS really change this?


Interesting.  Just checked on another 7 machine (this one 7 
Ultimate instead of 7 Home Premium) and it shows the variable 
normally.  Now I'm really confused.


T






Re: [H] Windows 7 environment variables

2010-03-04 Thread Thane Sherrington

At 04:57 PM 3/4/2010, Stan Zaske wrote:
So am I confused, that you're still using batch files. Written 
anything in BASIC lately? No offense, just couldn't resist. LOL


Batch is God's language.  There are two many useful command line 
programs to dump it.


T




On 3/4/2010 2:42 PM, Thane Sherrington wrote:

At 04:29 PM 3/4/2010, Thane Sherrington wrote:

I have a little batch file that uses %username% to do some stuff.
That works fine in Windows XP and Vista, but in 7, it becomes 
username-PC$ - so if the username is Fred, %username% is Fred in 
XP and Fred-PC$ in 7.  Of course, that breaks the batch file.  Am 
I doing something wrong or did MS really change this?


Interesting.  Just checked on another 7 machine (this one 7 
Ultimate instead of 7 Home Premium) and it shows the variable 
normally.  Now I'm really confused.


T






Re: [H] Windows 7 environment variables

2010-03-04 Thread Christopher Fisk

On Thu, 4 Mar 2010, Thane Sherrington wrote:


At 04:29 PM 3/4/2010, Thane Sherrington wrote:
I have a little batch file that uses %username% to do some stuff.  That 
works fine in Windows XP and Vista, but in 7, it becomes username-PC$ - so 
if the username is Fred, %username% is Fred in XP and Fred-PC$ in 7.  Of 
course, that breaks the batch file.  Am I doing something wrong or did MS 
really change this?


Interesting.  Just checked on another 7 machine (this one 7 Ultimate instead 
of 7 Home Premium) and it shows the variable normally.  Now I'm really 
confused.


Has the username been changed?  Try creating a new user and testing that 
and changing the name of a user that is working properly.



Christopher Fisk


Re: [H] Windows 7 environment variables

2010-03-04 Thread Eli Allen
The username comes from what is entered when you login not the actual  
username


Sent from my iPhone

On Mar 4, 2010, at 3:29 PM, Thane Sherrington th...@computerconnectionltd.com 
 wrote:


I have a little batch file that uses %username% to do some stuff.   
That works fine in Windows XP and Vista, but in 7, it becomes  
username-PC$ - so if the username is Fred, %username% is Fred in XP  
and Fred-PC$ in 7.  Of course, that breaks the batch file.  Am I  
doing something wrong or did MS really change this?


T




Re: [H] Windows 7 environment variables

2010-03-04 Thread JRS
When you run set from the command prompt, what does it show as the user?

 -- 
JRS 
stei...@pacbell.net


Facts do not cease to exist just
because they are ignored.



- Original Message 
 From: Thane Sherrington th...@computerconnectionltd.com
 To: hardware@hardwaregroup.com
 Sent: Thu, March 4, 2010 12:42:50 PM
 Subject: Re: [H] Windows 7 environment variables
 
 At 04:29 PM 3/4/2010, Thane Sherrington wrote:
  I have a little batch file that uses %username% to do some stuff.  That 
  works 
 fine in Windows XP and Vista, but in 7, it becomes username-PC$ - so if the 
 username is Fred, %username% is Fred in XP and Fred-PC$ in 7.  Of course, 
 that 
 breaks the batch file.  Am I doing something wrong or did MS really change 
 this?
 
 Interesting.  Just checked on another 7 machine (this one 7 Ultimate instead 
 of 
 7 Home Premium) and it shows the variable normally.  Now I'm really confused.
 
 T 



Re: [H] Windows 7 environment variables

2010-03-04 Thread maccrawj

echo %username% results in the typical XP/2K/etc... expected output here 
under 7.

On 3/4/2010 12:29 PM, Thane Sherrington wrote:

I have a little batch file that uses %username% to do some stuff.  That
works fine in Windows XP and Vista, but in 7, it becomes username-PC$ -
so if the username is Fred, %username% is Fred in XP and Fred-PC$ in 7.
Of course, that breaks the batch file. Am I doing something wrong or did
MS really change this?

T