How To Avoid SBS setup script to only run on XP clients when Windows 10 clients login

I am still running SBS 2003 with a combination of XP, windows 7 and windows 10 clients.  I only want the client setup.exe to run on XP or earlier clients when running the SBS_LOGIN_SCRIPT.

The original SBS_LOGIN_SCRIPT was:
\\IDSSERVER\Clients\Setup\setup.exe /s IDSSERVER
net use l: /delete /yes
net use l: \\idsserver\ids-temp-server

When I added Windows 7 clients, I modified it to be:

for /f "tokens=4-7 delims=[.] " %%i in ('ver') do (
if %%i == Version set OSVersion=%%j.%%k
if %%i neq Version set OSVersion=%%i.%%j
)
Rem Run Client Setup command if running XP 32-bit or lower
if  %OSVersion% leq 5.1 (
\\IDSSERVER\Clients\Setup\setup.exe /s IDSSERVER
)
net use l: /delete /yes
net use l: \\idsserver\ids-temp-server


I added my first Windows 10 client and thought that the Windows 7 script change would automatically work and setup.exe would not be executed.  However, when I login with windows 10 I am asked "Do you want to allow this app to make changes to your device - Windows SBS 2003?"  To which I click NO.

When I run the following script, the Windows version is displayed as 10.0:

for /f "tokens=4-7 delims=[.] " %%i in ('ver') do (
if %%i == Version set OSVersion=%%j.%%k
if %%i neq Version set OSVersion=%%i.%%j
)
echo %OSVersion%
pause

What am I doing wrong?
BlairBrennerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JohnBusiness Consultant (Owner)Commented:
Best thing is to not run this script at all. No real need.

Then get rid of XP machines right away followed by Server 2003.

These are all serious security threats
0
Rob WilliamsCommented:
The catch is, here and in some group policies is Windows interprets the version number 10   as 1 & 0. not 10 so <7 includes 1, i.e. Win 10
0
JohnBusiness Consultant (Owner)Commented:
Way, way back in the time of XP and Server 2003, the script was not necessary, so just do not run it while you are planning your transition away from here.

Remember that Server 2003 and XP depend upon SMBv1 and that has all disappeared from Windows 7 and later and Server 2008 and later.
1
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Rob WilliamsCommented:
This link outlines the issue to which I was referencing.  It is not your exact problem, it is referring to group policy and a newer version of SBS but I believe the way that your script is interpreting the version # is the same.
http://www.thirdtier.net/introducing-windows-10-into-your-sbs-2011-standard-network/


I agree with John the script did very little if anything and will do nothing on win 10 machines.


Bigger problem to address is updating.  No support, security risks, 15 year old drives, not virtual so can only be restored to the same hardware....
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cliff GaliherCommented:
Yep. I read 2003 and XP and *almost* hit delete. But decided to read for the funs. And have to chime in and back these guys up. Running 2003 and XP in this day and age is unacceptable. Full stop.
0
JohnBusiness Consultant (Owner)Commented:
There are an amazing number of members in here still pedaling along with Server 2003 and XP, entirely oblivious to the security threats.
0
Rob WilliamsCommented:
I had a call from another IT guy recently regarding server 2000.  :-(
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SBS

From novice to tech pro — start learning today.