Download Vista 32 and 64 bit

So did your OEM vista didn’t come with Vista install media?  Never fear, you can obtain media for free from these sources.

Some claim that if you use your OEM license (say sticker off the bottom of your laptop with Vista Ult 32bit) to do an install, it might not accept, but its worth trying.  The main benefit will be to do a repair install, something you can’t do when you only have OEM image CD’s.

There are whispers that if you have Vista Ultimate 32bit license, you can install 64bit version with the same key but on retail media, not if you have OEM license.

References:

http://www.mydigitallife.info/2007/05/08/windows-vista-free-direct-download-link/

http://www.mydigitallife.info/2007/12/22/64-bit-x64-windows-vista-official-direct-download-links/

http://www.mydigitallife.info/2007/05/10/how-to-make-vista-bootable-dvd-with-wim-downloaded-files/

Get Your Command Line Groove On

Commonly forgotten Windows DOS prompt shortcuts

Key What it Does
F1 Fills in the letter from last command you entered, one letter at a time.  Useful for fixing a typo on a command you just entered. 

For example, if I enter cd "My Docements" which wont work, I can then press F1 10 times (or hold it down) to get cd "My Doc then press the u to correct the typo.  Then hold F1 to get the remaining characters of the last command.  cd "My Documents"

F2 Prompts the user for a letter and fills in the last command up to the letter you entered.  This saves  you holding down the F1 key to get to the dodgy letter.

Using the last example again, if I press F2 then press e, the line buffer is filled to cd "My Doc.  You can then enter u and then press F2 followed by " to get to the rest of the entry.  cd "My Documents"

F3 Fill last command from current cursor position to the end of the line.

So taking from the previous example, after you enter u, you can press the F3 key to fill in the remainder of the line.

F4 Delete forwards up to a specified character. 
With the cursor positioned at the beginning of the line cd "My Documents", pressing F4 then u, will delete up the first few characters, leaving you with a line uments"
F5 Go back through history. Equivalent to the up arrow
F6 ????  CTRL+Z
F7 Display the command history, use the cursor keys to navigate and hit enter to reuse the relevant command.
F8 Go back in history
F9 Re-issue a previous command.  Prompts for the command number (from the list that appears when you press F7)

 

References (and some other tips)

http://www.labnol.org/software/tutorials/useful-keyboard-shortcuts-for-the-dos-command-prompt-in-windows/2629/

Hard Links, Soft Links (Junctions) and Symbolic Links in Vista

Ok, so mklink is now my favourite Vista command line tool.  Well not really, but I’m glad Vista comes with a tool out of the box that allows you to create symlinks.  This includes hard links (links to other things on the same partition), soft links or junctions to anywhere and symbolic links (reparse points) that do the same job but in a different fassion.

References:

http://wesnerm.blogs.com/net_undocumented/2006/10/symbolic_links_.html

http://www.mydigitallife.info/2007/05/22/create-symbolic-links-hard-links-and-directory-junctions-in-vista-with-mklink/

http://windowsconnected.com/blogs/joshs_blog/archive/2006/09/28/Windows-Vista-Junction-Points.aspx

http://www.svrops.com/svrops/articles/jpoints.htm

Virus Warning

Today I noticed on my desktop PC that I had a virus.

It put a file called TEL.XLS.EXE on the root drive of each partition. ie C:TEL.XLS.EXE, E:TEL.XLS.EXE

When I went to delete the file, it kept coming back so some quick googling found these links about it.

http://forums.whirlpool.net.au/forum-replies-archive.cfm/730930.html
http://www.sophos.com/security/analyses/trojvbcwp.html
http://fileinfo.prevx.com/fileinfo.asp?PXC=669749228023

Basically it copies itself to the root directory and creates an AUTORUN.INI file so that each time you put a USB stick into an infected PC, it copies itself across, and then when that plugs the USB into another computer, self executes and copies itself to that machine.

The file is a hidden file, (so you have to go to control panel->folder options and select the radio button for Show Hidden Files and Folders), and its icon is made to look like a Microsoft Excel file.

The thing also changes a registry value so that if you go to the Folder Options Control Panel, you can’t see the Show All Hidden files option to see the thing. I only noticed it because I don’t use the Do Not show hidden files and folders option.

Ok, so the links have a rundown of how to get rid of it, here is my preferred way.

Get the program Process Explorer.  It is like Task Manager but gives you a bit better info.  It comes as a zip file with a single exe you can start to start the application.Start it up, look for svchost.exe.  There will be a few of them, but this one is noticeable because it has an icon that makes it look like an Excel file.  Double click on it.  The programs path will be C:WINDOWSSVCHOST.EXE.  Note that if its a proper windows file and not the virus, its icon wont be an excel file and it will have the path C:WINDOWSSystem32SVCHOST.EXE
 

If you have trouble killing the svchost.exe app that is causing the problem you can start in safe mode.

Restart in safe mode (go Start -> Run. Type msconfig and press Enter).
Select Diagnostic Startup radio button. Press OK, and reboot when prompted….If this doesn’t work, press F8 when your computer boots up and you’ll see a menu item to start in safe mode.After svchost.exe is stopped or you are in safe mode, open up a command prompt window. (go to Start -> Run. Type cmd and press enter)
In the window delete the following files with these commands 

del C:autorun.ini
del C:tel.xls.exe

Repeat the last two commands for each partition you have. Also, plug in your USB sticks and delete the autorun.ini and tel.xls.exe on each of them. It’d be a safe idea to hold down the shift key so that the Autorun doesn’t execute and reinfect your system all over again.

Once the main culprits are gone then do

del %System%SocksA.exe
del %System%algsrv.exe
del %System%FileKan.exe

del %WINDIR%SESSION.EXE
del %WINDIR%SVCHOST.EXE
del %WINDIR%ufdata2000.log

Close the cmd prompt window.

Open the registry editor. (go start->run. Type regedit and press enter)
Expand the My Computer tree on the left and then
Search for HKEY_LOCAL_MACHINESoftwareMicros­oftWindowsCurrentVersionRun
When you click on Run then the right hand pane will have a list of autostarting programs.

One of those entries will have a value that matches one of the files you deleted above. (ie SocksA.exe). Right click and Delete it.

Search for HKEY_LOCAL_MACHINESOFTWAREMicros­oftWindowsCurrentVersionExplore­ rAdvancedFolderHiddenSHOWALL

In the right hand pane, you’ll see a key named CheckedValue with a value of 0. Double click the name and change its value to 1. Change the DefaultValue to 0.
This will return the ability to see the option ‘Show Hidden Files And Folders’ in the Folders Control Panel. You may want to now open this control panel and select it and press Ok. Make sure that this has taken affect. Go back into the Folder Options and make sure the radio button has that value highlighted.

Provided all the above is completed, you should now be virus free. To prevent re-infection in future I suggest you Disable Autoplay for USB drive

Sending Email in T-SQL

For the uninitiated (like me), Microsoft SQL Server has T-SQL (think PL/SQL for Oracle).  Of course being an MS product, it has to have some VB scripting integration, which is cool.  Part of this integration lets you get your hands on a component called SQLMail and SQLAgentMail.  These things plug into the MAPI mail system on the SQL server and send emails through it. 

The downside of this is that in shared hosting environments, you may not have the luxury of setting up a mail profile on a PC and therefore MAPI may be lacking.  There are a few alternates though, like specifying your own DLL and using it to send mail or some other means. 

Either way, its good to know that it is possible to get your scheduled reports to send mails out when they are finished.

The links below cover a variety of means you can achieve this.

http://www.databasejournal.com/features/mssql/article.php/3489111

http://support.microsoft.com/kb/263556

http://www.sqlteam.com/item.asp?ItemID=401

http://www.sqlservercentral.com/columnists/dharris/sendingsqlnotificationswithcdosys.asp

http://www.sqlservercentral.com/columnists/kdas/xp_sendmail.asp

http://www.sqlservercentral.com/columnists/ckempster/sendingalertsviaacustomsmtpprocedure.asphttp://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=1678