Error: “The procedure entry point UnmapAndCloseFile could not be located in the dynamic link library SETUPAPI.dll” when attempting to run RIPrep.exe on Windows XP or Windows Server 2003

System Requirements:

  • Windows XP Professional, SP2, SP3
  • Windows Server 2003 SP1, SP2

The Problem:

When you attempt to run the Remote Installation Service (RIS) image preparation tool (RiPrep.exe) on a Windows XP or Windows Server 2003 system with the latest service pack you receive the following error message.

riprep.exe – Entry Point Not Found
The procedure entry point UnmapAndCloseFile could not be located in the dynamic link library SETUPAPI.dll

Error: "The procedure entry point UnmapAndCloseFile could not be located in the dynamic link library SETUPAPI.dll"

This error is generated despite having the latest build of RIPrep.exe from Windows 2000 Server SP4 – 5.0.2195.6685 at the time of writing. If you do not have this build of RIPrep you should obtain the current version from Service Pack 4 and update your RIS host to SP4 before continuing.

More Information:

Microsoft’s XP SP2 secure code initiative and several years worth of code development has seen some fundamental changes in the standard setup api used on XP and Server 2003 systems. The problem is caused quite obviously by the lack of the entry point UnmapAndCloseFile in the setupapi.dll.

The Fix

Very simply, you need to give riprep.exe access to a version of the dll with that entry point.

  1. Go to your Windows 2000 Remote Installation Server (ensure that it is SP4)
  2. Navigate to %SystemRoot%\System32
  3. Copy the file setupapi.dll into the <RISPath>\Admin\i386 folder
    e.g. E:\RemoteInstall\Admin\i386
  4. setupapi.dll from Windows 2000 SP4 (version 5.0.2195.6622 as of writing) will now be next to the riprep.exe
    SetupAPI.dll version info
  5. When you run RIPrep from the \\<server>\REMINST\Admin\i386 folder, the version of setupapi.dll in this folder will be used as a higher precedent to the version in the Windows XP or Windows Server 2003 %SystemRoot%\System32 folder, and RIPrep will be able to load correctly.

How to install Windows Media Player 11 with Media Sharing on Windows Server 2003 / R2

System Requirements:

  • Windows Server 2003 SP2
  • Windows Server 2003 R2 SP2

The Problem:

Windows Server 2003 ships with Windows Media Player version 10.0, and this version is maintained and services through Service Packs for Windows Server 2003.

The version of Media Player that ships with 2003 does not include Media Sharing support for distributing central Media Library databases to network clients. Unfortunately, with Microsoft’s decision to not to release Windows Media Player 11 for Server 2003 and not to include media library sharing in their 2008 platform, a minority of users (myself included) who use Server 2003 as a home server platform are forced to find other ways of centrally distributing media or to use an XP license, hardware (VM) and additional electricity to service WMP11 clients.

Prerequisites:

This article specifically discusses and assumes the following:

  • Windows Server 2003 / 2003 R2 SP2
  • Windows Media Player 11 – 11.0.5721.5145 (wmp11-windowsxp-x86-enu.exe published 1/15/2007)

Please Note: If the Windows Media Player 11 build is updated in the Microsoft Download Centre then the Service Pack 2 component of this article may no longer apply.

More Information:

Microsoft have made a conscious decision not to include Windows Media Player 11 in 2003, presumably as an added incentive to upgrade to Server 2008. However even Server 2008 fails to integrate the Media Library sharing components of WMP11 as Microsoft view the feature as not being of intrinsic use in corporate situations.

While Microsoft aren’t wrong here, and they (now) offer the Windows Home Server platform with this support, it isn’t something that I personally wish to look towards using having built a Server solution at home rom NT 4.0 onwards. As I have a domain environment at home and having a server infrastructure I have no desire to add a Windows XP system “server” into the mix just to support media sharing or to purchase Home Server.

As usual I have to wonder what goes through the heads of Microsoft development from time to time. For the sake of the 792 KB of entirely optional DLL files that are required to implement this – DLL’s that are being serviced anyway in the XP/XP64 (which is 2003 Server) and in Vista. You would have thought that adding it as an optional module wouldn’t be an unreasonable thought, however I digress.

The XP/Server 2003 code base is identical and as such the binary versions of WMP11 for Windows XP will run on Server 2003, unofficially.

This article outlines how to install Windows Media Player 11 and the system services necessary for Media Sharing using my nearly fully automated installation process.

Installing Windows Media Player 11 with SSDP & UPnP

This guide outlines how to install WMP11 on Server 2003. The process of getting Windows Media Player 11 onto Server 2003 is fairly simple, and I did start to investigate how to get the services working myself. While searching on Google for a fix for an error message I stumbled upon someone else’s fix for the services. So, not wanting to reinvent the wheel I abandoned my research and have used their process in my automation tool for installing the services for media sharing.

Credit for the process discovery for the system services goes to steven2004 of neowin.net.

If you need the User Mode Driver Framework for mobile device connectivity (e.g. Android), download version 1.0.2 (with thanks to kevin551 from Neowin for the variable tip) if you do not, use version 1.0.1. If you want to replace the default version of UMDF with the newer 1.9 release, see this page.

Please Note:

  1. This is not supported by Microsoft Corporation, Microsoft will not (and should not) be expected to support this
  2. After installing this on a server, Windows/Microsoft Update will no longer track updates for Windows Media Components, you will be responsible for doing this yourself
  3. Do not roll this out in a production environment, it’s one thing to do it on a box at home, quite another to do it in an enterprise environment; so for the sake of arguments, just don’t.

Download: Automatic Installer 1.0.1 (354 KB)
Download: Automatic Installer 1.0.2 (354 KB)

 

  1. Download my automatic installer
  2. Extract the installer files into a directory on your computer
  3. Download wmp11-windowsxp-x86-enu.exe into the SAME directory that you extracted my automated installer
  4. Run INSTALL.cmd
  5. The installer will stop with the following message on the screen:
  6. Open c:\wmp11\1\update\
  7. Right click update.exe
  8. Click properties
  9. Open the Compatibility Tab
  10. Check the box next to “Run this program in compatibility mode for:” and select Windows XP from the drop menu
  11. Click OK
  12. Repeat from step 7 for the version of update.exe found in C:\wmp11\2\update\
  13. Return to the INSTALL.cmd window and press any key to continue with the installation process
  14. Select the UPnP service when prompted by the wizard and click next. If prompted for a file path select c:\wmp11
  15. Finish the Wizard
  16. Restart your Server
  17. You will now be able to start and configure the SSDP and UPnP Services

Note: This process does not patch the WMP11 installation. You will no longer received Windows Media Player updates from Windows/Microsoft Update and will need to apply these patches manually.

If you do not have Windows Media Player 11 on your start menu at this point then you either:

  1. Failed to copy the wmp11-windowsxp-x86-enu.exe to the correct location
  2. You failed to set the update.exe files to Windows XP compatibility mode

Note: It has been suggested in some areas that you can edit the update.inf to change the require Operating System version information. If you do this, the CheckSum verification will fail at the beginning of the installation and WMP11 will not be installed. All Windows XP QFE files are digitally signed and therefore will fail to install if the hash check fails.

Updates

11/02/2013 – Added information on installing UMDF and version 1.0.2 of the install script.

When attempting to start the Microsoft Search service against SQL Server 2000 the event log reports error EID: 7003 “The Microsoft Search Service depends upon the following nonexistent service: NTLMSSP”

System Requirements:

  • Windows 2000, XP, 2003

The Problem:

When attempting to start the Full Text Catalogue services as part of SQL Server 2000, and trying to start the Microsoft Search service associated with it you receive an Event ID 7003 in the event log

The Microsoft Search Service depends upon the following nonexistent service: NTLMSSP

Event ID 7003

In addition the ‘Full-Text Indexing…’ option in Enterprise manager will remain unavailable.

EM Gray Option

More Information:

This is happening because there is an unstated dependency in the Service Manager’s dependency list that for whatever reason is not registering or starting on your server.

If you are seeing other service start errors you need to troubleshoot those first, particularly if they involve RPC or NTLM.

A second reason why you may be seeing this is because either your server was installed without, or the server has had removed the “Client for Microsoft Networking” and “File and printer sharing for Microsoft Networks” services from the Network interface service and protocol bindings list in the control panel.

A third reason is that the settings for a dependency have become corrupt and need to be replaced/repaired.

The Fix

In my case when I ran into this problem the system was completely missing the Microsoft networking services as it had been installed on a public facing computer. The problem dependency was the NTLM SSP or “NT LanManager Security Support Provider” which is required for SQL communications on non-named-pipe connections. The workstation service is required for named-pipe use incidentally.

The fix is to copy the registry settings for the missing service from a working computer, or in the case of the NTMLSSP copy the following into a .reg and Add it – note that this is the Windows 2000 Server SP4 version and may not be the same on Workstation, XP or 2003.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NtLmSsp]
“Type”=dword:00000020
“Start”=dword:00000003
“ErrorControl”=dword:00000001
“ImagePath”=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6c,\
00,73,00,61,00,73,00,73,00,2e,00,65,00,78,00,65,00,00,00
“DisplayName”=”NT LM Security Support Provider”
“ObjectName”=”LocalSystem”
“Description”=”Provides security to remote procedure call (RPC) programs that use transports other than named pipes.”

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NtLmSsp\Security]
“Security”=hex:01,00,14,80,a0,00,00,00,ac,00,00,00,14,00,00,00,30,00,00,00,02,\
00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
00,00,02,00,70,00,04,00,00,00,00,00,18,00,fd,01,02,00,01,01,00,00,00,00,00,\
05,12,00,00,00,20,02,00,00,00,00,1c,00,ff,01,0f,00,01,02,00,00,00,00,00,05,\
20,00,00,00,20,02,00,00,03,00,00,00,00,00,18,00,8d,01,02,00,01,01,00,00,00,\
00,00,05,0b,00,00,00,20,02,00,00,00,00,1c,00,fd,01,02,00,01,02,00,00,00,00,\
00,05,20,00,00,00,23,02,00,00,03,00,00,00,01,01,00,00,00,00,00,05,12,00,00,\
00,01,01,00,00,00,00,00,05,12,00,00,00

Once imported , reboot the machine and the Microsoft Search Service should start itself right up. Don’t feel tempted to change the service log-on for the Microsoft Search service away from the LocalSystemAccount, it will not work!.

Error: “Can’t load SMART Utilities library (code 5) Access is denied” when printing to a Samsung Colour Laser Printer CLP-300N

System Requirements:

  • Windows 2000 Professional
  • Windows XP Home, Professional
  • Windows Server 2003
  • Windows Vista

The Problem:

When a user who is not a local/domain administrator prints to your print server you may receive the following error message on the local console account of the Print Server (Windows Server 2003).

SMART UI 32-bits Gateway error
Can’t load SMART Utilities library (code 5)
Access is denied.

SMART code 5 error message

Depending upon your situation, you may receive this error when:

  • Any user attempts to send any print job to the printer via the share
  • When a user attempts to print from Microsoft Internet Explorer and not from other applications

The error occurs using driver 1.63.11 on 2000/XP/2003 and 3.03 under Windows Vista when communicated with a printer server rather than the printer NIC directly.

If you are serving the share from 2000 or XP you shouldn’t see this issue.

More Information:

So you get a new laser printer, and the last thing that you expect is that every time someone tries to print you wind up with a support call to unblock the print queue! Yet this is exactly what Samsung seem to expect you to do.

I didn’t fiddle around when I heard about this, I checked the drivers were up to date and just logged a support call with Samsung who called back – be it 5 hours later than promised…

The support call in summary:

  1. Calls, registers
  2. Explanation of problem that printer needs unblocking every time someone sends a print job
  3. Gets put on call back queue
  4. Call back does happen, but 5 hours later than originally told
  5. Looks on expert system
  6. Expert system draws a blank
  7. Me: “Can I speak to a higher level 1 support agent?”
    Samsung: “No”
  8. Me: “Can I speak to a developer and fault report it?”
    Samsung: “No”
  9. Me: “Can you tell me when the next driver revision is due to be released?”
    Samsung: “No”
  10. Me: “Is there a new driver revision in the pipe-line?”
    Samsung: “I don’t know”
    Me: “Can you find out?”
    Samsung: “No”
  11. Me: “What are you going to do about it?”
    Samsung: “There is nothing that I can do?”
  12. The samsung guy now Google’s the problem and find exactly the same support material that I had already gone through to no avail from a user community web site Samsung guy starts reading it to me, and just to be annoying I interrupted him mid way through and continued to read the same paragraph to him from the same web page ending
    Me: “Yes I can Google too, this doesn’t work”
  13. Samsung guy now tells me to do one of the suggestions on the comments to the Google search result:
    Samsung: “If you format the server that will fix it”
    Me: “Are you out of your mind! I’m not formatting a domain controller to fix a printer problem, especially when the thing was only installed 2 months ago and there is no evidence that it would even fix the problem” (This article exists because it will not fix the problem)
    Samsung: “That is all I can suggest”
  14. Samsung guy now tells me that because there is something on Google he is sure that a developer must be aware of it and will be working on it
  15. Exasperated by this point
    Me: “OK, how about a past driver revision, perhaps if we go back to an older v1 it will sort itself out?”
    Samsung: “No, I can’t do that, I don’t have access to drivers, we can’t give them to you”
    Me: “Can you put me through to someone who can”
    Samsung: “No, there isn’t anyone”
    Me: “Can you escalate this request?”
    Samsung: “No”
  16. Me: “Can you escalate this request with a developer, supervisor or manager?”
    Samsung: “No”
  17. Me: “What do you expect us to do?”
    Samsung: “I don’t know”
  18. I summarised the situation to the monosyllabic individual on the other end of the phone
    Me: “So what you are saying is that as an organisation you find the fact that you’ve just sold us a brand new network laser printer that cannot accept a print job unless an administrator physically logs into the system console and clicks OK to an error message for each and every print job from a non-administrative user? The only advice you are willing to give me is to format an in-use domain controller to fix a printer driver problem and you find this an acceptable solution and are not willing to do anything about it?”
    … and this was the best bit:
    Samsung: “Yes”
  19. I have to say that at that point I pretty much put the phone down with a few monosyllabic intonations of my own, only realising as I did it that I didn’t tell them that they would be removed from the buying list for this.

 

The Moral of the Story

Don’t buy Samsung Printers and certainly don’t bother with their technical support in the UK.

I sincerely hope that someone in Samsung UK does read this page and does take on board the above, because quite frankly there are some serious issues in their support department.

… and yes, Samsung are no longer on any of my or my clients purchase lists.

The Fix

A couple of months went by between the support call and me actually getting around to looking at it properly – a couple of very, very aggravating months by all accounts.

In a nut shell and after some forensic analysis and some perplexing:

When your user sends off a print job to the print server, it trips off a user-level instance inside the spoolsv.exe, which determines ultimately the permissions that the user is going to have for their print job, sets up the print environment and negotiates with the driver to receive validated queue objects.

For some CONVLUTED reason, the Samsung driver is telling the spoolsv.exe process that it needs to make use of NTVDM.exe under the credentials of the user who transmitted the print job.

If you do not know, NTVDM is the NT Virtual Desktop Manager, it is the process wrapper service used to execute 16-bit (yes 16-bit) code under the 32-bit environment of Win32 (in this case).

One question: Why?
This is a printer designed exclusively for use against NT 5.0 and above (Windows 2000+), so why in blazes does it need access to a 16-bit host process to print something?!?!

This is where your having Windows Server 2003 comes into play, because there are security model changes between 2000, XP and 2003 that have caused this problem.

Windows 2000

Under Windows 2000 the default permissions for NTVDM.exe are…

  • Administrators (F)
  • Everyone (R & E)
  • Power Users (R & E)
  • SYSTEM (F)
  • Users (R & E)

Windows XP

Similarly under Windows XP…

  • Administrators (F)
  • Power Users (R & E) [Professional Only]
  • System (F)
  • Users (R & E)

Windows Server 2003

Lastly under Windows Server 2003…

  • Administrators (F)
  • Batch (R & E)
  • Interactive (R & E)
  • Service (R & E)
  • System (F)

The solution should now be self-explanatory, the user/domain user account has no access to NTVDM.exe under Windows Server 2003 by default, therefore you simply need to give the user groups Read & Execute access to the NTVDM.exe on the Widows 2003 Server that you are sharing the printer from and it will solve the access denied problem that plagues this particular driver.

This isn’t a particularly great solution as it means modifying default Microsoft file permissions, however, it will make the printer work without you having to live in front of a console session between 9am and 5pm.

… it just doesn’t explain why it needs access to NTVDM in the first place.