A personal repository of technical notes. - CSC

Change Saved Network Password

How to change stored network passwords

Windows 7
Connected to a network domain:
Control Panel/User Accounts/Manage Windows Credentials

Not connected to a network domain:
Control Panel/User Accounts and Family Safety/User Accounts

See "Manage Stored Passwords, Certificates, and Other Credentials." Microsoft Windows. Web. 19 Oct. 2011.
<http://windows.microsoft.com/en-US/windows7/Manage-stored-passwords-certificates-and-other-credentials>.

Windows Server 2003
Start/Control Panel/Stored User Names and Passwords

WinXP
Start/Control Panel/User Accounts

If joined to a domain:

Advanced Tab/Manage Passwords

If not joined to a domain:

Select account name/Manage my network passwords

References
How to manage stored user names and passwords on a computer in a domain in Windows XP
http://support.microsoft.com/kb/306992/EN-US/

How To Manage Stored User Names and Passwords on a Computer That Is Not in a Domain in Windows XP
http://support.microsoft.com/kb/306541

Updates
2011-10-19 Added "Windows 7"

Expose Custom Control Sub-Property to Intellisense

// Exposes subproperties to intellisense

using System.ComponentModel;

[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public Literal MyLiteral
{
get { return myLiteral; }
set { myLiteral = value; }
}

// So that the following will show up in intellisense of control in front end:
MyLiteral-Text=""

SQL Conditional Sorting with Dynamic ORDER BY

Dynamic SQL Sorting with ORDER BY
  

DECLARE @sortByColumn varchar(100)

SELECT @sortByColumn = 'MyColumn05'-- 'MyColumn01'-- 'X'--

-- Dynamic Sorting Column in SELECT

SELECT

MyColumn01

,MyColumn02

,(MyColumn03 * MyColumn04)

,MyColumn05

,CASE @sortByColumn

WHEN 'MyColumn01' THEN MyColumn01

WHEN 'MyColumn02' THEN MyColumn02

WHEN 'MyColumn05' THEN STR(MyColumn05,19,16)

ELSE MyColumn01

END AS SorterColumn

FROM MyTableA

ORDER BY SorterColumn

-- Dynamic Sorting Column in ORDER BY

SELECT

MyColumn01

,MyColumn02

,(MyColumn03 * MyColumn04) AS NewColumn -- Calculation duplicated below in ORDER BY

,MyColumn05

FROM MyTableA

ORDER BY

CASE @sortByColumn

WHEN 'MyColumn01' THEN MyColumn01

WHEN 'MyColumn02' THEN MyColumn02

WHEN 'NewColumn' THEN STR(MyColumn03 * MyColumn04) -- Calculation duplicated above in SELECT

WHEN 'MyColumn05' THEN STR(MyColumn05,19,16)

ELSE MyColumn01

END

SELECT

MyColumn01

,MyColumn02

FROM MyTableA

ORDER BY

CASE

WHEN MyColumn01 > 0 THEN 0

ELSE 1

END

,MyColumn02

--------------------------------------------------

DECLARE @sortDesc bit

SELECT @sortDesc = 1-- 0--

-- Dynamic DESCENDING / ASCENDING

SELECT AsOfDate,MyColumn01,MyColumn05

FROM MyTableA

WHERE AsOfDate = '7-31-2007'

ORDER BY

CASE WHEN @sortDesc = 0 THEN MyColumn01 END ASC,

CASE WHEN @sortDesc = 1 THEN MyColumn01 END DESC

-- Dynamic DESCENDING / ASCENDING with Dynamic Sorting Column in ORDER BY

SELECT

MyColumn01

,MyColumn02

,(MyColumn03 * MyColumn04) AS NewColumn -- Calculation duplicated below in ORDER BY

,MyColumn05

FROM MyTableA

LEFT OUTER JOIN MyTableB

ON FM_TICKER = MyColumn01

WHERE AsOfDate = '7-31-2007'

ORDER BY

-- Ascending Sorts

CASE WHEN @sortDesc = 0 AND @sortByColumn = 'MyColumn01' THEN MyColumn01 END ASC,

CASE WHEN @sortDesc = 0 AND @sortByColumn = 'MyColumn02' THEN MyColumn02 END ASC,

CASE WHEN @sortDesc = 0 AND @sortByColumn = 'NewColumn' THEN STR(MyColumn03 * MyColumn04) END ASC, -- Calculation duplicated above in SELECT

CASE WHEN @sortDesc = 0 AND @sortByColumn = 'MyColumn05' THEN STR(MyColumn05,19,16) END ASC,

-- Descending Sorts

CASE WHEN @sortDesc = 1 AND @sortByColumn = 'MyColumn01' THEN MyColumn01 END DESC,

CASE WHEN @sortDesc = 1 AND @sortByColumn = 'MyColumn02' THEN MyColumn02 END DESC,

CASE WHEN @sortDesc = 1 AND @sortByColumn = 'NewColumn' THEN STR(MyColumn03 * MyColumn04) END DESC, -- Calculation duplicated above in SELECT

CASE WHEN @sortDesc = 1 AND @sortByColumn = 'MyColumn05' THEN STR(MyColumn05,19,16) END DESC

-- WARNING: Dynamic DESCENDING / ASCENDING **DOES NOT WORK** with Dynamic Sorting Column in SELECT

SELECT AsOfDate,MyColumn01,MyColumn05

,CASE @sortByColumn

WHEN 'MyColumn01' THEN MyColumn01

WHEN 'MyColumn05' THEN STR(MyColumn05,19,16)

END AS SorterColumn

FROM MyTableA

WHERE AsOfDate = '7-31-2007'

ORDER BY

CASE WHEN @sortDesc = 0 THEN SorterColumn END ASC,

CASE WHEN @sortDesc = 1 THEN SorterColumn END DESC

Visual Studio Remove Recent Projects MRU

Problem
Need to remove obsolete items from most recently used (MRU) Project items in Visual Studio.

Solution
To clear mru project list in Visual Studio
  1. Exit out of Visual Studio.
  2. Find entries located in registry location:
    VS2005: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ProjectMRUList
    VS2008: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\ProjectMRUList
  3. Change unwanted entries to "DELETEME".
  4. Open Visual Studio
  5. Click on entries labeled "DELETEME" under "Recent Projects".
  6. Select "Yes" when asked to remove entry.
References
None

Updates
2011-01-21 Added VS2008 location.
2010-09-08 Changed removal procedure.