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.

Check for OS Version in a script

Featured Replies

  • Author

Hi gunsmokingman,

again, thanks a lot ! How come you know all those commands ? Is there a magic book where you look these things up or do you simply know them ? :thumbup

Bye and have a nice day !

Alex


It's simply Visual Basic. Learn it ;)

  • 9 months later...
  • Author

Hi Yzöwl,

I have been using your code successfully for months now:

for /f "delims=" %%? in ('net config work^|findstr/i "\<soft"') do call :OSis %%?

if %WinOS% == Vista goto :Vista
if %WinOS% == XP goto :XP

:OSis
echo/%*|find "2000">nul 2>&1&&(set "WinOS=XP"&goto :eof)
echo/%*|find "2002">nul 2>&1&&(set "WinOS=XP"&goto :eof)
echo/%*|find "2003">nul 2>&1&&(set "WinOS=XP"&goto :eof)
echo/%*|find "Vista">nul 2>&1&&(set "WinOS=Vista"&goto :eof)
echo/%*|find "2008">nul 2>&1&&(set "WinOS=Vista"&goto :eof)

Thanks again for it ! :-)

However, recently I am having a problem with this code on WinXP SP3 during runonceex. Seemingly out of nowhere the cmd stops right after this command:

for /f "delims=" %%? in ('net config work^|findstr/i "\<soft"') do call :OSis %%?

This does not happen on all the scripts where this code is present, just one. The strange thing is, if I press the ENTER key, it continues to run normally, no error appears, nothing. But it just stops there forever if noone presses a key.

Do you maybe have an explanation for it or a way around it ?

Thanks in advance,

Alex

Edited by midiboy

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.