Here’s the problem: You’ve got a small business with an Active Directory domain, but some of your computers have Windows XP/VISTA Home, so they can’t be joined to the domain. Furthermore, you want to map a shared shared resource such as a printer or network drive on one of said computers. When you use the “Net Use” command to map drives in a login script, it passes the local username, not the domain/username and thus fails to map. Here’s how to map a network drive with a set of domain credentials on a computer not joined to the domain using a login script.
[step 1] Using Notepad or a text editor create a file with a BAT extension (i.e. login.BAT)
[step 2] Enter the following, then save the file.
NET USE Z: \SERVERSHARE /USER:<domain><domainusername> <password>
[step 3] Copy the file to your computers start-up folder (i.e. C:Users<USER>AppDataRoamingMicrosoftWindowsStart MenuProgramsStartup)
[step 4] To test, log out and back in or just double click the BAT file. Your computer should now have a Z: drive mapped to the shared folder.