Thursday, December 10, 2009

Windows 2003 AD - Map Network Drive



MapNetworkDriveIS.vbs

Option Explicit

Dim objNetwork
Dim strDriveLetter, strRemotePath
Dim strDriveLetter2, strRemotePath2

strDriveLetter = "I:"
strDriveLetter2 = "S:"
strRemotePath = "\\AX-AD1\IT"
strRemotePath2 = "\\AX-AD1\AX Training"

' Purpose of script to create a network object. (objNetwork)
' Then to apply the MapNetworkDrive method.
' Results I and S drives
Set objNetwork = CreateObject("WScript.Network")objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
objNetwork.MapNetworkDrive strDriveLetter2, strRemotePath2
WScript.Quit

Friday, November 27, 2009

Monday, November 23, 2009

Thursday, November 19, 2009

The User Profile Service service failed the logon. User Profile cannot be loaded

Windows Vista & 7:

This solution works for my Windows 7 Enterprise on HP Compaq 510:

This error can usually be fixed by following the steps below. Doing all this requires a certain level of computer skills. You know yourself best and whether taking the machine to a competent local computer tech (not a BigComputerStore/GeekSquad type of place) is the better solution for you.

1. Log into another user account with administrative privileges. If you neglected to make an extra administrative account do Steps 2-3. Otherwise continue at Step 4. Also see the general information about setting up user accounts in Vista at the end of this post.

2. Boot into Safe Mode. Do this by repeatedly tapping the F8 key as the computer is starting up. This will get you to the right menu where you can use your arrow key to select Safe Mode [enter]. The built-in Administrator account is disabled by default in Vista. However, if no other administrative accounts exist on the system it may be enabled. If it is, you will see an icon for Administrator on the Welcome Screen in Safe Mode.

Log into Administrator.
3. If If you don't see the icon for the Administrator account in Safe Mode, then the built-in Administrator account is still disabled. You will need to use NTpasswd to enable the built-in Administrator account (disabled by default) and set a null (blank) password. Enabling this account will put an icon for it on the logon screen so you can then log on.

Download the CD image (.iso) and burn as an image, not as data. You will need third-party burning software. Then boot with the CD you created and follow the directions. After you've finished with NTpasswd, remove the CD and reboot the computer. Log into the Administrator account you enabled.

4. The critical files are under %systemdrive%\users\user-account\ntuser. The ntuser.dat file is actually a registry hive. Run Regedit elevated and select HKEY_USERS and "load hive" from the menu. Now navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

There is one line for each profile. If a profile is bad, check:
a) That the key name doesn't end in ".bak" (remove .bak if there)
b) That the RefCount value is 0 (change it if different)
c) That the State value is 0 (change if different)

Make any necessary changes, close Regedit and try to log in as that user.