Wednesday, December 19, 2007

MMC Snap-in error in SQL 2000

Problem:
I get an error from SQL 2000 Enterprise Manager's MMC Console when I right-click on database properties for any database shown in the Enterprise Manager list, and Enterprise Manager freezes requiring me to close it and re-launch it.

Possible reason:
Only one SQL DMO dll can exist on the server and it has been replaced by the new SQL2005 version.

Solution:
Re-register sqldmo.dll fom the SQL Server 2000 directory.

regsvr32 "c:\program files\Microsoft SQL Server\80\Tools\Binn\sqldmo.dll"

Friday, December 07, 2007

Login Scripts, Mapping drives and VISTA

Problem:

By default Group policy service executes scripts in an elevated mode. There are some scripts like 'Map network drives' that would need to be run in UAPmode. In order to launch such scripts in a UAP context from an elevated process, you can leverage the Task scheduler API.

The logon script uses the Net use command to map network drives.It works fine for standard users, but not to domain admin users.

Additional information can be obtained from the section "Group Policy Scripts can fail due to User Account Control" from the link in part 1 of the solution.

Solution:

  1. Get launchApp.wsf from the MS documentation http://technet2.microsoft.com/WindowsVista/en/library/5ae8da2a-878e-48db-a3c1-4be6ac7cf7631033.mspx?mfr=true
  2. Created Vista_Check.vbs that isset as the login script in Group Policy.
  3. When I cut and pasted launchApp.wsf the formatting put an extra carriage return in part of the script that I had to remove.

    Call rootFolder.RegisterTaskDefinition( _strTaskName, taskDefinition, FlagTaskCreate, _,, LogonTypeInteractive)

You didn't have to change anything in the actual login.vbs


Vista_Check.vbs==============

Dim isVista
Dim wshShell
Set wshShell = CreateObject("WScript.Shell")
GetOS
If isVista = True Then
runLaunchApp
Else
runLoginNormal
End If

Sub runLaunchApp
wshShell.Run "cscript \\\launchapp.wsf \\\login.vbs"
End Sub
Sub runLoginNormal
wshShell.Run \\\login.vbs
End Sub

Sub GetOS
strComputer = "." Set objWMIService =GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer &"\root\cimv2")
Set colOSes = objWMIService.ExecQuery("Select * fromWin32_OperatingSystem")
For Each objOS in colOSes
osCaption = objOS.Caption
If instr(osCaption, "Vista") Then
isVista = True
End If
Next
End Sub

link: http://www.developersdex.com/asp/message.asp?p=593&r=5431945&page=2

Wednesday, December 05, 2007

Microsoft Intellipoint Mouse and TAB Instant Viewer

Something to note is that although the default setting for the middle-click within the Intellipoint software is to open the Instant Viewer, you can still retain the middle-click behavior for Internet Explorer to open a new tab when clicking on a link:
  1. Open the Microsoft Mouse software and check the box labeled "Enable program-specific settings" on the first tab - this enables the settings button
  2. Click on settings, click on add and select iexplore.exe
  3. Change the "Wheel button" setting to Middle-click instead of Instant Viewer
  4. Hit OK and then OK again.

Now when you use IE you can use the Middle-click option on a link to launch a new tab.

However, this will negate the ability to use the Instant Viewer with the middle-click as program-specific settings will override the general settings.