Troubleshooting Code 800704B2 – An attempt was made to remember a device that had previously been remembered Introduction to Code error 800704B2 This error code, 800704B2 occurs when you try to map a network drive with a VBScript. A wild guess, you are probably using WSH (Windows Script Host) methods called MapNetworkDrive and EnumNetworkDrives. The Symptoms You Get with Error 800704B2The probable scenario is that you are trying to enumerate network drives in a Windows logon script. However, a Windows Script Host message box appears and the script does not map the drive as you expected. The cause of ‘An attempt was made to remember a device that had previously been remembered’ is a limitation of the EnumNetworkDrives method. The route cause is a bug whereby this method scans only for connections with a status of "CONNECTED". Thus the solutions are cunning work-arounds to overcome this inbuilt limitation. The Solutions for Code 800704B2One suggestion is to put a RemoveNetworkDrive statement immediately before my MapNetworkDrive method. J.B. Reminded me that RemoveNetworkDrive takes two true parameters, so try: RemoveNetworkDrive x, true, true. See more on remove network drive here. My second suggestion was actually sent in by RS – see here Example Script of error 800704B2‘ VBScript. ‘ By Guy Thomas ‘ Purpose of script to map a network drive to H:\ Dim oNet Set oNet = CreateObject("Wscript.Network") oNet.MapNetworkDrive "K:", "\\Alan\Lazer6" Dim oNet ‘ Note Lazer6 exists Set oNet = CreateObject("Wscript.Network") oNet.MapNetworkDrive "H:", "\\ServerName\home" Kiwi Syslog Server Syslog’s success and universal adoption is based on simplicity, it’s just not fussy about what sort of event log messages it carries. As a result syslog has become the de-facto standard for system management and event reporting in heterogeneous networks. See more about the free Kiwi Syslog Server network utility Dim WshNetwork, Letter Set WshNetwork = WScript.CreateObject("WScript.Network") Letter = "X:" ‘ this triggers the bug if the drive "Letter" is not available (with a red "X" in My Computer): WshNetwork.RemoveNetworkDrive Letter, True, True ‘ the workaround Dim AllDrives, i, WshShell, Command Set AllDrives = WshNetwork.EnumNetworkDrive() For i = 0 To AllDrives.Count If AllDrives.Item(i) = Left(Letter, 1) Then Set WshShell = WScript.CreateObject("WScript.Shell") Command = "net use " & Letter & " /delete /yes" WshShell.Run(Command), 7, True ‘ minimised, wait until completion Set WshShell = nothing End If Next Here is further discussion of the problem in Microsoft’s KB article about Error 800704B2. [Kindly sent in by Oscar Fowler]. Guy Recommends: WMI Monitor and It’s Free!
Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft operating systems. Fortunately, SolarWinds have created the WMI Monitor so that you can examine these gems of performance information for free. Take the guess work out of which WMI counters to use for applications like Microsoft Active Directory, SQL or Exchange Server. Download your free copy of WMI Monitor
Do you need additional help? Give something back? Would you like to help others? If you have a good example of this error, then please email me, I will publish it with a credit to you:
If you like this page then please share it with your friends About The Author

ComputerPerfomance.co.uk uses cookies. More info.
|