sqmapi.dll corrupted on Windows 7

Had a recent issue on Win7, could not install the service pack 1 due to this dll which was missing.

I used the sfc /scannow at least 3 times and finally this dll has been restored; Unfortunately all the originals files from the system were also restored.

Having on this machine customized the Welcome message and some others….however I have been able to apply the sp.

vbs to mount windows shares

Function mapdrive()
strDrive = WScript.Arguments(0) ‘ e.g. i:
strPath = WScript.Arguments(1)
strUser = WScript.Arguments(2) ‘ e.g. Administrator
strPassword = WScript.Arguments(3)
boolPersistent = True ‘ True = Persistent ; False = Not Persistent

set objNetwork = WScript.CreateObject(“WScript.Network”)
Set ObjFSO = CreateObject(“Scripting.FileSystemObject”)

‘Check and disconnect if the drive is already mapped.
if(ObjFSO.DriveExists(strDrive)) then
objNetwork.RemoveNetworkDrive strDrive, True, True
end if

objNetwork.MapNetworkDrive strDrive, strPath, boolPersistent, _
strUser, strPassword
if(ObjFSO.DriveExists(strDrive)) then
WScript.Echo “Successfully mapped drive : ” & strDrive & ” to ” & strPath
end if

Set ObjFSO = nothing
Set objNetwork = nothing
end function

Function parseArgs()
Dim filelen
filelen = WScript.Arguments.length
if filelen < 4 Then
WScript.Echo(“Usage : cscript //nologo mapdrive.vbs “)
WScript.Echo(“Example : cscript //nologo mapdrive.vbs i: \\myserver\data\myshare administrator mypassword”)
end if
End function


then this type of command line:

cscript //nologo mapdrive.vbs i: \\myserver\data\myshare