How do I set "default App" for a file extension to an ".exe" on Windows 10 after April 2018 update - windows

I have spent a very long time researching this. Most of the solutions were posted PRIOR to April 2018, and involved working your way through the "settings" to get to "Choose default Apps by file type".
Choose default Apps by file type
In previous attempts to assign an app to ".rex" I managed to assign it to Notepad. (At that time, I could not find any way to find an ".exe" on my C: drive.)
So as you can see, if you click on Notepad next to the .rex extension, the only option is to go to the "App store".
And as expected, if you click on App store, nothing is found...
App store - no app's found.
So from what I've read in multiple forums, PRIOR to April 2018, Windows 10 still had a way to "browse your hard drive" to find an ".exe". (Just like in older Windows versions.) After some update in April 2018, that capability no longer exists.
In the POST April 2018, has anyone found a way to assign a file extension to an ".exe" on the hard drive???

I think this question would be more suitable for SuperUser (well, unless you want to do it via a program :) ).
Anyway, here's a way of doing things from console (Cmd). I've tried it 1 or 2 years ago, I just tried it now, so it works regardless of Win (10) version.
Start the process from scratch:
Open a Command Prompt window. Create a new file that the OS doesn't know anything about. I chose the extension .zzz:
e:\Work\Dev\StackOverflow\q052008516>ver
Microsoft Windows [Version 10.0.17134.228]
e:\Work\Dev\StackOverflow\q052008516>dir /b
e:\Work\Dev\StackOverflow\q052008516>:: Create a dummy .zzz file
e:\Work\Dev\StackOverflow\q052008516>echo Some dummy text>file.zzz
e:\Work\Dev\StackOverflow\q052008516>dir /b
file.zzz
Try opening the file (DblClick) from a file browser (it's not relevant, but I use Total Commander), or by typing its name in Cmd. That will yield the dreaded dialog:
Create a new file type and associate our extension with it. [MS.Learn]: assoc utility is used to do the job. First, check if such association doesn't already exist:
e:\Work\Dev\StackOverflow\q052008516>:: No output means no association
e:\Work\Dev\StackOverflow\q052008516>assoc | findstr ".zzz"
e:\Work\Dev\StackOverflow\q052008516>:: Same command for a different extension
e:\Work\Dev\StackOverflow\q052008516>assoc | findstr ".txt"
.dic=txtfile
.exc=txtfile
.log=txtfile
.scp=txtfile
.txt=txtfile
.wtx=txtfile
e:\Work\Dev\StackOverflow\q052008516>:: Create a new FileType (ZZZFile) and associate our extension with it
e:\Work\Dev\StackOverflow\q052008516>assoc .zzz=ZZZFile
.zzz=ZZZFile
e:\Work\Dev\StackOverflow\q052008516>assoc | findstr ".zzz"
.zzz=ZZZFile
No change when trying to open the file.
Associate the file type (ZZZFile, from previous step) with a command. Use the [MS.Learn]: ftype tool for the task. Again, check if the file type is not already associated (this only makes sense if the file type existed before previous step):
e:\Work\Dev\StackOverflow\q052008516>:: As usual, no output means no association
e:\Work\Dev\StackOverflow\q052008516>ftype | findstr ZZZFile
e:\Work\Dev\StackOverflow\q052008516>:: Same thing for txtfile
e:\Work\Dev\StackOverflow\q052008516>ftype | findstr txtfile
txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1
e:\Work\Dev\StackOverflow\q052008516>:: Associate ZZZFile with notepad
e:\Work\Dev\StackOverflow\q052008516>ftype ZZZFile=%SystemRoot%\system32\notepad.exe %1
ZZZFile=C:\WINDOWS\system32\notepad.exe %1
e:\Work\Dev\StackOverflow\q052008516>ftype | findstr ZZZFile
ZZZFile=C:\WINDOWS\system32\notepad.exe %1
Try opening the file again (from Cmd), and voilà:
Summary:
In order to open with Notepad files having .zzz extension, there are only 2 commands that need to be remembered from this whole (and pretty long) answer:
assoc .zzz=ZZZFile
ftype ZZZFile=%SystemRoot%\system32\notepad.exe %1
Notes:
My user has (super) administrative privileges, but I guess they shouldn't impact differently depending where the action is performed from (Cmd or UI (if possible)), in other words users that don't have the required privileges, won't be able to do it, no matter what they would try
Apparently, there is a (pretty dark) nebula on this topic, that my knowledge wasn't yet able to "decipher". In my example, I constantly compare the .zzz results to .txt. Yet a big surprise: Notepad++ and not Notepad is used to open txtfile (.txt only), in spite of the above output
Update #0
I did a little more digging on the .txt mystery. Facts:
FType shows Notepad as opening program
It is actually opened by Notepad++ (in Cmd and PS)
In Choose default apps by file type, Notepad++ is shown
So apparently, it's more than meets the eye (over the years, I got used to MS's way of doing things which in some cases seems to be (but maybe it's me who didn't have all the pieces) illogical).
I've also found out many resources like:
[MS.Technet.Blogs]: Windows 10 – How to configure file associations for IT Pros? which mentions the command:
dism /online /export-defaultappassociations:"file.txt"
[XDADevelopers]: Programatically set default file associations which mentions the reg keys:
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\${EXT}
HKCR\${EXT}
I couldn't find anywhere a clear algorithm of how an executable is chosen to run a file with a certain extension. I can think that the 2 keys above are queried, but I'm 100% sure there's more. Not to mention that I've ran into an even stranger problem (for a regular user on my Win 10), for .py files:
FType (and Assoc) reported everything as above
In Choose default apps by file type, Python was shown (just like in my Super Admin user's case)
Attempting to run the file from Cmd, yielded the dialog at the beginning
It worked from PS
Sadly, I selected Python from the dialog, before taking a look at the registry keys (and now it works), so I can't do any more debugging (and also, switching users is annoying).
Might be related:
[SuperUser]: Windows 10 won't let me set default apps for file extensions
[SuperUser]: Can't change Windows 10 default file type association
[SuperUser]: SSMS wont give up file associations

Related

Why does ShellExecuteEx with verb "print" take LNK file settings of an app into account?

Context
I have a Windows app printing PDF files by forwarding the file paths to ShellExecuteEx and the verb print. Adobe Reader is installed and registered for that verb. Reader by default creates a LNK shortcut file in the start menu:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Adobe Acrobat DC.lnk
Hide windows
By default, reader shows a GUI window when printing a PDF. Some customer doesn't want that window and simply tried to "hide" it by changing the LNK file content using Windows Explorer properties to at least minimize the windows by default. That customer didn't know if that works or not, one simply tried.
To my surprise this worked, changing the minimize vs. non-minimize/default setting of the LNK file made the reader windows being visible or minimized.
No changes in registry
I've searched the registry for changed settings regarding the print verb, but couldn't find any. The new setting really seemed to be only stored within the LNK file:
The registry contained references to the actual EXE only, not the LNK file. Pretty much like expected, I've never came across any shell verb registration using LNK files at all.
"C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe" /p /h "%1"
Though, all invocations of the verb print seemed to recognize that setting, either manually using the context menu of some PDF in Windows Explorer or executing things on the shell:
powershell -Command "Start-Process -Verb print '\\?\C:\[...].pdf'"
Why is that important?
Adobe Reader provides the command line argument /h to minimize itself as well, but using that doesn't fully hide a window at all. Instead, a window is shown for a second or so and afterwards minimized, e.g. like Adobe is doing that itself. OTOH, with the changed LNK file things are different: Either really now window is shown at all or only some artifacts like the window title or alike for less than a second.
It really seems that the difference is between Adobe doing something on it own after it has loaded and stuff vs. Windows itself creating the minimized window already.
Additionally, if possible at all I would like to avoid customers needing to change the LNK file themself. The problem with that change is that it's not tied to the print verb only, but whenever Adobe Reader gets opened. And sometimes customers really need to have a look at PDFs themself instead of automatic printing only.
So, how does that work?
Is Windows itself using the setting of that LNK file or is this something implemented by Adobe Reader?
Using ProcMon, I couldn't find any hint about that Adobe Reader itself reads the LNK file. As well, I couldn't find this behaviour documented in the topics about shell verbs, ShellExecuteEx etc. It's totally unexpected to me, as the LNK file is some arbitrary file in theory, which might not exist at all, can be named as one likes, even multiple of those could exist in theory starting different apps of some package or the same app with different arguments etc.
Thanks for any insights.

Searching for Command Prompt Parameters?

Is there anyway to search command prompt parameters in a general sense. Or are we hostage to the documentation of such programs? For example in the command prompt I type explorer or notepad... but if I put the first parameter as a file path it will open that file path for me... how am I supposed to know this parameter input exists and perhaps there is a bunch of other parameter fields I am unaware of. Is there anyway to search program parameters systematically?
In Windows programs are responsible for processing their own command line parameters, and they can do so in any way they please. (It is common to hand off tokenization to the C runtime library, but not mandatory.)
This gives the programmer maximum flexibility, but does mean that if the programmer has not documented the command line there is no straightforward way to reverse engineer it after the fact.
(UNIX isn't very much different; the tokenization is handled by the shell, but the rest of the processing is the applications responsibility. In VMS, by contrast, the entire command-line processing is handled by the shell, based on syntax information that must be embedded in the application.)
It is conventional for an application to provide a command-line syntax summary in response to one or more of the following options:
application /?
application -?
application /help
application -help
application --?
application --help
(Arranged approximately from most-common to least-common; the variants with two hyphens are usually only found in software that has been ported from UNIX.)
I haven't looked for actual statistics, but my impression is that the majority of command-line applications (perhaps 80% or more) do provide such a summary. It is less common for GUI applications.
Failing that, you can sometimes find command-line options by looking for strings in the executable file. Microsoft provides a utility that does this, strings.exe, downloadable from their web site. (Of course, knowing the existence of a possible command-line option doesn't necessarily mean you'll be able to figure out what it does!)
If you have access to the source code, or are skilled at disassembly, that may provide another option if you are desperate enough.
No. Though you can always try programname /?.
Notepad takes a single filename only OR takes /p filename ... (you can see the command in txtfiles print entry in the registry).
Here's something from Windows 98 Explorer's it still the same.
Explorer
explorer [/n] [/e][,/root,object][[,/select],subobject]
None Explorer rooted at the Desktop
/n Opens a new window.
/e Explorer View (default if nothing else is on the command line.)
/root,object Starts Explorer with object the top item (normally Desktop is the top item). Eg: explorer /e,/root,c:\Starts Explorer with the C drive as the only drive available.
/select,subobject Selects the specified subobject.
Replaceable parameters are %1 (one) which is the short file or folder name and %l (L) which is the long file name.
/IDLIST
This is an additional parameter that means a Windows internal structure is being passed. eg:
Explorer.exe /e,/idlist,%I
The %I is a replacable parameter representing an IDLIST.
Rooted Views
To open an explorer item that starts with a special folder as the top folder use the following syntax.
Where the special folder is a sub folder of the desktop
explorer /e,root,::{CLSID of special folder}
Where the special folder is a sub folder of another special folder (usually, if not always My Computer)
explorer /e,root,::{CLSID of parent}/::{CLSID of special folder}
Where the special folder is part of the file system
explorer /e,root,path to folder
See Namespaces on the Icons Page for a list of CLSIDs for special folders.
Examples
Note that /select is inconsistent. Sometime the / is required, sometimes it should be left out, and sometimes it doesn't matter.
Starts explorer with the Windows folder opened and selected.
explorer /e,select,c:\windows
Starts explorer with Windows the top level folder and command opened and selected.
explorer /e,/root,c:\windows,select,c:\windows\command
Starts explorer with Windows the top level folder and Tips.txt showing instead of the file listing.
explorer /e,/root,c:\windows,select,c:\windows\tips.txt
Starts explorer with My Computer the top level folder and all branches except for drives collapsed.
explorer /e,/root,::{20d04fe0-3aea-1069-a2d8-08002b30309d}
Starts explorer with C:\ the top level folder.
explorer /e,/root,c:\
Starts the Dial Up Networking folder in folder view.
explorer.exe ::{20d04fe0-3aea-1069-a2d8-08002b30309d}\::{992cffa0-f557-101a-88ec-00dd010ccc48}

FTYPE/ASSOC priority and adding to OpenWithList from the command line

(Not sure if this belongs on superusers, but it seems there is a cmd.exe tag here, so here goes...)
As background, I'm working on a Firefox add-on (This question does not require knowledge of Firefox, btw, as Firefox add-ons can call the command line.) The add-on aims to build different kinds of shortcuts to cmd.exe (especially for the sake of my project https://github.com/brettz9/webappfind which allows files to be opened directly from the desktop into web apps).
Anyways, I'd like to give users the option to associate these shortcuts:
As the default handler for specific file extensions or file types.
To show up within the Open With list of applications (even if the user opts not to make the apps as default handlers)
As far as the default handling, I have found the ftype and assoc (and associate) commands, but I have read that user selections will override their behavior. Is there some way to ensure that I can get priority from the command line in associating file extensions to types and specific executables (until the user changes it again), or if it is not possible, then at least through C++ or the like?
As far as the Open With list:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\<file extension>\OpenWithList
...in my testing (with an exe), this command:
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.svg\OpenWithList /v d /d D:\wamp\www\webappfind\cplusplus\WebAppFinder-view-mode-Firefox.exe
...did cause the exe file to show up in:
reg query HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.svg\OpenWithList
...but it did not show up when I subsequently right-clicked a file with the ".svg" extension.
I would really appreciate any help with these two points.
REGEDIT4
[HKEY_CURRENT_USER\Software\Classes\Applications\MYFOO.exe\shell\open\command]
#="\"C:\\MYFOO.exe\" \"%1\""
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.myfoo]
"Application"="MYFOO.EXE"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.myfoo\OpenWithList]
"a"="MYFOO.EXE"
"MRUList"="a"
So I got to an investigation what makes those file associations. It appears that you have to create a mapping from the bare EXE name to the full path as shown in the first two long-ish lines. Then you must only use the EXE name in the .extension branch. Setting the .extension's Application value will give you your default app instantly. Remember, only use APP.EXE, its full path must be defined as above. This was your main error. The "%1" part allows you to customize the parameters of your program so that it doesn't have to be just the opened document in quotes, as shown here. The backslashes are just escape characters for Regedit, you may discard them as you see fit.
The OpenWithList is tricky in the sense that there are letters for entries and just a blind write may overwrite some of the user's favorite apps. One approach would be to call your item "z" to lower the probability of overwriting. The right way would be enumerating the key and giving your app the first free letter. The MRUList is not essential, although it should have each used letter once and yours bumped to the start.
Note about user friendliness: Explorer will cache these values until next reboot. Make sure you update the registry and place exe first and create your file later. Although the caching only fully influences the display of the file and when it is run, the registry is read again and it will execute as you want.
TIP: If you decide to use Regedit instead of reg, the /s parameter skips the confirmation message and applies the values right away. Make sure you use double backslashes in the full path as shown. When preparing your temporary .reg file, make sure you append two CRLF's to the end or a glitch may cause your last line of code to be ignored. This sample starts with REGEDIT4 which signifies an ANSI file. If you need support for Unicode in your app path, you'll have to start the file with Windows Registry Editor Version 5.00 and store it in UTF16. This is already a superior solution to calling reg because there's no way you could get CMD.EXE to process special UTF stuff through the command line without mangling.

How to change the path for "run command" "notepad"?

Where is in the registry the path executed when I run the "notepad" command in windows "Start->run command" interface? I want to change it for notepad++ (it is required so, although could look not really good)
If you are like me you use windows run command all the time. I hate using the mouse to point and click a shortcut on the start menu. WIN-R are probably the two most over used keys on my keyboard. After thinking about if awhile I hunted down how the run command works. It turns out that it makes a call to ShellExecute, which I guess is not too surprising. The next thing I wanted to find out was exactly how the commands are resolved. The following is an ordered list of how they are resolved ([1]):
The current working directory
The Windows directory (no subdirectories are searched)
The Windows\System32 directory
Directories listed in the PATH environment variable
The App Paths registry key
Naturally the next thing I wanted to do was customize existing commands or add new commands so I do not have to type as much (standard lazy approach). After examining my options which were to put the executable in one of those paths (since it only locates executables and not shortcuts), modify the path environment variable or add a key to App Paths. The App Paths option seems to be the easiest and most flexible to me. Here is a layout of what you need to do to add an App Paths entry ([1]):
HKEY_LOCAL_MACHINE-->
SOFTWARE-->
Microsoft-->
Windows-->
CurrentVersion==>
App Paths-->
file.exe-->
(Default) = The fully-qualified path and file name
Path = A semicolon-separated list of directories
DropTarget = {CLSID}
Disclaimer: Modifying the registry can cause serious problems that may require you to reinstall your operating system. I cannot guarantee that problems resulting from modifications to the registry can be solved. Use the information provided at your own risk.
The minimum needed to add a new entry is to add the key file.exe where file is the string you want to type into the run command and to add the Default entry which is the fully-qualified path to the file you want to execute. Note that even it the file you are going to reference isn't an exe file you still need to put the .exe on the key. Here is a sample registry file that I created to add a shorter keyword for Internet Explorer:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\ie.exe] #="C:\Program Files\Internet Explorer\iexplore.exe"
After entering that entry into the registry I can simply type “ie” at
the run command to open internet explorer.
Here is a list of some common commands I use at the run command:
cmd – Command prompt winword – Microsoft Word excel – Microsoft Excel
outlook – Microsoft Outlook iexplore – Internet Explorer firefox –
Mozilla Firefox notepad – Notepad compmgmt.msc – Computer Management
Console control appwiz.cpl – Add/Remove programs dialog mstsc –
Microsoft Terminal Service Client regedit – Registry Editor
…
If there is some program that I find myself using all the time I figure out what the run command is for it and if there is not a short easy one I add one to my App Paths as described above. Does anyone else have some other common run commands they use?

As a developer, what changes do you make to a vanilla Windows install?

When I get a vanilla Windows system, there's a bunch of stuff I change to make it more developer-friendly.
Some of it I remember every time, other stuff I only do as and when.
Examples:
Show extensions of all file types
Make hidden and system file visible
Turn off Windows Defender
I seem to remember a blog post from Jeff on this topic, but can't locate it!
What else do you do, and do you have any tools that automate this process?
Indeed I do the above, plus deactivating Zip support (regsvr32 /u zipfldr.dll), activating the underscore on Alt shortcuts (Advanced Appearance), replacing Courier New by Andale Mono (replace with your favorite font) in all program settings (after installing it, of course), installing my favorite utilities (UnxUtils, Sysinternals', SciTE, FileMenu Tools which has Command line here and lot of other goodies, etc.) and so on.
Oh, and indeed also deactivate dual keyboard support (French/English), deactivate task grouping, install VirtuaWin (4 desktops), CLCL (clipboard manager), AutoHotkey and my favorite macros, and lot of other freewares, more or less must have.
No automation, alas.
I install Cygwin to have *nix command line tools and Xemacs to have a useful editor.
I install:
The usual suspects: Visual Studio, Sql Management Studio, Firefox, Chrome, etc...
Paint.Net
Notepad++
Launchy
The first thing I do is open a command prompt and then open the properties for it:
Switch on Quick Edit. Why is this off by default?
Increase the window size. Why limit it to the size of a postage stamp?
Increase the vertical buffer to the maximum possible. Why limit it to a few hundred lines?
Change the foreground colour to white instead of grey. Why make it less readable than it could be?
In summary: WHY?
Using the Add\Remove Windows Components in Control Panel, I always remove...
Games
Document Templates
MSN Explorer
Outlook Express
For the look and feel I...
Revert to the classic start menu; however, if it's Vista, I leave it as is because I like the indexed search feature.
Revert to a classic desktop with large icons and make sure that My Computer is the first icon (versus My Documents)
I also perform the things you mentioned above
Before installing any software I...
Install any outstanding Windows updates
Run a Disk Clean Up
Run Disk Defrag
Setup scheduled tasks for Clean Up, Defrag, and other personal tools
For tools (outside of my IDEs and other necessary development tools), I install..
TweakUI
IE6, IE7, Safari, Chrome, Opera, and Firefox
Install the set of Firefox plug-ins I always use for development
'Open Command Prompt Here' shell extension
Install Consolas and set it as the default font for my editors (IDEs, Notepad++, etc)
I wipe it and install Linux. Everyone is always amazed by how productive I can be. It's because I don't spend half my time fighting with the machine.
Install Consolas font and turn on (and tune) ClearType.
Install ZoomIt to magnify display during presentations.
Install FireFox/Firebug
Install XYplorer Win Explorer alternative (can't live without it!)
Install DeskPins to be able to make any Window temporarily topmost.
Make sure OneNote got installed with Office.
Install Visio.
Install favorite editor (whatever it is at the time, currently SCiTE).
Install 7Zip.
Fix Windows colors to suit me and put picture of RatPack (Dean's my hero) as wallpaper.
Disable shortcuts to FilterKeys, StickyKeys, and ToggleKeys - nothing frustrates me more than having to deal with that cruddy feature because I push the shift key down several times while I'm thinking or hold it down for eight seconds (again, while thinking) before I start typing!
Change the default action for Folder to explore instead of open.
over the years i have arrived to the decision that i do as little customization as possible since workplaces change and computers change (both at home and at work).
i used to do all kinds of crazy tweaks with litestep, setting up partitions, etc. these days i pare it down to the basics, and it does not take me long to setup a machine and have a familiar environment.
in addition to the usual "win32dev" setup (classic scheme, optimized for performance, no special effects, show all files, details in explorer views, blue background, etc) i have the following stack:
cygwin (gcc, vim, curl, wget, perl/ruby/python, svn, git, ssh, netcat, etc; rxvt for terminal)
ffox + adblock + dev plugins
clipx for simple stack-like clipboard with previews
textpad + a few basics syntax highlighters
virtuawin - the only minimal window manager that does all i need and nothing more
autoHotKey for basic app shortcuts
procexp to replace task manager
all other sysinternals tools
tortoise svn
putty + agent + keys
7zip
keepass
wireshark
everything i install by hand goes into c:\programs (for easy no-space, lowercase paths).
Regarding:
Show extensions of all file types
Make hidden and system file visible
I don't like making hidden files visible all the time (it makes two desktop.ini visible on my windows Vista desktop for starters) so I use an explorer extension to make it easy to toggle this on and off. There's also a corresponding one for file extensions:
HiddenFilesToggle Context-Menu Shell Extension
FileExtensionToggle Context-Menu Shell Extension
Command line scripts
For storing scripts that I use from the command line I create a Command Line Scripts directory under Program Files and add it to the PATH environment variable. I use the following batch file for listing and editing those scripts:
#echo off
setlocal
set UTILPATH=C:\Program Files\System Tools\Command Line Utilities
if not "x%1"=="x" (
start "" "notepad" "%UTILPATH%\%1.bat"
) else (
dir /b "%UTILPATH%" | grep -v com.bat | grep -P "(exe|bat|cmd)" | sed "s/\.\(exe\|bat\|cmd\)//"
echo.
)
(note that the filtering of the directory listing depends on some unix commands I have installed via Cygwin)
I give it the name com.bat, (short for command) then I can:
list the scripts in that directory by typing com at the command prompt
edit any script in the list by typing com script-name at the command prompt*, similarly:
create new scripts in that directory by typeing com new-script-name at the command prompt*
and if I ever need to edit com.bat I just type com com
* As I'm running Vista I have to use an elevated command prompt as directories under Program Files are protected.
For a quick way to launch an elevated command prompt, simply press the Win key; type cmd; press Ctrl+Shift+Enter; and then hit Alt+C to confirm the elevation prompt. Six keystrokes to an elevated command prompt! ([via][4])
Startup Script
One of the scripts I store in my Command Line Scripts directory is a script that is run when I log in to windows (via the Task Scheduler, type Task in the Vista start menu). I use that script to set up several virtual drives using the subst command to directories I access frequently or want a quick way to access on the command prompt or for shortening path names in compiler warnings, logs or debug output.
My Startup script looks something like this:
#setlocal
#set _MYDOCS_=%USERPROFILE%\Documents
#REM Note: first delete the drives so I can run script again
#REM to fix drives that failed to get mapped
subst /d W:
subst /d T:
subst /d S:
subst /d R:
subst /d N:
subst /d L:
subst /d H:
subst W: "%_MYDOCS_%\Work\SVN Working Copy\Website\trunk\www"
subst T: "%_MYDOCS_%\Work\SVN Working Copy\project 1\trunk"
subst S: "%_MYDOCS_%\Work\SVN Working Copy"
subst R: "%_MYDOCS_%\Work\SVN Working Copy\project 2\branches\12.50"
subst N: "%_MYDOCS_%\Work\SVN Working Copy\project 2\trunk"
subst L: "%_MYDOCS_%\Work\"
subst H: "%_MYDOCS_%\My Projects\Haslers.info\Working Copy"
Note that subst can be a little temperamental and occasionally the drives don't get created and I have to run the startup script again manually.
I'm surprised nobody has mentioned ClipX. I find that I can't develop without this clipboard history tool.
Step 1: Fix windows
Turn off System Restore
Turn off Windows Defender
Uninstall any OEM-supplied antivirus or other crapware if it's an OEM box
Get SysInternals AutoRuns and lay the smackdown to all the 8000 useless startup items and services vista inflicts upon you, including the slow and useless vista search indexing service.
Step 2: Install stuff.
Now that my shiny new Core 2 Duo PC isn't bogged down with useless crap running like a 386, I can build it up again
Install Firefox
Install FlashPlayer firefox plugin (why oh why isn't this bundled with FF?)
Run windows update and let it do it's download/reboot cycle 50 times until it's happy
While this is happening I can use firefox to browse stackoverflow and read reddit :-)
Get UnixUtils and either unzip them to system32, or otherwise make sure they are in the path.
This is neccessary because I can't stand cygwin, yet my muscle memory keeps typing ls when I try to type dir, and windows still hasn't heard of grep yet
Install Droid Sans Mono and Monaco fonts for programming
Install E-TextEditor
If I'm installing visual studio, do that. If not install the .NET framework runtime instead
Install Firefox addons (firebug, fission, web developer, adblock)
I add Wordpad to the Send To context menu. Instructions for XP here. Works in Vista, as well.
Someone gave me a 'Delete all SVN folders' registry script - that is a must have for me, now (it's somewhere on this thread).
I leave UAC on - last thing I want is to write code that works with UAC off, but fails miserably with it on. Before I started to use Virtual PC to set up test environments for my code, I tried to leave my desktop as 'vanilla' as possible - I wanted to test under conditions reasonably similar to an everyday non-developer user.
All of the above is for my home development system. I try to do the same at work, within reason. Except for the SVN stuff, because we use TFS at my office.
I always install the following to make it easier to manage and interact with windows
Taskix - Reorder buttons in your Windows taskbar
KatMouse - scroll the window directly beneath the mouse cursor
WinSplit Revolution - organize your windows by tiling, resizing and positioning them
allSnap - windows automatically snap to window edges and (optionally) the edges of other windows
I like to:
Make the taskbar larger so that it can hold two rows of applications
Disable personalized menus in the start menu
Disable grouping of similar taskbar items
I also randomly open a lot of PuTTY sessions to various machines, so I like to create a "bin" directory in my home folder, add it to the PATH, and then create a shortcut to PuTTY in it named "p" (among other shortcuts). I can then easily Windows-R (run) and type p [putty-session-name] to open the session. This has saved me tons of time / mouse clicks.
I follow the extensive recipe for making a Windows system useful built and maintained by Simon Peyton Jones.
Turn off Autorun so that I'm not accidentally installing malware or crapware.
Here's a couple of links, out of many:
http://antivirus.about.com/od/securitytips/ht/autorun.htm
http://news.cnet.com/8301-13554_3-9894970-33.html?tag=mncol;txt
Couple of things no-one else mentioned
Install Console2 for tabbed cmd windows
Install Powershell
Completely replace Notepad with Notepad2
Install the full IIS.
Set the resolution high enough.
Set the background to Grey.
Show hidden and system files.
Toolbar 2 or 3 high (I run one monitor sideways).
Always show file extentions.
I install some set of *nix command utilities and process explorer at a bare minimum.
Also, on XP systems I disable any theming and use the windows classic coloration. Vista just doesn't look or work right without the Aero theme so I can't do that on Vista without going almost completely nuts.
Also forgot, I install Chrome. (Used to be Firefox but Chrome is nicer out of the box)
I use nLite to prepare the windows installation disk in order to have some typical settings already set right after the installation.
For example:
Explorer-Associate additional file types with Notepad
Explorer-Classic Control Panel
Explorer-Disable Beep on errors
Explorer-Disable Prefix: Shortcut to
Explorer-Show extensions of known file-types
Explorer-Show hidden files and folders
Explorer-Show the full path in the Title Bar
Performance-Disable Info Tips on Files and Folders
Performance-Disable Last accessed Timestamp on files
Taskbar-Disable Group similar Taskbar buttons
Taskbar-Disable Language-Bar
Taskbar-Lock the Taskbar-Yes
You can also remove useless parts of the system:
Accessibility Options
Briefcase
ClipBook Viewer
I install all of the shell extensions I normally use (TortoiseSVN and CommandHere for example).
Also, one of the first things I do after I reimage a machine is make sure it's hooked to all of my network shares properly. Few things derail my work as quickly as having to fight with the network to get a file at an inopportune time.
Install emacs + a selection of gnuwin32 packages.
Also proexp to replace task manager.
Edi Weitz has a nice writeup of his customizations: Making Windows usable for old Linux farts
Switch to classic menu
Increase the taskbar hight to have more shortcuts & lock the taskbar
Performance options -> Adjust for best performance
Copy all the backed up shortcuts files to Favorites folder
Install necessary software (JDK, DBMS stuff, Editplus, MS Office etc.)
Driver for soundcard
New network connection for Broadband ...
I generally leave Windows Defender online but I don't use an antivirus so....
I set my start menu to display small icons and to have no "most recently used programs" active. Instead I pin everything to my start menu:
My start menu http://www.robpaveza.net/pub/startmenu.png
I also make sure that all the extension menus are actual menus, not just links, and that my computer and user files icons are shown on the desktop.
I download and install Cygwin and Xming.
Wow, this is a really good thread... I'm going to have to go through all the suggestions and see what I'm mission out on :)
Off the bat, I install:
Google Chrome
Visual Studio 2008
aShampoo CD Burning suite (or whatever my current favorite burning suite is)
IZArc (or whatever my current favorite is)
RocketDock - I use it to replace Quick Launch.
Songbird
When I used XP (I'm on Vista now) I'd always install Tweak UI and tweak everything to my liking. Like listing My Computer before My Documents.
I remove the Help icon from the start menu.
I make it so Network Neighborhood was displayed in the start menu.
I have it show file extensions and show hidden files/folders.

Resources