Windows Tips
Setting Up A New Machine
Software
- Notepad++
For .config syntax highlighting: Settings - Styler Configurator - pick xml - add "User ext" - WinMerge
- IrfanView
- Firefox extensions:
- Adblock Plus or uBlock Origin
- Used to use Dafizilla-viewsource With but disabled for FF 57. Instead:
- about:config
- search for view_source
- change view_source.editor.external to true (just double click)
- change view_source.editor.path to C:\Program Files (x86)\Notepad++\notepad++.exe (no quotes)
- Filezilla. To sync, Site Manager/File has import/export.
- SysInternals tools (esp Prcoess Explorer)
Windows 11
- Set up without internet/local account: on "Let's connect you to a network" shift/F10 opens command window, type oobe\bypassnro
- After restart- do not connect to internet. "I don't have internet" "Continue with limited setup"
- Remove ads :(
- Settings - Privacy & Security - Search permissions - More settings / search highlights to OFF
- Settings - Privacy & Security - General - Show me suggested content OFF, and Lets apps show me personalized ads OFF
- Settings - Privacy & Security - Diagnostics & Feedback - Tailored experiences - Let MS ... enhance your product experiences OFF
- Settings - Personalization - Taskbar - Widgets off
- Settings - Personalization - Lock Screen - Personalize - Get fun facts, tricks... OFF
- Settings - Personalization - Device Usage - turn off all (gaming/ entertainment ...)
- Settings - System - Notifications - Additional Settings - clear the "windows welcome" etc
- File explorer - ... menu - Options - View - Show sync provider notifications unticked
- Turn off CAPSLOCK
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,2a,00,3a,00,00,00,00,00
- For desktops- Shutdown icon: Create a shortcut to
Shutdown.exe -s -t 00
(shutdown in 0 seconds) on desktop, customize the icon, then right-click-Pin To Start.
Settings
Development machine- Visual Studio
General options
- Tools/Options/ TextEditor/ All Languages - Wordwrap and line numbers.
- In a web project File/Browse With - Add Firefox and make default.
- Add Resharper
- SQL Server (Express) latest + SPs. In Management Studio, server node rightclick/ Properties/ Security/ SQL Server and Windows Authentication (i.e. mixed mode)
- SSMS can be slow so uncheck IE Options/Advanced tab/Security-
Check publisher's certificate revocation
(or put this entry in C:\windows\system32\drivers\etc\hosts: 127.0.0.1 crl.microsoft.com)
Obsolete Visual Studio stuff
- Visual Studio latest + SPs + extensions/addins.
- Vista/7/8: go to C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE and right-click devenv.exe. In compatibility tab, set to run as administrator
- Vista/7/8: install IIS7 + IIS - Web Management - IIS6 Compatibility- IIS Metabase and IIS 6 configuration + IIS - WWW Services - ASP.Net + IIS - Security - Windows Authentication. See KB for SQL Server
- For SSL:
- PreVista: download/install IIS 6 resource kit and run SelfSSL (selfssl /T for default localhost website)
- Vista/IIS7: all in IIS manager - Scottgu
- PATH Environment Variable: required for .net csc.
1.1 ;%windir%\Microsoft.NET\Framework\v1.1.4322;C:\Program Files\Microsoft.NET\SDK\v1.1\Bin; 2.0 ;%windir%\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin; 3.5 %windir%\Microsoft.NET\Framework\v3.5 4.0 %windir%\Microsoft.NET\Framework\v4.0.30319
Gacutil and the .Net Framework SDK tools are in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin - WindowsXP properties/security tab isn't there by default-
Tools/Folder Options/View tab; deselect "Use simple file sharing" - XP search doesn't search .cs/ .js etc- registry hack
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex] "FilterFilesWithUnknownExtensions"=dword:00000001
- Vista/7:
- Vista run msi as administrator context menu (third setting stops Vista changing folder templates):
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Msi.Package\shell\RunAs] @="Install As Admin" [HKEY_CLASSES_ROOT\Msi.Package\shell\RunAs\command] @="msiexec /i \"%1\"" [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell] "FolderType"="NotSpecified"
- If installed SP1, C:\WINDOWS\system32\VSP1CLN.exe to recover disc space. For sp2, run Compcln.exe
- Vista run msi as administrator context menu (third setting stops Vista changing folder templates):
Development machine- Node + Grunt
- Install Node.js either with installer or via chocolately
cinst nodejs.install
- Corporate Proxy
- In project root (project-based) or user root %USERPROFILE% (user-based), create a file ".npmrc" (in Windows explorer, name it ".npmrc." and the last dot will disappear)
- In .npmrc add the lines
proxy = http://domain\username:[email protected]:8080
https-proxy = http://domain\username:[email protected]:8080 - The command line version is npm config set proxy http://domain\username:[email protected]:8080
- Node includes an older version of npm. Update (as Administrator)
npm install npm@latest -g
- Install grunt:
npm install -g grunt-cli
- To set up a project, create package.json then run
npm install
- To run grunt,
grunt
- To set up a project, create package.json then run
Git and Proxies
git.config for external (eg github) and internal. Set the proxy to empty.
[http] proxy = http://proxy.corporate:80 [http "https://internal-git"] proxy = sslVerify = false
Show what's set: git config --get-urlmatch http https://internal-git
Environmental variables always override the git.config. NB: https_proxy must have http url (not https).
http_proxy=http://username:[email protected]:port https_proxy=http://username:[email protected]:port no_proxy=https://internal-git
Misc.
Old stuff
VB6
Unfortunately still around :(
- Visual Studio add-ins: MZTools.
Also TurboVBLite add in (official) older version (incl more code maintenance, a little buggy with ' but nice) - Mousewheel doesn't work fix (KB with download)
- Project Analyzer - fxcop for vb6. Not free.
- VB6/ASP3 debugging problems (ms kb)
- _Register.bat:
For %%f in (*.dll) do regsvr32 /s %%f
.
For context-menu Register item, save and merge this reg file (use HKEY_CLASSES_ROOT for whole machine):REGEDIT4 [HKEY_CURRENT_USER\Software\Classes\dllfile\shell\Register\command] @="regsvr32.exe %1" [HKEY_CURRENT_USER\Software\Classes\dllfile\Shell\Unregister\command] @="regsvr32.exe /u %1" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Cmd Here\command] @="cmd.exe /k pushd %L "
Assign a virtual drive letter to a folder
Use DOS subst: subst x: c:\directory
To persist it in w98, put it in autoexec.bat. Cannot be used for network drives (which you can map anyway).
See also Visual Subst
LUA
MS guide and see DropMyRights
DOS
- Get a file list:
dir *.gif /B > list.txt
- Append a number of files together:
copy *.txt output.txt