I'm attempting to configure an SMB file sharing server on a Windows CE 6 device.
My initial attempts have mostly been with the desktop version of NK.exe. When I start, SMB0: is running as smbserver.dll
I've set (hopefully) suitable registry values, and then re-started the SMBServer process:
services refresh SMB0:
However, I never see the service advertised when I attempt to attach an SMB client (for example, by looking for file shares in desktop windows, or attempting to connect an SMB client to the IP address of the WinCE device.
I wonder if it's necessary for the SMB registry settings to be available at boot time? My devices is NOT using a hive-based registry, so the registry settings aren't available a boot time. I'd hoped that refreshing the SMB server process would be enough to get file sharing going. That way, I can just set the registry values programatically in my application program, restart the SMB service, and not have to rebuild the kiosk NK.exe (the kiosk NK.exe seems to include the smbserver.dll - it was built by a not very competent third party, and the tools to rebuild it go back to Visual Studio 2005. It would be "interesting" to rebuild NK.exe).
Do I need to rebuild the OS to use a hive-based registry?
Any ideas?
My registry settings are all under HKEY_LOCAL_MACHINE:
Ident\Name "aName"
Ident\Desc, "A string"
Ident\OrigName "Another string"
\Services\Smbserver\SMB\Shares\VirtualRoot\Type Dword:0
\Services\Smbserver\SMB\Shares\VirtualRoot\Path "a valid path"
\Services\Smbserver\SMB\Shares\VirtualRoot\UserList "*"
\Services\Smbserver\AdapterList "*"
\Services\Smbserver\Keep DWord:0
\Services\Smbserver\Prefix "SMB"
\Services\Smbserver\Index DWord: 0
\Services\Smbserver\SHARES\UseAuthentication DWord:0L
As you can see, I've temporarily turned authentication off - I'm hoping to start by getting this to work in the CE desktop environment, and then add authentication, and getting it to work in the kiosk environment.
I'd be grateful for any help!
The Microsoft File Sharing software that is part of Windows uses a SMB/CIFS protocol.
Microsoft Windows operating systems (OSes) since Windows 95 have included client and server SMB protocol support. The Linux OS and macOS also provide built-in support for SMB.
I would say you need to set "Keep"=dword:1
as per the MSDN docs:
Keep Default set to 1. If this is set to zero (0), the DLL will be unloaded immediately after initialization.
The SMB server does not require a hive-based registry. We've used it on multiple projects with only a RAM-based registy.
For reference, these are the registry settings we use on CE 7 to expose the root folder as \\<IP address>\Root
:
[HKEY_LOCAL_MACHINE\Services\SMBServer\Shares\Root]
"Path"=""
"Type"=dword:0
[HKEY_LOCAL_MACHINE\Services\SMBServer]
"AdapterList"="*"
"Keep"=dword:1
"Prefix"="SMB"
"Index"=dword:0
"DLL"="smbserver.dll"
"Order"=dword:12
[HKEY_LOCAL_MACHINE\Services\Smbserver\Shares]
"UseAuthentication"=dword:0
"NoSecurity"=dword:1
There's another issue at play here, which is that the Windows CE 6 SMB server default to using NTLM ver 1. Windows 7 and above, by default, require NTLM version 2.
In order for your Windows 7+ system to see the SMB share, it's necessary to modify the security policy:
On Windows 7, run secpol.msc, find Security Settings -> Local Policies -> Security Options. Look for LAN Manager Authentication Level, and set it to 'Send NTLM response only’
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With