Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Developing in VFP - Working with a NAS (SMB1) on Windows 11 1

Status
Not open for further replies.

GriffMG

Programmer
Mar 4, 2002
6,333
FR
Forgive the slight digression here, but I don't imagine I am the only one who uses a NAS box
to back-up my hard drive on my development laptop.

Since my machine was updated to Windows 11, I have struggled periodically to access the
shares on the NAS box, because it is not very new and only supports SMB 1.0. It can't be updated
apparently and I don't want to throw it out yet - it's very good, robust and was expensive!

This is a PITA, rather like the way W11 (and previous versions) decide when my machine should be
rebooted for a windows update - even if I am in the middle of something.

To get access back is not difficult, you just go to windows features and reenable SMB 1.0/CIFS Client
and DISABLE the Automatic Removal tool... until blessed windows puts it back (including reinstating the
automatic removal tool).

To stop this happening, until I am ready, I now schedule a task every 21 minutes past the hour that
runs a batch file as administrator containing the following code:

Code:
@echo off
SC stop wuauserv
sc config wuauserv start= disabled
DISM /Online /Enable-Feature /All /FeatureName:SMB1Protocol
dism /online /disable-feature /featurename:SMB1Protocol-Deprecation
timeout /t 300

The two SC commands stop the updates
DISM commands turn SMB1 back on and disable the Automatic removal - notice how M$ kinda hid it using a name for the feature that doesn't
site with the others in the features list for DISM? B-)

The timeout is not essential, it just reminds me that it is doing the job, and that an update needs to be done!


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0
 
Great video, does most of what my code does, except it is out of date, W11 now disables
the SMB 1.0/CIFS all on it's own 'from time to time' and even if you disable the disabling tool
(Automatic Removal) it puts it right back and disables the SMB 1.0 all over again.

I see no pattern to when it does this, maybe on restarts?, but the task scheduler seems to defeat it
pretty well - and if I'm working it doesn't interfere too much, and I can see when it has needed to run.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top