Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Making a batch file check what os

Featured Replies

Hey guys i found a post for this but it was for WPI but what i need is the code required to only start the progam if the windows version is 5.2

Something like this:

@echo off

ver | find "Version 5.2"
if errorlevel 1 goto NotVer52
echo Version 5.2
goto end

:NotVer52
echo Not Version 5.2
goto end

:end

  • 3 years later...

Just wanted to post and say thanks for this tip. I knew that 'ver' displayed that information but didn't know how to parse it.

Here is what I am using to differentiate between XP and Vista.

@echo off

ver | find "Version 5.1"
if errorlevel 1 goto NotXP
echo XP
goto end

:NotXP
ver | find "Version 6.0"
if errorlevel 1 goto end
echo Vista
goto end

:end

Thanks again

You can use this :

if exist %SystemDrive%\bootmgr start "" setup.exe

For me,I use that code, it's check uac too ...

if exist %SystemDrive%\bootmgr fsutil | find "administrateur"
if exist %SystemDrive%\bootmgr if "%errorlevel%"=="0" echo UAC ON&&pause&&exit else echo UAC OFF&&start "" setup.exe

Edited by Sonic

Hey guys i found a post for this but it was for WPI but what i need is the code required to only start the progam if the windows version is 5.2

We really need more information than this, because the way I see it is that if you're creating an unattended disk, you should already know what OS you're installing!

ver | find "Version 5.2"
ver | find "Version 5.1"

This will actually only return the version of the Command Interpreter not the Operating System. Although this is likely to be the same, it is not always true.

if exist %SystemDrive%\bootmgr

Unfortunately if the OS is part of a Dual Boot system with Vista and XP for instance, the bootmgr directory may exist in the root of the XP system drive thus giving a false case.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.