Jump to content

Something change in the last windows XP update


Recommended Posts

Guest francoisbrochu@yahoo.com
Posted

as part of my logonscript I like to change some of the setting for

user so I use a batch file like this test.bat:

 

if NOT "%USERNAME%" == "Administrator" (

set windozPref=hello

echo %windozPref% world

)

 

 

1- run test.bat

you expect "hello world" to be echoed, but no it echo world

2- run set

you will see windozPref=hello

3- run test.bat

one more time it will echo "hello world"

4- run set windozPref=

set will reveal it's unset

5- for fun add this line to test.bat "set windozPref=foo" before the

IF statment

test.bat now look like this

 

set windozPref=foo

if NOT "%USERNAME%" == "Administrator" (

set windozPref=hello

echo %windozPref% world

)

 

 

6- run test.bat

it will echo "foo world"

7- run it again it still echo "foo world"

run set, look "windozPref=hello"

 

I really don't know why this behavoiur change in the last month, it

work just fine last month

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...