Visual Studio Text Editor Guideline(s)
Registry Path: 'HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\{Visual Studio version (.NET 2002=7.0, .NET 2003=7.1, 2005=8.0, 2008=9.0, 2010=10.0, 2012=11.0, 2013=12.0)}\Text Editor'
Registry value type: REG_SZ (String)
Registry value name: 'Guides'
Registry value string format: 'RGB({red 0-255}, {green 0-255}, {blue 0-255}) {number of characters}[, {number of characters}]*'
Example using red line at 80 and 100 characters: RGB(255, 0, 0) 80, 100  

Cleanup Windows unused hardware from database
Run the command 'cmd /C "set devmgr_show_nonpresent_devices=1 && %windir%\system32\devmgmt.msc"' or use the System applet in Control Panel, Advanced Tab, Environment Variables button to add devmgr_show_nonpresent_devices set to 1 as a System variable (requires reboot) or current user variable (requires re-login) followed by opening the device manager from the System control panel applet's Hardware tab.  

Repairing hard drive bad clusters/sectors due to magnetic errors
Use third party software such as HDD Regenerator 2011 that uses the following process: Sector by sector scanning for bad sectors, aggressive reading of bad sector content, low-level individual sector format of bad sector and writing back data for preservation.  Afterwords, on NTFS volumes running Windows Vista/7/Server 2008, use %windir%\system32\chkdsk.exe <volume>: /B to reevaluate bad clusters and free them from the $BadClusters file.  If running Windows NT4/2000/XP/Server 2003 with an NTFS volume, then obtain a recovery disc from the aforementioned Windows versions that matches the system type (either 32-bit or 64-bit) and boot from the CD running the chkdsk utility with the /B option.  For Windows 95/98/Me which have FAT volumes, use the following knowledge base article guide for scandisk: http://support.microsoft.com/?kbid=127055.  For other systems with FAT volumes, one must use a third party tool such as Partition Magic to rescan the bad sectors.  

Visual Basic .NET Octree Quantizer
Download Quantizer.vb

Visual C++ ATL JavaScript Object Name (JSON) (De)Serializer
Download JavaScriptSerialization.h

Visual Basic .NET project for facebook to show entirety of wall or news feed posts in Internet Explorer web browser
Download frmShowFB.vb

Microsoft Outlook VBA macro for automated CutePDF free edition batch e-mail printing
Download prjPrintEmails.vba

Visual Basic .NET project using AviCap library to make video preview and recording with timestamp, featuring YUY2 format to and from RGB format
Download frmWebCamSecurity.vb

zlib 1.2.7 for Windows x86 and x64 pre-compiled static libraries and DLLs using Visual C++ 2010 with C++ library statically linked including build script
Download zlib127dll.zip

Batch for recursively sorting files by size
@echo off
setlocal disableDelayedExpansion
set tempfile="%temp%\_mysort%random%.txt"
set "root="
for %%F in (%*) do (
  if not defined root (
    pushd %%F || exit /b
    set root=1
  ) else (
    REM echo(
    REM echo %%~nxF
    REM echo --------------------------------------------
    (
      @echo off
      for /f "eol=: delims=" %%A in ('dir /s /b /a-d "%%~nxF"') do (
        set "mypath=%%~dpA"
        set "size=            %%~zA"
        setlocal enableDelayedExpansion
        set "size=!size:~-12!"
        echo !size! %%A
        endlocal
      )
    ) >%tempfile%
        sort /r %tempfile%
  )
)
if exist %tempfile% del %tempfile%
if defined root popd
set tempfile=
set root=
set mypath=
set size=
Download RecurseFilesBySize.bat

Batch for maintaining Windows 7/8/8.1 critical via wsusoffline and recommended updates and detecting those which are superseded
@REM Windows 7 x64 SP1: KB976902 is unremovable and hidden by KB2533552, ie11-* will have redundant ie10-*, ie9-*, windows6.1-* versions
@REM Windows 7 x64 SP1: KB2841134/KB2718695 is Internet Explorer 11/10, KB971033 is update for Windows Activation Technologies, KB947821 is System Update Readiness Tool, KB958559 is Windows Virtual PC, KB917607 is Windows Help
@REM "%WINVER%"=="62" SET WSUSOFFDIR=E:\wsusoffline\client\w62-x64\glb && SET OUTFILE=Win8x64 && SET PREFIX=Windows8-RT- && SET TOKFIX=3
@FOR /F "tokens=4,5 delims=. " %%a IN ('VER') DO @SET WINVER=%%a%%b

@SET WSUSOFFDIR=E:\wsusoffline\client\w%WINVER%-x64\glb
@IF "%WINVER%"=="63" (SET OUTFILE=Win81x64) ELSE (SET OUTFILE=Win7x64SP1)
@IF "%WINVER%"=="63" (SET PREFIX=Windows8.1-) ELSE (SET PREFIX=Windows6.1-)
@IF "%WINVER%"=="63" (SET TOKFIX=2) ELSE (SET TOKFIX=2)

@%windir%\system32\dism.exe /Online /Get-Packages > %TEMP%\%OUTFILE%Packages.txt
@DEL %TEMP%\%OUTFILE%Critical.txt
@FOR /F "tokens=3 delims=_~" %%a IN ('FIND "Package Identity : Package_for_KB" ^< %TEMP%\%OUTFILE%Packages.txt') DO @FOR /F "tokens=4 delims=: " %%b IN ('FIND /C "%%a" %TEMP%\%OUTFILE%Packages.txt 2^> nul') DO @IF "%%b" NEQ "1" (@ECHO DUPLICATE: %%a)
@FOR /F "tokens=3 delims=_~" %%a IN ('FIND "Package Identity : Package_for_KB" ^< %TEMP%\%OUTFILE%Packages.txt') DO @DIR /B %WSUSOFFDIR%\*%%a* 2> nul >> %TEMP%\%OUTFILE%Critical.txt
@DEL %TEMP%\%OUTFILE%Recommended.txt
@FOR /F "tokens=3 delims=_~" %%a IN ('FIND "Package Identity : Package_for_KB" ^< %TEMP%\%OUTFILE%Packages.txt') DO @DIR /B E:\Downloads\System\*%%a* 2> nul >> %TEMP%\%OUTFILE%Recommended.txt
@FOR /F "tokens=3 delims=_~" %%a IN ('FIND "Package Identity : Package_for_KB" ^< %TEMP%\%OUTFILE%Packages.txt') DO @IF NOT EXIST E:\Downloads\System\*%%a* (@IF NOT EXIST %WSUSOFFDIR%\*%%a* (@ECHO MISSING UPDATE PACKAGE: %%a && FIND "Package Identity : Package_for_%%a" < %TEMP%\%OUTFILE%Packages.txt))

@FOR /F %%a IN (%TEMP%\%OUTFILE%Critical.txt) DO @FIND "%%a" < %OUTFILE%Critical.txt > nul || ECHO ADD CRITICAL PACKAGE TO LIST: %%a
@FOR /F %%a IN (%OUTFILE%Critical.txt) DO @FIND "%%a" < %TEMP%\%OUTFILE%Critical.txt > nul || ECHO REMOVE CRITICAL PACKAGE FROM LIST: %%a
@FOR /F %%a IN (%TEMP%\%OUTFILE%Recommended.txt) DO @FIND "%%a" < %OUTFILE%Recommended.txt > nul || ECHO ADD RECOMMENDED PACKAGE TO LIST: %%a
@FOR /F %%a IN (%OUTFILE%Recommended.txt) DO @FIND "%%a" < %TEMP%\%OUTFILE%Recommended.txt > nul || ECHO REMOVE RECOMMENDED PACKAGE FROM LIST: %%a

@FOR /F "tokens=%TOKFIX% delims=-" %%a IN ('DIR /B E:\Downloads\System\%PREFIX%*') DO @FOR /F %%B IN ('FIND /I "%%a" /C ^< %TEMP%\%OUTFILE%Packages.txt') DO @IF "%%B"=="0" (ECHO UPDATE PACKAGE NOT INSTALLED: %%a)

@IF "%WINVER%"=="63" (SET WSUSOFFDIR=E:\wsusoffline\client\w61-x64\glb) ELSE (SET WSUSOFFDIR=E:\wsusoffline\client\w63-x64\glb)
@IF "%WINVER%"=="63" (SET OUTFILE=Win7x64SP1) ELSE (SET OUTFILE=Win81x64)
@IF "%WINVER%"=="63" (SET PREFIX=Windows6.1-) ELSE (SET PREFIX=Windows8.1-)
@IF "%WINVER%"=="63" (SET TOKFIX=2) ELSE (SET TOKFIX=2)

@%windir%\system32\dism.exe /Image:F:\ /Get-Packages > %TEMP%\%OUTFILE%Packages.txt
@DEL %TEMP%\%OUTFILE%Critical.txt
@FOR /F "tokens=3 delims=_~" %%a IN ('FIND "Package Identity : Package_for_KB" ^< %TEMP%\%OUTFILE%Packages.txt') DO @FOR /F "tokens=4 delims=: " %%b IN ('FIND /C "%%a" %TEMP%\%OUTFILE%Packages.txt 2^> nul') DO @IF "%%b" NEQ "1" (@ECHO DUPLICATE: %%a)
@FOR /F "tokens=3 delims=_~" %%a IN ('FIND "Package Identity : Package_for_KB" ^< %TEMP%\%OUTFILE%Packages.txt') DO @DIR /B %WSUSOFFDIR%\*%%a* 2> nul >> %TEMP%\%OUTFILE%Critical.txt
@DEL %TEMP%\%OUTFILE%Recommended.txt
@FOR /F "tokens=3 delims=_~" %%a IN ('FIND "Package Identity : Package_for_KB" ^< %TEMP%\%OUTFILE%Packages.txt') DO @DIR /B E:\Downloads\System\*%%a* 2> nul >> %TEMP%\%OUTFILE%Recommended.txt
@FOR /F "tokens=3 delims=_~" %%a IN ('FIND "Package Identity : Package_for_KB" ^< %TEMP%\%OUTFILE%Packages.txt') DO @IF NOT EXIST E:\Downloads\System\*%%a* (@IF NOT EXIST %WSUSOFFDIR%\*%%a* (@ECHO MISSING UPDATE PACKAGE: %%a && FIND "Package Identity : Package_for_%%a" < %TEMP%\%OUTFILE%Packages.txt))

@FOR /F "tokens=%TOKFIX% delims=-" %%a IN ('DIR /B E:\Downloads\System\%PREFIX%*') DO @FOR /F %%B IN ('FIND /I "%%a" /C ^< %TEMP%\%OUTFILE%Packages.txt') DO @IF "%%B"=="0" (ECHO UPDATE PACKAGE NOT INSTALLED: %%a)
SET WSUSOFFDIR=
SET OUTFILE=
SET PREFIX=
SET TOKFIX=
Download GetUpdateList.bat

Batch for making official Microsoft ISO kit image with oscdimg from the Windows Assessment and Deployment Toolkit
SET OSCDPATH=%ProgramFiles(x86)%\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg
REM SET OSCDPATH=F:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg
"%OSCDPATH%\oscdimg.exe" -u2 -m -h -lWADK80-EN "%USERPROFILE%\Downloads\Windows Kits\8.0\ADK" WADK80-EN.iso
"%OSCDPATH%\oscdimg.exe" -u2 -m -h -lWSDK80-EN "%USERPROFILE%\Downloads\Windows Kits\8.0\WDK" WDK80-EN.iso
"%OSCDPATH%\oscdimg.exe" -u2 -m -h -lWSDK80-EN "%USERPROFILE%\Downloads\Windows Kits\8.0\StandaloneSDK" WSDK80-EN.iso
"%OSCDPATH%\oscdimg.exe" -u2 -m -oc -h -lSQLFULL_ENU "%USERPROFILE%\Downloads\SQL Server 2008 R2 Developer (x86, x64, ia64) - DVD (English)" en_sql_server_2008_r2_developer_x86_x64_ia64_dvd_522665.iso
"%OSCDPATH%\oscdimg.exe" -u2 -m -h -lWADK81-EN "%USERPROFILE%\Downloads\Windows Kits\8.1\ADK" WADK81-EN.iso
"%OSCDPATH%\oscdimg.exe" -u2 -m -h -lWDK81-EN "%USERPROFILE%\Downloads\Windows Kits\8.1\WDK" WDK81-EN.iso
"%OSCDPATH%\oscdimg.exe" -u2 -m -h -lWSDK81-EN "%USERPROFILE%\Downloads\Windows Kits\8.1\StandaloneSDK" WSDK81-EN.iso
"%OSCDPATH%\oscdimg.exe" -u2 -m -h -lWINDOWS81MEDIACENTER "C:\ESD" Windows81MediaCenter.iso
SET OSCDPATH=
Download MakeKitImage.bat

Creating proper Windows 7/8/8.1 dual boot configuration
Must make recovery partition and copy Windows 7 ([System Drive]\Recovery\WindowsRE) and 8 ([System Drive]\Recovery\[GUID]) recovery environments to it and optionally Microsoft DaRT 7 ([System Drive]\Recovery\MSDART70) and 8 ([System Drive]\Recovery\MSDART80).  Primary boot configuration knows about itself, its recovery environment and non-primary OS.  Non-primary boot configuration knows about itself and its recovery environment.  Ensure Windows 8 has the Windows 8 bootmgr and Windows 7 has the Windows 7 bootmgr and primary OS is set as the active partition.  Upgrades to Windows 8 cause Windows 7 to be the primary OS where changing it to Windows 8 requires changing the following: Windows 7 has the Windows 8 boot manager and is the active partition, and knows about Windows 8 in its boot configuration as well the Windows 8 recovery environment is not located correctly on the recovery partition.  

Accessing case hidden field in VB.NET
Get Field: GetType([object-type-name]).InvokeMember("[case-hidden-field-name]", Reflection.BindingFlags.Public Or Reflection.BindingFlags.NonPublic Or Reflection.BindingFlags.Static Or Reflection.BindingFlags.Instance Or Reflection.BindingFlags.GetField, Nothing, [object-instance], Nothing, Nothing, Nothing, Nothing)
Set Field: GetType([object-type-name]).InvokeMember("[case-hidden-field-name]", Reflection.BindingFlags.Public Or Reflection.BindingFlags.NonPublic Or Reflection.BindingFlags.Static Or Reflection.BindingFlags.Instance Or Reflection.BindingFlags.SetField, Nothing, [object-instance], New Object() {[field-assignment-value]}, Nothing, Nothing, Nothing)
Alternative Get Field: GetType([object-type-name]).GetField("[case-hidden-field-name]", Reflection.BindingFlags.Public Or Reflection.BindingFlags.NonPublic Or Reflection.BindingFlags.Static Or Reflection.BindingFlags.Instance).GetValue([object-instance])
Alternative Set Field: GetType([object-type-name]).GetField("[case-hidden-field-name]", Reflection.BindingFlags.Public Or Reflection.BindingFlags.NonPublic Or Reflection.BindingFlags.Static Or Reflection.BindingFlags.Instance).SetValue([object-instance], Nothing, Nothing, Nothing, Nothing)  

Download Visual Studio 2010/2012/2013 dynamic help content for local installation and creating an ISO
SET OSCDPATH=%ProgramFiles(x86)%\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg

CD /D %TEMP%

MKDIR VS2010Documentation
CD VS2010Documentation
"%ProgramFiles%\7-Zip\7z.exe" x E:\downloads\programming\Huge\VS2010DOCS.iso
E:\wsusoffline\bin\wget.exe -r -k -x -nH -H -N -E -l inf -e robots=off -X /ServiceAPI/packages -R *fr-fr*,*pt-br*,*es-es*,*pl-pl*,*de-de*,*cs-cz*,*it-it*,*tr-tr*,*ru-ru*,*ja-jp*,*ko-kr*,*zh-tw*,*zh-cn* http://services.mtps.microsoft.com/ServiceAPI/products/
FOR %%A in (*.cab) DO @FINDSTR /S "%%A" *.html > nul || IF ERRORLEVEL 0 DEL %%A
RMDIR /S /Q ServiceAPI
REM COPY *.cab %ProgramData%\Microsoft\HelpLibrary\content\Microsoft\incoming\
"%OSCDPATH%\oscdimg.exe" -u2 -m -h -lVS2010DOCS "%CD%" ..\VS2010DOCS.iso
CD ..
RMDIR /S /Q VS2010Documentation

MKDIR VS2012Documentation
CD VS2012Documentation
"%ProgramFiles%\7-Zip\7z.exe" x E:\downloads\programming\Huge\VS2012DOCS.iso
E:\wsusoffline\bin\wget.exe -r -k -x -nH -H -N -E -l inf -e robots=off -X /ServiceAPI/packages -R *fr-fr*,*pt-br*,*es-es*,*pl-pl*,*de-de*,*cs-cz*,*it-it*,*tr-tr*,*ru-ru*,*ja-jp*,*ko-kr*,*zh-tw*,*zh-cn* http://services.mtps.microsoft.com/ServiceAPI/catalogs/visualstudio11/en-us
E:\wsusoffline\bin\wget.exe -r -k -x -nH -H -N -E -l inf -e robots=off -X /ServiceAPI/packages -R *fr-fr*,*pt-br*,*es-es*,*pl-pl*,*de-de*,*cs-cz*,*it-it*,*tr-tr*,*ru-ru*,*ja-jp*,*ko-kr*,*zh-tw*,*zh-cn* http://services.mtps.microsoft.com/ServiceAPI/catalogs/visualstudio12/en-us
FOR %%A in (*.cab) DO @FINDSTR /S "%%A" *.html > nul || IF ERRORLEVEL 0 DEL %%A
DEL serviceapi\catalogs\visualstudio11\HelpContentSetup.msha
RENAME serviceapi\catalogs\visualstudio11\en-us.html HelpContentSetup.msha
START /WAIT %userprofile%\Documents\Projects\ReplaceText.vbs serviceapi\catalogs\visualstudio11\HelpContentSetup.msha "http://services.mtps.microsoft.com/ServiceAPI/catalogs/visualstudio11/en-us" ""
START /WAIT %userprofile%\Documents\Projects\ReplaceText.vbs serviceapi\catalogs\visualstudio11\HelpContentSetup.msha "http://packages.mtps.microsoft.com/" ""
START /WAIT %userprofile%\Documents\Projects\ReplaceText.vbs serviceapi\catalogs\visualstudio11\HelpContentSetup.msha "../../packages/" ""
START /WAIT %userprofile%\Documents\Projects\ReplaceText.vbs serviceapi\catalogs\visualstudio11\HelpContentSetup.msha "../../styles/" ""
START /WAIT %userprofile%\Documents\Projects\ReplaceText.vbs serviceapi\catalogs\visualstudio11\HelpContentSetup.msha "../../catalogs/visualstudio11" ""

DEL serviceapi\catalogs\visualstudio12\HelpContentSetup.msha
RENAME serviceapi\catalogs\visualstudio12\en-us.html HelpContentSetup.msha
START /WAIT %userprofile%\Documents\Projects\ReplaceText.vbs serviceapi\catalogs\visualstudio12\HelpContentSetup.msha "http://services.mtps.microsoft.com/ServiceAPI/catalogs/visualstudio12/en-us" ""
START /WAIT %userprofile%\Documents\Projects\ReplaceText.vbs serviceapi\catalogs\visualstudio12\HelpContentSetup.msha "http://packages.mtps.microsoft.com/" ""
START /WAIT %userprofile%\Documents\Projects\ReplaceText.vbs serviceapi\catalogs\visualstudio12\HelpContentSetup.msha "../../packages/" ""
START /WAIT %userprofile%\Documents\Projects\ReplaceText.vbs serviceapi\catalogs\visualstudio12\HelpContentSetup.msha "../../styles/" ""
START /WAIT %userprofile%\Documents\Projects\ReplaceText.vbs serviceapi\catalogs\visualstudio12\HelpContentSetup.msha "../../catalogs/visualstudio12" ""

REM RMDIR /S /Q ServiceAPI
REM COPY *.cab %ProgramData%\Microsoft\HelpLibrary2\Catalogs\VisualStudio11\Incoming\Cab
"%OSCDPATH%\oscdimg.exe" -u2 -m -h -lVS2012DOCS "%CD%" ..\VS2012DOCS.iso
CD ..
RMDIR /S /Q VS2012Documentation

REM MKDIR VS2013Documentation
REM CD VS2013Documentation
REM "%ProgramFiles%\7-Zip\7z.exe" x E:\downloads\programming\Huge\VS2013DOCS.iso
REM FOR %%A in (*.cab) DO @FINDSTR /S "%%A" *.html > nul || IF ERRORLEVEL 0 DEL %%A

REM RMDIR /S /Q ServiceAPI
REM COPY *.cab %ProgramData%\Microsoft\HelpLibrary2\Catalogs\VisualStudio12\Incoming\Cab
REM "%OSCDPATH%\oscdimg.exe" -u2 -m -h -lVS2013DOCS "%CD%" ..\VS2013DOCS.iso
REM CD ..
REM RMDIR /S /Q VS2013Documentation
SET OSCDPATH=
Download VSHelpDownload.bat

Getting dynamic allocation source debug info for MFC projects
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif  

Remove hypervisor, kernel and boot debug backdoors from a Windows 7/8/8.1 to prevent implanted wireless device surveillance and harassment
@FOR /F "tokens=2 delims= " %%A IN ('CMD /C "%systemroot%\system32\bcdedit.exe" /enum FIRMWARE ^| FIND "identifier"') DO "%systemroot%\system32\bcdedit.exe" /set %%A bootdebug off
@FOR /F "tokens=2 delims= " %%A IN ('CMD /C "%systemroot%\system32\bcdedit.exe" /enum BOOTMGR ^| FIND "identifier"') DO "%systemroot%\system32\bcdedit.exe" /set %%A bootdebug off
@FOR /F "tokens=2 delims= " %%A IN ('CMD /C "%systemroot%\system32\bcdedit.exe" /enum OSLOADER ^| FIND "identifier"') DO "%systemroot%\system32\bcdedit.exe" /set %%A bootdebug off && "%systemroot%\system32\bcdedit.exe" /set %%A debug off && "%systemroot%\system32\bcdedit.exe" /set %%A hypervisordebug off && "%systemroot%\system32\bcdedit.exe" /set %%A bootems off
@FOR /F "tokens=2 delims= " %%A IN ('CMD /C "%systemroot%\system32\bcdedit.exe" /enum RESUME ^| FIND "identifier"') DO "%systemroot%\system32\bcdedit.exe" /set %%A debugoptionenabled off
Download CloseDebugHyper.bat