- 1 Dummy
- 1.1 Fixed width fonts in outlook
- 1.2 take a screen shot
- 1.3 edit files mapped via samba
- 1.4 last reboot time
- 1.5 move windows
- 1.6 Modify the Alt+Tab behavior
- 1.7 MS Word
- 1.8 Terminal emulators in Windows
- 1.9 conemu vs console2
- 1.10 Quickly launch applications
- 1.11 Windows shortcut keys
- 1.12 keyboard shortcuts to control windows
- 1.13 Working with multiple windows
- 1.14 Firefox configuration
- 1.15 Q&A
- 1.16 starting applications
- 1.17 git bash
- 1.18 Set environment variables
- 1.19 unset environment variable
- 1.20 dump environment variables
- 1.21 set up HOME directory
- 1.22 single line tips
- 1.23 accessing file locally from browser
- 1.24 Linux to Windows
- 1.25 send output to file
- 1.26 favorite command prompt configuration
- 1.27 formatted date and time
- 1.28 reboot on remote desktop
- 1.29 executable names
- 1.30 extract a page from PDF
- 2 Remote desktop
- 3 virtual desktops
- 4 Tips
- 5 How do I
- 6 Command line
- 7 batch script
- 8 Office communicator
- 9 IE
- 10 Windows 2012
- 11 Do not
Fixed width fonts in outlook
Use consolas or courier
take a screen shot
To take a screen shot of a particular area
Start Menu -> Snipping Tool
edit files mapped via samba
When Samba mapping is used to edit files on a windows machines that were originally stored on Linux machine, I faced the following problems.
- The executable bit is not set correctly. So, whenever a script is edited and saved on windows, I have to manually "chmod +x" it on Linux machine.
- If a softlink is edited and saved on windows, the changes do not propagate to the original file. Instead, it creates a totally new file with the softlink's name.
last reboot time
tags | when was a windows machine rebooted, check when a windows machine was rebooted. In git bash
systeminfo | grep -i "boot time"
In the Windows run box
cmd /k systeminfo | find /i "boot time"
In windows shell
systeminfo | find /i "boot time"
systeminfo | find "System Boot Time"
Works in Windows 7, Windows 2012.
Press alt+<space>m and then use arrow keys
tested on | windows 10 enterprise
google search | command line shortcut to move windows
- I did not find the symphony chat window when I remoted into my work desktop that had two monitors. I used this shortcut to move the chat window to the active monitor.
Modify the Alt+Tab behavior
Task: Make alt+tab show recent windows first and do not limit the behavior to just the first 6 windows.
Additional notes :
- Once you go to
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorerright click and select New -> DWORD (32-bit) Value. When a new DWORD is created, the default value is set to 0. Right click on the DWORD -> Modify -> Value Data -> 1 . The Base can be left as Hexadecimal.
- short cuts
- undo - ctrl-z
- Redo - ctrl-y
- remove table borders - Alt+hbn
- A comprehensive list of keyboard shortcuts in word 2010 can be found at https://www.veodin.com/keyrocket/word-2010-shortcuts/ . I found the alt+hbn shortcut here.
- Equation editor documentation - http://www.iun.edu/~mathiho/useful/Equation%20Editor%20Shortcut%20Commands.pdf
Terminal emulators in Windows
As of 2015-03-30, I am using Superputty. But here is a list of many terminal emulators I tried before converging onto Superputty.
Pros: very powerful, sessions can be stored, automated login by SSH key authentication Cons: no builtin xserver, can't have more than one terminal in a window. So if you want to connect to multiple machines, you have to open multiple putty sessions
- different putty windows can be placed in a single window
- can import putty sessions
- Upon restart all previous sessions are automatically restored.
- Very easy to run a single command across all the putty connections made via superputty
- Saving new layouts is easy. Restoring a saved layout is just a double click away.
- Has some bugs - Alt+tab and user defined key board shortcuts (ex:- ctrl+left, ctrl+right to do tab switching) etc., stop working all of a sudden. However, this Bug is unreproducible and only happens some of the times.
- Can have multiple putty windows in the same window
- Development seems to be stalled. Latest release 0.2.16 dates back to 2012-12-10
- After closing a session with two tabs containing different putty connections, if I try to restore it, the result is two putty sessions in the same window but one below the other. That is the program does not restore the layout of tabs correctly.
- Can have multiple putty windows in the same window
- Development seems to be stalled. Latest release 2.0.38 dates back to 2013-08-13
- After closing a session with two tabs containing different putty connections, if I try to restore it, the result is two putty sessions in the same window but one below the other. That is the program does not restore the layout of tabs correctly. Moreover, in each putty window of the new session, the putty configuration dialog is displayed instead of automatically logging in to the machine.
- Can have multiple putty windows in the same window
- If a session with multiple tabs is closed, it is not automatically restored.
conemu vs console2
https://aarontgrogg.com/blog/2015/07/31/a-better-windows-command-line-experience-comparing-powercmd-vs-console2-vs-consolez-vs-conemu-vs-cmder/ recommends conemu to console2, consoleZ and PowerCmd
Quickly launch applications
- win+r excel
- win+r notepad
- win+r winword
- win+e will launch the file explorer
- win+r shell:startup - open startup folder in explorer.
Windows shortcut keys
- Ctrl-Shift-Esc - Windows Task Manager
- win+m - minimize all windows, win+M - restore them
- win+shift+<up> - maximize window vertically, win+shift+<down> - restore the window or minimize
- win+<up> - maximize window, win+<down> - restore or minimize
- win+<left>, win+<right> - move window to left or right edges of monitor and maximize vertically
- win+shift+<left>, win+shift+<right> - move windows between monitors
- win+<pause|break> - show system properties
- win+tab - fancy way to switch windows
keyboard shortcuts to control windows
- Alt+Space n - minimize a window
- Alt+Space d - duplicate a window
Working with multiple windows
In Windows 7, multiple windows are grouped per application in the taskbar. For example, all google chrome windows are grouped under one button, all outlook windows are grouped under different button etc., Holding down the <CTRL> key and clicking on the group will bring up the last used window in that group.
tags | control key
- Open a newtab -> click the configuration wheel -> New Tab Controls -> Show your top sites -> uncheck "Include suggested sites"
Q. How to disable window maximization when title bar is dragged all the way to the top of the monitor and cursor touches monitor edge?
A. Control Panel -> Ease of Access Center -> Make the mouse easier to use -> Check Prevent windows from being automatically arranged when moved to the edge of the screen -> Apply -> OK.
Note that checking this box comes with many side effects.
- a maximized window cannot be moved to a different monitor by dragging the titlebar with mouse
- win+left, win+right keys no longer work
So choose your poison.
|Program name||command||shortcut||tested on|
|Windows Task Manager||taskmgr||ctrl-shift-esc||Windows 10 Enterprise|
|Windows Task Manager||taskmgr||ctrl-alt-del -> Start Task Manager||Windows 7 Enterprise|
Download it from https://github.com/git-for-windows/git/releases
Set environment variables
Using the run prompt (windows key + r)
Using the cmd prompt
unset environment variable
To temporarily unset an environment variable
This will remove the variable from the current environment (not permanently).
dump environment variables
user environment variables
reg query HKEY_CURRENT_USER\Environment > user_env_vars.txt
system environment variables
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" > system_env_vars.txt
tested on | windows 7
script - github.com/KamarajuKusumanchi
set up HOME directory
system = windows 7 Enterprise
Control Panel -> System and Security -> System -> Advanced system settings -> Environment Variables
create a new one called HOME and assign it to whatever you like. I normally set this to C:\Users\<username>
See also: https://en.wikipedia.org/wiki/Home_directory gives a list of default home directories per OS.
single line tips
- start . - To start the windows explorer in the current directory
- start /path/to/dir - To start the windows explorer in the directory of interest.
accessing file locally from browser
Linux to Windows
tags | equivalent of foo in windows
|rm -rf "path"||rd /s /q "path"||https://stackoverflow.com/questions/97875/rm-rf-equivalent-for-windows|
send output to file
script.cmd 1> stdout.txt 2> stderr.txt
favorite command prompt configuration
- properties -> Options -> Buffer Size = 999
Maximum allowed is 999
- properties -> Layout -> Height = 9999
Maximum allowed is 9999
formatted date and time
Get the date and time information in YYYYMMDD_HHMMSS format
reboot on remote desktop
- Step 1: win+d - minimizes all windows
- Step 2: Alt-F4 -> Restart
- mstsc.exe - Remote Desktop Connection
extract a page from PDF
Option 1: Use pdftk
Option 2: Use chrom and print those specific page(s) to pdf. Chrome has print to pdf by default.
open the pdf in chrome click on print icon Destination = "Save as PDF" Pages: e.g. 1-5, 8, 11-13 Save
- Launch the On-Screen Keyboard by running 'osk.exe'
- Press Control, Alt on the physical keyboard. Then click the delete key in the On-Screen keyboard.
reorder virtual desktops
Say you have 6 desktops and want to switch 2 and 4.
- Create a 7th desktop, move the contents of the 4th into the 7th, one by one, manually, by hand.
- Move the contents of the 2nd into the 4th.
- Move the contents of the 7th into the 2nd.
- Remove the 7th desktop.
Print %path% one directory per line
will print all directories in the PATH variable but one on each line. Compare this with
which prints all the directories in a single line separated by ';'
tags | pretty print PATH environment variable
How do I
Find out if a dll is 32 bit or 64 bit
Use the file command that comes with "git for windows".
$ file /path/to/foo.dll
It will show PE32 for 32-bit, PE32+ for 64-bit.
Add a directory to windows path
<WIN> + search for "env" -> Edit environment variables for your account
Set the PATH to something like
tags | set windows path
Map network drive
net use x: \\computer_name\share_name [/user:domain\username password] [/p:yes]
 indicates that it is optional.
"/user:domain\username password" - needed only if you want to pass in a different set of credentials.
"/p:yes" - to make the mount permanent across reboots. Use /PERSISTENT if /p does not work.
net use x: /delete
export list of installed software
In the windows command prompt (start -> run -> cmd), run wmic.
In wmic prompt, enter
/output:<output_file_path> product get name,version
/output:C:\users\raju\x\install_list.txt product get name,version
Enter exit to exit out of the wmic prompt.
Ref:- https://helpdeskgeek.com/how-to/generate-a-list-of-installed-programs-in-windows/ - I got all the above information from this page. It is comprehensive but I found it difficult to read as it is full of ads and very verbose in describing all the minute details. So I summarized the steps here.
list odbc drivers installed
start -> search for odbc -> click on 'Microsoft ODBC Administrator' -> Drivers tab
will show all the ODBC drivers installed on your system.
check if a machine is physical or virtual
Try one of the following commands in the CMD window
systeminfo | find "System Model" systeminfo | find "System Manufacturer"
For virtual machines, the output will be something like
System Model: VMware Virtual Platform System Manufacturer: VMware, Inc.
view wireless password
In Windows 10
Control Panel -> Network and Internet -> Network and Sharing Center -> View your active networks -> Connections -> Wi-Fi (SSID) -> General -> Wireless Properties -> Security -> Show characters -> check
cmd redirect output to file
cmd_foo > output.txt
cmd_foo >> output_history.txt
Copy one file to another
"xcopy /y" is like "cp -f"
set PROJECT_ROOT=C:\path\to\project xcopy /y %PROJECT_ROOT%\src\file.txt %PROJECT_ROOT%\dest\file.txt
set a=100 echo %a%
print working directory
echo Current working directory is %cd%
check if variable is defined
$ cat cmd_arg.cmd @echo off set foo=%1 if "%foo%"=="" ( set foo=kama ) set foo
C:\Users\raju\x>cmd_arg.cmd foo=kama C:\Users\raju\x>cmd_arg.cmd raju foo=raju
exit out of the script
$ cat exit_out.cmd @echo off set foo=%1 if "%foo%"=="" ( echo "foo is not defined. Exiting" exit /b ) set foo
C:\Users\monjuu-g\raju\x>exit_out.cmd "foo is not defined. Exiting" C:\Users\monjuu-g\raju\x>exit_out.cmd kama foo=kama
my favorite configuration
- Disable emoticons
Tools -> Options -> General -> Show emoticons in instant messages -> uncheck
Note:- This will disable emoticons just on your side. Other people will still see the emoticons unless they have disabled as above.
|Increase font size||ctrl+]|
|Decrease font size||ctrl+[|
|Change font size||ctrl+shift+f|
Tools (the last icon on the right) -> "Internet Options -> Privacy tab -> check/uncheck "Turn on Pop-up Blocker" -> Apply -> OK
change environment variables
Start menu -> Control Panel -> System -> Advanced system settings -> Environment Variables
- open multiple remote desktop connections - https://support.managed.com/kb/a1816/how-to-enable-disable-multiple-rdp-sessions-in-windows-2012.aspx