I don't have Vista home on a machine nearby, but on Vista Business (and
probably Ultimate and Enterprise), there are 2 variables - USERDOMAIN and
USERDNSDOMAIN. So, using the info I orginally posted, and assuming you were
on a domain, you could do something like...
if %userdomain%==mydomain goto vistabiz
or even...
if "%userdomain%"=="" goto nodomain
::do vista business stuff here...
::
goto fin
:nodomain
::system not on domain, so assume vista home
::
:fin
One thing you can do to see what environment variables to use would be to
open a command prompt and type in SET and hit enter. If you have a Vista
Home machine near you, compare the variables to see what is on the Vista
Home machine that might not be on the Business machine, or vice versa, and
then use that variable in your script.
Also, you could talk to whomever is resonsible for imaging and deploying
machines in your location and ask them to set the machines up with a global
environment variable via the default user registry, but I think you'd be
better off looking at the existing environment variables.
Again, hope this helps.
Doug
"Dave" <> wrote in message
news

4B7C136-F21F-40E6-A9C0-...
> Thanks Youyang, I'll keep this one in mind also.
>
> We might be pushing our luck here, but does anyone have an idea on how to
> determine the "flavor" of Windows Vista? We probably don't want to run
> the
> same commands for our users who have Vista Home vs. Business/Ultimate.
>
> -Dave
>
> "youyang" wrote:
>
>> Hi, here is the code I used in my batch File:
>>
>> ECHO *Detecting Windows Version...
>>
>> VER | findstr /i "5.1.2600" > nul
>> IF %ERRORLEVEL% EQU 0 GOTO XP
>>
>>
>> VER | findstr /i "5.2.3790" > nul
>> IF %ERRORLEVEL% EQU 0 GOTO 2003
>>
>> VER | findstr /i "6.0.6000" > nul
>> IF %ERRORLEVEL% EQU 0 GOTO VISTARTM
>>
>> :XP
>> ECHO *Windows XP
>> REM TODO
>> GOTO EOF
>>
>> :2003
>> ECHO *Windows Server 2003
>> REM TODO
>> GOTO EOF
>>
>> :VISTARTM
>> ECHO *Windows Vista RTM
>>
>>
>> --
>> Thanks
>> ?
>> ????????????
>> "Dave" <> wrote in message
>> news
AC8245A-41B5-460E-8C1E-...
>> > How can we detect for Windows Vista in our Logon Script? Previously we
>> > could
>> > use OSVER.exe or even a 3rd party app OSVER61.exe to detect all
>> > versions
>> > of
>> > windows through Server 2003. When OSVER is run on Vista it returns
>> > nothing,
>> > not even unknown, just nothing. Is there a way to detect if a user is
>> > running Vista or not? Maybe a newer version of OSVER, or another
>> > command
>> > that we can run in a batch file? TIA
>>
>>