I'm at the end of a very long day of dealing with a lot of Oracle B.S. I'll get into that in another post but I hope to save some other poor sap at least some frustration. I was lucky enough to get a nice new i7 at work this week and started migrating over my stuff. Most of the time its a pst here or a folder there. But of course, not Sql Developer. Sql Developer spreads its config over a myriad of xml files in C:\Users\<user>\AppData\Roaming\SQL Developer\systemX.X.X.X. (or C:\Documents and Settings\<user>\Application Data\SQL Developer\systemX.X.X.X in XP). I suppose you could search for all xml files and drop them in their respective folders but I'm not sure it's save and I'm certain it's a total pain in the ass. I tried myself and started with connections.xml which was easy enough but quickly abandoned this when I realized things like the folders for the connections were IN A SEPARATE CONFIG FILE!!! Instead do the following:
- Delete your existing systemY.Y.Y.Y folder from C:\Users\<user>\AppData\Roaming\SQL Developer
- Copy your old systemX.X.X.X into C:\Users\<user>\AppData\Roaming\SQL Developer
- Start up Sql Developer
This time Sql Developer should ask you if you'd like migrate your settings.
Some of the new user access control features drive me nuts. For example I can't stand it when you open a non-user file in notepad, only to get an access denied message when you save it. Yes I know I could start notepad as administrator and browse to the file again. But that kills me every single time. Years ago I used to add notepad to my 'Send to' menu and decided it was time to resurrect that practice.
Adding Notepad to the 'Send to' Menu
- Open Windows Explorer and type shell:sendto in the address bar.
- Click the Windows/Start button and type notepad into the search box.
- Right-click-drag Notepad to your 'Send to' folder and select "create shortcut here".
- In the properties of the short cut, click advanced, and check the 'Run as administrator' box.
Now we've got a quick way to edit a file without browsing to a folder twice. But this got me thinking. It would be nice not to have to copy and paste the path when I need to work in a folder with a command prompt.
Adding Cmd.exe to the 'Send to' Menu and Automatically Change the Path
From the notepad example above, it's pretty obvious that the path is sent as the first parameter to the shortcut command. We can take advantage of that for a new command line shortcut.
- Click the Windows/Start button and type cmd into the search box.
- Right-click-drag cmd.exe to your 'Send to' folder and select "create shortcut here".
- Right-click the shortcut and choose properties.
- Go to the shortcut tab and change the target to C:\Windows\System32\cmd.exe /k cd
- Click advanced, and check the 'Run as administrator' box (optional).
Removing the Drives
The last thing I noticed was that my new and improved 'send to' menu was polluted with all of my network drives and removable drives so searched for a way to take them out and found the answer at winhelponline.com. The answer boils down to:
- Navigating in regedit to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
- Add a Dword Value of 1 with the name NoDrivesInSendToMenu
The result should save me a key stroke or two :)