3 replies
by kinetechs
Sure. In your script, create a section for Win 98SE. Here's a snipet from one I have. Use the VER command to see what the string for Win 98SE is and replace the section below with that string. This will run the VER command on the PC and check the output against the text below. When it finds a match, it'll go to that section of the batch file.
:OSVER
VER|FIND "5.2">NUL
IF NOT ERRORLEVEL 1 GOTO WinS2k3
VER|FIND "XP">NUL
IF NOT ERRORLEVEL 1 GOTO WinXP
VER|FIND "2000">NUL
IF NOT ERRORLEVEL 1 GOTO Win2k
VER|FIND "NT">NUL
IF NOT ERRORLEVEL 1 GOTO WinNT4
VER|FIND "Mil">NUL
IF NOT ERRORLEVEL 1 GOTO WinME
VER|FIND "98">NUL
IF NOT ERRORLEVEL 1 GOTO Win98
VER|FIND "95">NUL
IF NOT ERRORLEVEL 1 GOTO Win95
GOTO END
:WinS2k3
command to run
GOTO END
:WinXP
command to run
GOTO END
:Win2k
command to run
GOTO END
:WinNT4
command to run
GOTO END
:WinME
command to run
GOTO END
:END
by chrissaw
There is also another solution that I always use.
I utilize KixStart and here an example of what you need.
IF "@DOS"= "4.0"
; NT4 does not support mapping a drive to a
folder of a share. Use SUBST instead.
RUN "CMD /C SUBST U: " + $varUserDir
ENDIF
IF "@DOS"= "5.0"
; Windows 2000 supports mapping a drive to a
folder of a share
USE U: $varUserDir
ENDIF
IF "@DOS"= "5.1"
; Windows XP Pro supports mapping a drive to a
folder of a share
USE U: $varUserDir
ENDIF
IF "@INWIN"= "2"
; Windows 9x (1=NT/2000, 2=Win9x)
; SUBST on a network drive does not work under
Win9x.
; The user's personal directory MUST be shared
for the next command to work.
; The share must be hidden (With a $ at the
end)
USE U: $varUserServer + "\@userid$"
ENDIF
Hope it help
Christian
by eltaweel2000
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending