Resolving MP377 Network File Access Errors to Windows Server

David Krause12 min read
HMI / SCADASiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

1. Problem Statement and Symptoms

A Siemens SIMATIC HMI panel MP377 (12" or 15" Comfort Panel variants, e.g. 6AV6 644-0AB01-2AX0) is being used to execute a VBScript on the device that opens a remote file path on a Windows file server. The script fragment is:

Set f = CreateObject("FileCtl.File")
f.Open "\\\\servername.domain.dom\\path", 8

The runtime returns:

Symptom Value / Message Hex / Decimal
VBScript err.number -2147024843 0x80070035 / 53 (ERROR_BAD_NETPATH)
VBScript err.description "The network path was not found." Win32 system error 53
net use * \\server\share /user:domain\user "is an invalid remote name" Status 87 (ERROR_INVALID_PARAMETER)
Control Panel > NetworkID entry Configured but no effect Auth bypasses OK, redirect fails
ICMP ping servername.domain.dom Reply from server IP IP routing works

From a Windows PC on the same physical switch the same UNC path opens after a credential prompt, which proves the share exists, the ACLs are valid, and DNS resolves the name. The failure is therefore specific to the WinCE-based panel's network stack, not the server.

Critical: The error 0x80070035 (53) is raised before any authentication handshake completes. It is a name-resolution / path-resolution failure, not an access-denied error (0x80070005 / 5). Do not chase NTFS permissions until the path resolves.

2. Root Cause: Windows CE Network Stack Limitations

The MP377 family runs Windows CE 5.0 / 6.0 depending on firmware generation (image Boot Loader V12.x and above for CE 6.0 panels). The WinCE network architecture has three constraints that together explain every observed symptom:

  1. SMB 1.0 / CIFS only. The Microsoft SMB client shipped with WinCE 5/6 only speaks SMB 1.0. Any Windows server that has SMB1 disabled (the default since Windows 10 1709 and Windows Server 2019) will reject the session with no negotiated dialect, producing ERROR_BAD_NETPATH on the client side.
  2. NetBIOS over TCP/IP is bound, not routable. WinCE's name-resolution order is NBNS (NetBIOS Name Service) first, then DNS. NBNS broadcasts do not cross a Layer-3 boundary. If the panel and the server sit on different subnets separated by a router, NBNS resolution silently fails and the UNC parser returns error 53 even when ICMP ping by FQDN succeeds (because ping uses the DNS resolver directly).
  3. VBScript on CE uses the compact runtime. FileCtl.File is a CE-specific COM object (CLSID {7BA88C8B-...}, documented in the WinCE SDK) that wraps CreateFile. It does not use the Win32 Network Provider API chain the way a Windows PC's WScript.CreateObject("Scripting.FileSystemObject") does. There is no in-band credential prompt and no DCERP referral hop.

3. MP377 Network Configuration Procedure

Configure the panel's transport so that name resolution and authentication match what the server expects. Open Control Panel > Network and Dial-up Connections on the panel (Start > Settings > Control Panel > Network).

  1. Double-tap DM9CE1 (or the LAN adapter shown as NE2000 Compatible for older MP377 12" variants, RTL8139 for the 15").
  2. On the IP Address tab set a static address (recommended for production) or enable DHCP. Confirm the gateway and subnet mask point at the router interface that reaches the server VLAN.
  3. On the Name Servers tab enter the Active Directory-integrated DNS server IP. Disable WINS / NBNS if the server is in a routed subnet. If NBNS cannot be disabled, point it at a WINS server that is reachable across the router.
  4. On the Identification tab enter the workgroup name matching the server's (default WORKGROUP or the AD domain short name). This populates the NetBIOS scope the panel advertises.
  5. Tap OK and reboot the panel when prompted. Confirm with ipconfig /all from a Telnet session (enable Telnet in Control Panel > System > Services) that the adapter shows the new DNS suffix and gateway.

On the Windows server side, open Computer Management > System Tools > Local Users and Groups and create a local user that mirrors the panel's NetworkID entry, with the same password. The MP377 cannot join an Active Directory domain and uses NTLMv2 only, so the share must be hosted on a workgroup member or on a server with the local user provisioned.

4. FileCtl.File Object Reference

The FileCtl.File object exposes a stripped-down file API. For network file writes the relevant members are:

Method Signature Behavior
Open Open(path, mode [, access] [, share] [, recordlen]) Mode 8 = output (write, binary). Mode 1 = input (read). On WinCE path can be a UNC string; the call resolves through the redirector.
LinePrint LinePrint [#]filenumber, string Writes a line terminated with vbCrLf.
Print Print [#]filenumber, value Writes raw string.
Close Close Flushes and closes the handle. Always call in an error path.
Kill Kill path Deletes a file.
EOF EOF(filenumber) End-of-file flag for reads.

A working template for the MP377, assuming the UNC path resolves and SMB1 is enabled on the server, is:

Dim f, line
Set f = CreateObject("FileCtl.File")
On Error Resume Next
f.Open "\\\\servername.domain.dom\\share\\data.txt", 8
If Err.Number <> 0 Then
  HMIRuntime.Trace "Open failed: " & Err.Number & " " & Err.Description & vbCrLf
  Exit Sub
End If
On Error Goto 0
f.LinePrint f, Now & "," & SmartTags("Tag_Recipe")
f.Close
Set f = Nothing

Wrap every network call with On Error Resume Next and trace the err.number into HMIRuntime.Trace (visible in the MP377 Service Tools log) so that intermittent SMB session loss does not crash the HMI runtime.

5. SMB Protocol Compatibility Matrix

Server OS SMB1 default SMB2/SMB3 default MP377 WinCE 5/6 result
Windows Server 2003 R2 Enabled Optional Works
Windows Server 2008 R2 Enabled Enabled Works (negotiates to SMB1 if server allows)
Windows Server 2012 R2 Enabled Enabled Works (negotiates to SMB1 if server allows)
Windows Server 2016 Disabled by default (1709+) Enabled Fails with error 53 unless SMB1 explicitly re-enabled
Windows Server 2019 / 2022 Disabled Enabled Fails with error 53
Windows 10 / 11 (share host) Disabled by default Enabled Fails with error 53

To confirm whether the failure is dialect-mismatch, run on the server:

Get-SmbServerConfiguration | Select EnableSMB1Protocol, EnableSMB2Protocol

If EnableSMB1Protocol is False, the MP377 cannot reach it via UNC. The cleanest long-term fix is to migrate the panel to a WinCC Unified Comfort Panel (MTP/MTP Unified) that ships with a modern SMB2 stack. For brownfield MP377 installs, re-enable SMB1 on the server temporarily only as a diagnostic step; in production use one of the alternatives in Section 8.

Security warning: SMB1 is vulnerable to EternalBlue / WannaCry-class exploits. Re-enable it only on isolated network segments or in front of a firewall that blocks port 445 from any untrusted source.

6. Router and Cross-Subnet Considerations

When the panel and the server sit on different IP subnets, four things must be true for \\servername.domain.dom\share to resolve:

  1. DNS resolution across the router. The router must forward UDP/53 (or TCP/53 for large replies) to the DNS server in the server's subnet. The panel's ping test uses DNS, so a green ping is necessary but not sufficient.
  2. TCP/445 (SMB) routed. Many corporate firewalls block TCP/445 by default. Test with Test-NetConnection servername -Port 445 from a Windows PC. If the panel cannot reach 445, no SMB traffic will flow and the redirector reports 53 immediately.
  3. NBNS scoped or disabled. NetBIOS name queries are broadcasts and do not traverse routers. If the panel's resolver still has NBNS at the top of its order, the name appears to fail even though DNS would have worked. On WinCE 6.0 the registry key HKEY_LOCAL_MACHINE\Comm\Tcpip\Hosts\<adapter>\DNS lets you reorder; on CE 5.0 use the Control Panel > Name Servers dialog to clear WINS entries.
  4. SMB signing policy. If the server enforces SMB signing, the WinCE 1.0 client cannot meet the NTLMv2 signing requirement. Disable signing on the share path or whitelist the panel's IP in a Group Policy exception.

7. Resolving the net use Status 87 Error

The CE shell net use is a stripped-down clone of the Win32 utility and does not accept every flag. The syntax that produced status 87 was:

net use * \\server.domain.dom\path password /user:domain\username

Status 87 is ERROR_INVALID_PARAMETER; the parser fails on the order of arguments. The CE shell expects /USER to be the first flag, then the credentials, then the device. The correct invocation is:

net use \\server.domain.dom\path /USER:domain\username password

Or, if the panel is in a workgroup and the share is hosted on a Windows PC:

net use \\server.domain.dom\path /USER:username password

Notes specific to CE:

  • The * device-letter placeholder is not supported; specify a drive letter (Z:) or omit it for a connection without a letter.
  • The /persistent:yes flag does not exist on CE; mappings are not persistent across reboots anyway.
  • If the share path contains a space, the entire UNC must be wrapped in double quotes: net use "\\server.domain.dom\my share" /USER:user pw.

A successful mapping returns The command completed successfully. and the UNC is reachable as a drive. After this the FileCtl.File.Open call will succeed provided the SMB version matches.

8. Alternative File Transfer Methods

If re-enabling SMB1 is not acceptable, three vendor-supported alternatives preserve the original intent of writing a file from the HMI to a server:

8.1 FTP server on the Windows host

Install IIS FTP on the Windows server and write to a known path using WinInet from the panel. The MP377 includes the WinInet CE stack, so:

Dim inet, f
Set inet = CreateObject("InetCtl.Inet.1")
inet.Protocol = 4            ' icFTP
inet.URL = "ftp://server.domain.dom/upload/data.csv"
inet.UserName = "ftpuser"
inet.Password = "ftppw"
inet.RequestTimeOut = 30
inet.Execute "PUT", "localfile.csv"
inet.WaitForResponse 30

FTP traverses routers and proxies cleanly, has no SMB1 dependency, and is auditable on the server side. Use FTPS over TLS if the network is not isolated.

8.2 Sm@rtServer / Web server retrieval

Siemens Sm@rtServer (the option baked into WinCC flexible 2008 / TIA Portal) can expose the panel's file system to a browser. Write the file to a local SD card or USB stick on the panel, then have the operations user download it through the Sm@rtServer web page. This is the workaround the field community converged on for WinCE limitations and is the path with the fewest surprises on a greenfield install.

8.3 OPC UA / script-tag export over the control network

For structured data, the MP377 can publish tag values to an OPC UA server on the Windows host (e.g. the Siemens OPC UA server module or Kepware). The data lands in a SQL or historian table rather than a flat file, but it eliminates the SMB1 dependency entirely. Use this when the downstream consumer is analytics, not a flat CSV.

8.4 Server-side file pickup via Storage Migration Service context

If the goal is consolidation of CSV drops from many panels, design the Windows host as a target for a one-way pickup: the panel writes to a local share on a workgroup Windows bridge box that does run a modern OS, and the bridge replicates the directory tree up to the enterprise file server using Storage Migration Service or DFS-R. The MP377 only ever talks to the bridge over SMB1 in an isolated VLAN; nothing past the bridge needs legacy dialects.

9. Verification and Diagnostic Tests

After applying the configuration, validate in this order:

  1. DNS resolves the FQDN. From a Telnet session on the panel, run ping -n 2 servername.domain.dom. The reply must come from the server's IP. If it does, DNS is functional.
  2. TCP/445 is reachable. From a Windows PC, run Test-NetConnection servername.domain.dom -Port 445. Then from the panel, run telnet servername.domain.dom 445; a blank screen is success.
  3. SMB1 is enabled on the server. Get-SmbServerConfiguration | fl enablesmb1 must return True.
  4. Credential maps. Run the corrected net use command from Section 7. Look for The command completed successfully.
  5. VBScript test. Execute the FileCtl.File.Open block and tail HMIRuntime.Trace for err.number = 0.
  6. Server-side log. On the server, enable SMB server auditing and confirm the connection in Event Viewer > Applications and Services Logs > Microsoft > Windows > SMBServer. The client name will show as the panel's hostname.

10. Troubleshooting Matrix

Observed error Hex / Decimal Likely cause Fix
"The network path was not found." 0x80070035 / 53 SMB1 disabled on server, or port 445 blocked Re-enable SMB1 server-side, open TCP/445, or switch to FTP
"The network name cannot be found." 0x80070043 / 67 NBNS failed across router Force DNS-only resolution, set DNS suffix on adapter
"Access is denied." 0x80070005 / 5 Credentials not sent, or share ACL wrong Match local user on server, verify NetworkID
net use status 87 ERROR_INVALID_PARAMETER Argument order wrong on CE shell Use net use \\path /USER:user pw form
net use status 1326 ERROR_LOGON_FAILURE Password or workgroup mismatch Create matching local user, set same NetworkID workgroup
Script hangs in Open n/a DNS resolves but 445 filtered Open TCP/445 on the firewall in the path
Long-term recommendation: Plan the migration of any MP377 panel to a SIMATIC HMI Unified Comfort Panel (MTP1500 / MTP1900 / MTP2200) running Linux-based firmware. Unified panels ship with a modern SMB2/3 client, full VBScript compatibility, native OPC UA, and no router-imposed NetBIOS restrictions. The migration cost is the panel hardware and a project re-compile in TIA Portal; the runtime is otherwise compatible.

FAQ

What does err.number -2147024843 mean on a Siemens MP377 VBScript?

It is Win32 error 53 (ERROR_BAD_NETPATH, hex 0x80070035) raised by the CE redirector because the UNC path could not be resolved to a reachable SMB endpoint. On modern Windows servers the most common cause is SMB1 being disabled while the MP377 only speaks SMB1.

Why does net use return status 87 with /user:domain\username password?

The CE shell's net use parser expects the /USER: flag before the credential, not after the path. The corrected form is net use \\server\share /USER:domain\username password. The device-letter * placeholder is not supported on CE.

Can an MP377 access a UNC share on a different subnet?

Yes, provided TCP/445 is routed, DNS is reachable, and the server still accepts SMB1. NetBIOS name queries (NBNS) are broadcasts and will not cross a router, so DNS must be the primary resolver and the panel's WINS server entry must be cleared or point to a reachable WINS server.

Is there a way to write files to a Windows server from MP377 without SMB1?

Yes. The most common production alternatives are (a) FTP/FTPS to IIS on the server using the panel's InetCtl.Inet.1 object, (b) Sm@rtServer with a local SD/USB staging file that operations retrieves via web, and (c) OPC UA tag publication that the server stores in a database.

What firmware version on the MP377 supports SMB1 and modern DNS resolution?

MP377 panels ship with Windows CE 5.0 (early variants) or CE 6.0 (Boot Loader V12.x and above). Both ship with the WinCE SMB 1.0 client. There is no Siemens-released firmware upgrade that adds SMB2/3 to the MP377; the hardware CE image is fixed. Plan a hardware migration to a Unified Comfort Panel for modern SMB support.

Back to blog