Microsoft Windows
Local
External
Escaping Quotes on the Command Line
# To escape quotes they need to be doubled up inside of something with quotes:
# At least if you are sending them to unix from ssh
ssh a@b echo """Quoted"" outside of quotes"
Process, creating one detached
I needed to make java run a bunch of long running batch files.
Java kept hanging as the first one ran.
I made a c++ library to do the exec (instead of java's exec).
It still hung.
I found if I call CreateProcess with bInheritHandles set to FALSE, it worked.
NOTE!!! one more thing I did was have this run a bat file which in turn ran
the real batch file I need to have run. See further below for what the batch
file that ran the final batch file looked like.
HANDLE rPipe, wPipe;
SECURITY_ATTRIBUTES secattr;
ZeroMemory(&secattr, sizeof(secattr));
secattr.nLength = sizeof(secattr);
secattr.bInheritHandle = TRUE;
CreatePipe(&rPipe, &wPipe, &secattr, 0);
STARTUPINFO si;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
si.dwFlags = STARTF_USESTDHANDLES;
si.hStdInput = NULL;
si.hStdOutput = wPipe;
si.hStdError = wPipe;
PROCESS_INFORMATION pi;
ZeroMemory(&pi, sizeof(pi));
// Still blocked:
// Fails, it waits for it to exit before continuing:
::CreateProcess(0, cbuf, 0, 0, TRUE, NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, 0, patho, &si, &pi);
// Allowed other stuff to run:
// Works, it spawns and keeps going:
::CreateProcess(0, cbuf, 0, 0, FALSE, NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, 0, patho, &si, &pi);
Batch file that ran the final batch file
@echo off
start "Title Final Batch Files Window Gets" cmd /c finalBatchFile.bat %*
Junctions
In "Windows Vista" and "Windows Server 2008" (which I hear uses the same core as Vista), some things have been
moved around, such as "Documents and Settings". If you look in "Windows Explorer" will see the old name with a
short cut icon next to it, but you will not be able to get info about where it points, you must use dir to see
where it points. It is not actually a shortcut, but instead something called a Junction.
#this doesn't show the Junction:
dir c:\
#this shows it:
dir /a c:\
#here is what the "dir" command shows me for "Documents and Settings"
01/19/2008 07:48 AM Documents and Settings [C:\Users]
Apparently there is a way to make JUNCTIONS using a command 'junction' available from sysinternals.
Reference http://www.hanselman.com/blog/WindowsVistaJunctionsAndMovingMyDocumentsToAnotherDrive.aspx
Time, synchronizing
# to check the time
net time \\machinename
# to correct the time - I think the system slowly makes the time match
net time /set \\machinename
Adding Notepad to send to in Windows Explorer
- Goto
Documents and Settings\%USERNAME%\SendTo
- Put a shortcut to
Notepad.exe there
Disconnecting from a Share
# List the shares:
net use
# Disconnect from a Share
net use /DELETE \\Machinename\sharename
Running a .bat file from c++
UNVERIFIED:
_spawnl( _P_WAIT, "cmd", "cmd", "/c", "c:/zzz-env.bat", 0);
_spawnl( _P_WAIT,
"C:/Program Files/Microsoft Visual Studio 8/Common7/Tools/Bin/Depends.exe",
"C:/Program Files/Microsoft Visual Studio 8/Common7/Tools/Bin/Depends.exe",
0);
Voice Recognition in Vista
{start/open/launch} {[the] internet/surfing/web browser/browsing}
That means you can say "Start the internet", or "Start Internet" because
the "[the]" makes the word "the" optional.
Similarly, I could say "Open the internet" or "Open Internet" because
I have the choice of "Start", "Open", or "Launch" for my verbs.
Area What can you say?
Alternates Panel {1-10} [ok]
Alternates Panel [click] ok
Alternates Panel [click] cancel
Alternates Panel close [that]
Alternates Panel close [alternates] panel
Alternates Panel [I'll] spell it [myself]
Alternates Panel spell {1-10}
On screen items {** ON SCREEN ITEM **}
On screen items {show numbers/number everything/show all [the] numbers/look at numbers/view numbers}
On screen items {clickType}{clickModifier} {** ON SCREEN ITEM **}
On screen items {go to/move to} {** ON SCREEN ITEM **}
On screen items Scroll {** ON SCREEN ITEM **} {up/down/left/right} [{2-20} [times]]
On screen items Scroll {** ON SCREEN ITEM **} {up/down} {{2-20} pages/a page}
DictationPhrase? [Insert [the] phrase] {dictation}
DictationURL [Insert [the] URL] {URL}
Dictation select [the] {previous/last/next} [{1-20}] {letter[s]/character[s]/word[s]/sentence[s]/paragraph[s]}
Dictation select [the] [{1-20}] {previous/last/next} {letter[s]/character[s]/word[s]/sentence[s]/paragraph[s]}
Dictation select to [the] {start/end] of [the] {document/[entire] text}
Dictation select to [the] {start/end] of {word/sentence/paragraph/document}
Dictation select to [the] {top/bottom} [of [the] {document/[entire] text}]
Dictation select [{a/one/[the]entire/current}] {word/sentence/paragraph/document/all [the][text]/[the][entire]text}
Dictation select that
Dictation delete [the entire] [the] {previous/last/next} [{1-20}] {letter[s]/character[s]/word[s]/sentence[s]/paragraph[s]}
Dictation delete [the entire] [the] [{1-20}] {previous/last/next} {letter[s]/character[s]/word[s]/sentence[s]/paragraph[s]}
Dictation delete [the entire] to [the] {start/end] of [the] {document/[entire] text}
Dictation delete [the entire] to [the] {start/end] of {word/sentence/paragraph/document}
Dictation delete [the entire] to [the] {top/bottom} [of [the] {document/[entire] text}]
Dictation delete [the entire] [{a/one/[the]entire/current}] {word/sentence/paragraph/document/all [the][text]/[the][entire]text}
Dictation delete that
Dictation strike that
Dictation undo that
Dictation scratch that
Dictation correct [the] {previous/last/next} [{1-20}] word[s]
Dictation correct [the] [{1-20}] {previous/last/next} word[s]
Dictation correct [the] [current] word
Dictation correct [that]
Dictation spell [the] {previous/last/next} [{1-20}] word
Dictation spell [the] [{1-20}] {previous/last/next} word
Dictation spell [the] [current] word
Dictation add hyphens to [the] {previous/last/next} [{1-20}] word[s]
Dictation add hyphens to that
Dictation remove hyphens to [the] {previous/last/next} [{1-20}] word[s]
Dictation remove hyphens to that
Dictation clear selection
Dictation unselect that
Dictation {go/move} to [the] {start/beginning} of [the] {word/sentence/paragraph/document}
Dictation {go/move} to [the] end of [the] {word/sentence/paragraph/document}
Dictation {go/move} to [the] {top/bottom} [of [the] {document/[the] [entire] text}]
Dictation {go/move} {forward/back} [{1-20}] {letter[s]/character[s]/word[s]/sentence[s]/paragraph[s]}
Dictation {go/move} {before/after/to [the] {start/end} of} {that/[the] selection}
Dictation change [the] {previous/last/next} [{1-20}] {letter[s]/character[s]/word[s]/sentence[s]/paragraph[s]} {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]}
Dictation change [the] [{1-20}] {previous/last/next} {letter[s]/character[s]/word[s]/sentence[s]/paragraph[s]} {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]}
Dictation change to [the] {start/end] of [the] {document/[entire] text} {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]}
Dictation change to [the] {start/end] of {word/sentence/paragraph/document} {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]}
Dictation change to [the] {top/bottom} [of [the] {document/[entire] text}] {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]}
Dictation change [{a/one/[the]entire/current}] {word/sentence/paragraph/document/all [the][text]/[the][entire]text} {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]}
Dictation {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]} [the] {previous/last/next} [{1-20}] {letter[s]/character[s]/word[s]/sentence[s]/paragraph[s]}
Dictation {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]} [the] [{1-20}] {previous/last/next} {letter[s]/character[s]/word[s]/sentence[s]/paragraph[s]}
Dictation {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]} to [the] {start/end] of [the] {document/[entire] text}
Dictation {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]} to [the] {start/end] of {word/sentence/paragraph/document}
Dictation {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]} to [the] {top/bottom} [of [the] {document/[entire] text}]
Dictation {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]} [{a/one/[the]entire/current}] {word/sentence/paragraph/document/all [the][text]/[the][entire]text}
Dictation change [that] to {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]}
Dictation {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]} that
Dictation select [the word] {** PHRASE IN DOCUMENT **} [{through/to} {** PHRASE IN DOCUMENT **}]
Dictation delete [the word] {** PHRASE IN DOCUMENT **}
Dictation correct [the word] {** PHRASE IN DOCUMENT **}
Dictation spell [the word] {** PHRASE IN DOCUMENT **}
Dictation add hyphens to [the word] {** PHRASE IN DOCUMENT **}
Dictation remove hyphens from [the word] {** PHRASE IN DOCUMENT **}
Dictation {go/move} {before/after/to} [the word] {** PHRASE IN DOCUMENT **}
Dictation change [the word] {** PHRASE IN DOCUMENT **} to {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]}
Dictation {lower case/upper case/no cap[s]/all cap[s]/capitalize[d]/cap[s]} [the word] {** PHRASE IN DOCUMENT **}
How Do I how do I [task key words]
Start App {start/open/launch} {pictures/documents/recent documents/music/network places/computer/[the] control panel/[the] recycle bin}
Start App {start/open/launch} {email/calendar/contacts}
Start App {start/open/launch} {[the] internet/surfing/web browser/browsing}
Start App {start/open/launch} {searching/search/[{all/network}] connections}
Start App {start/open/launch} {an application/[the] run [dialog]}
Start App {start/open/launch} {**INSTALLED APPLICATIONS**}
Start/Stop Listening Start Listening
Start/Stop Listening Stop Listening
Mouse grid Mouse grid
Mouse grid Mouse grid [{1-9} [{1-9} [{1-9} [{1-9} … ]]]] [{shift/capital/control/alt} [{shift/control/alt} [{shift/control/alt}]]] {[double] [{left/right}] click/click on/ok/right double click/mark}]
Mouse grid [{1-9} [{1-9} [{1-9} [{1-9} … ]]]] [{shift/capital/control/alt} [{shift/control/alt} [{shift/control/alt}]]] {[double] [{left/right}] click/click on/ok/right double click/mark}]
Mouse grid {shift/capital/control/alt} [{shift/control/alt} [{shift/control/alt}]]] {[double] [{left/right}] click/click on/ok/right double click/mark}
Mouse grid [{shift/capital/control/alt} [{shift/control/alt} [{shift/control/alt}]]] {[double] [{left/right}] click/click on/ok/right double click/mark}] [{1-9} [{1-9} [{1-9} [{1-9} … ]]]]
Mouse grid {undo [that]/scratch [that]/back}
Mouse grid cancel
Start/switch application disambiguation [{choose/number/select/click/I meant}] {1-9}
Start/switch application disambiguation [click] ok
Start/switch application disambiguation [click] cancel
Start/switch application disambiguation close [that]
Start/switch application disambiguation close [pick] [an] [application]
Start/switch application disambiguation {[go] forward/[show] more/[show]next [page]}
Start/switch application disambiguation {[go] back/[show] previous [page]}
Spelling Panel [click] ok
Spelling Panel [click] cancel
Spelling Panel close [that]
Spelling Panel close [spelling] panel
Spelling Panel scroll {left/right}
Spelling Panel {undo [that]/back up}
Spelling Panel {1-99}
Spelling Panel {go to/choose/select} {1-99}
Spelling Panel change {1-99} to {{a-z}/number {0-9}/space/{** MNEMONICS **}}
Spelling Panel {1-99} {{a-z}/number {0-9}/space/{** MNEMONICS **}}
Spelling Panel {delete {1-99}/{1-99} delete/delete [that]}
Spelling Panel insert {{a-z}/number {0-9}/space/{** MNEMONICS **}}
Spelling Panel {spell it again/delete all}
Spelling Panel {correct/scratch/delete} {that/{a-z}/number {0-9}/space/{** MNEMONICS **}}
Spelling Panel {cap/capitalize/uppercase/big} {that/{a-z}/number {0-9}/space/{** MNEMONICS **}}
Spell it {spell it [outloud]/start spelling} {** MNEMONICS **}
Switch App switch to {** RUNNING APPS **}
Switch App switch application
Typing {press [key]/type} [{** KEYBOARD MODIFIER **}] {** KEY **}
Typing {press [key]/type} [{** KEYBOARD MODIFIER **}] {** KEY **} {2-20} times
Typing {press [key]/type} [{** KEYBOARD MODIFIER **}] {** KEY **} [[{** KEYBOARD MODIFIER **}] {** KEY **} [[{** KEYBOARD MODIFIER **}] {** KEY **} …]]
Typing {start typing/start pressing keys}
Typing Mode [{** KEYBOARD MODIFIER **}] {** KEY **}
Typing Mode [{** KEYBOARD MODIFIER **}] {** KEY **} {2-20} times
Typing Mode [{** KEYBOARD MODIFIER **}] {** KEY **} [[{** KEYBOARD MODIFIER **}] {** KEY **} [[{** KEYBOARD MODIFIER **}] {** KEY **} …]]
Typing Mode {stop typing/stop pressing keys}
Typing Scroll {up/down/left/right} [{1-20} [{times/pages}]]
Typing {go/move} {up/down/left/right} [{1-20}] [{times/lines}]
Typing backspace
Typing caps lock
Typing all caps
Typing delete
Typing end
Typing enter
Typing escape
Typing home
Typing num lock
Typing page up
Typing page down
Typing space
Typing [show] start [menu]
Typing [show] [context] menu
Typing [show] right click menu
Typing switch to next window
Typing {minimize/collapse} all windows
Typing {go to/switch to/show} desktop
Typing open computer
Typing run [application]
Typing [open] search
Typing {open/show} system properties
Typing {maximize/restore} all windows
Typing search for computers
Typing click start
Typing cancel [that]
Typing {move/go} to [the] {start/beginning/end} of [the] line
Typing cut [that]
Typing copy [that]
Typing paste [that]
Typing undo [that]
Typing scratch [that]
Typing redo [that]
Typing {move/go} to [the] {start/beginning/top/end/bottom} of [the] document
UI show speech [recognition] options
UI {minimize/hide} speech [recognition]
UI move speech recognition to [the] {top/bottom}
UI move speech recognition
UI {what can I say / show reference card}
UI {open/show/maximize/restore} speech [recognition]
UI {open/launch/start} speech dictationary
Windows restore {that/window/{** RUNNING APP TITLE **}}
Windows maximize {that/window/{** RUNNING APP TITLE **}}
Windows minimize {that/window/{** RUNNING APP TITLE **}}
Windows close {that/window/{** RUNNING APP TITLE **}}
In addition, it might be interesting to know what {** KEY **} means. Here are all of those:
{a-z}
{0-9}
number {0-9}
ampersand
and
apostrophe
asterisk
at
at sign
backslash
begin double quote
begin double quotes
begin quote
begin quotes
begin single quote
caret
cent
cent sign
close angle bracket
close angle bracket
close brace
close bracket
close curly bracket
close double quote
close double quotes
close paren
close parenthesis
close quote
close quotes
close single quote
close square bracket
colon
comma
copyright
copyright sign
curly bracket
dash
degree
degree sign
divide
divide sign
division sign
dollar
dollar sign
dollars
dot
double quote
double quotes
end double quote
end double quotes
end quote
end quotes
end single quote
equal
equal sign
equals
equals sign
euro
euro sign
exclamation mark
exclamation point
forward slash
general currency
general currency sign
greater than
greater than
happy face
hash
hash mark
hash sign
hyphen
international currency
international currency sign
left angle bracket
left brace
left braket
left curly bracket
left paren
left parenthesis
left square bracket
less than
minus
number
number sign
open angle bracket
open brace
open bracket
open curly bracket
open double quote
open double quotes
open paren
open parenthesis
open quote
open quotes
open single quote
open square bracket
paren
parenthesis
per mille
per thousand
percent sign
period
pipe
plus
plus sign
point
pound
pound sign
pound sterling
pounds
question mark
quote
registered
registered sign
right angle bracket
right brace
right bracket
right curly bracket
right paren
right parenthesis
right square bracket
sad face
section
section sign
semicolon
sharp
sharp sign
single quote
slash
smiley
smiley face
space
star
sterling
sterling sign
tilde
times
underscore
unhappy face
whack
winky face
yen
yen sign
Update Checklist
Main Things
- Note Email Connection Parameters
- Set email to not leave backups on the server
- Disconnect email service
- Backup email data
- Preserve iTunes Username
- Unregister iTunes
- Preserve All Music Files
- Save browser links
- Game history (like for Sherlock)
Other Things
- Apache Server
- cygwin bin files
- Preserve Files
- Subversion
- Xfer Files