![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-15 13:29 |
47,812 topics / 349,917 posts / today 0 new / 48,268 members |
| DOS批处理 & 脚本技术(批处理室) » (Resolved) How to determine whether the system is 95/98 or 2000/XP through batch processing |
| Printable Version 2,250 / 3 |
| Floor1 willsort | Posted 2005-09-14 16:59 |
| 元老会员 Posts 1,512 Credits 4,432 | |
|
Re xjhlhb:
"Please start a new thread for new questions", which is beneficial for management and browsing, and also allows more people to see the question and give their own answers. There are many ways to determine the system type. The simplest is to use the variable %OS%, which has a value of Windows_NT under NT series, otherwise it is empty. [ Last edited by willsort on 2005-9-16 at 09:53 ] |
|
| Floor2 xjhlhb | Posted 2005-09-14 21:25 |
| 高级用户 Posts 210 Credits 736 From 中國 | |
|
Thanks to the team for your instruction!!! What about in the WIN95/98 system? I wonder if there is a %OS% system variable????
|
|
| Floor3 Wengier | Posted 2005-09-15 22:19 |
| 系统支持 Posts 10,521 Credits 27,736 | |
|
Under Win9x, there is usually no %OS% system variable, while under WinNT series, its value is all Windows_NT, so it can be simply judged.
|
|
| Floor4 dejoy | Posted 2008-11-15 11:55 |
| 初级用户 Posts 64 Credits 76 | |
|
```
if NOT {%OS%} == {} goto winnt :win98 ::Code for win98 goto ENDOSDECTED :winnt ::Code for winnt :ENDOSDECTED ``` |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |