Cannot delete "filename": It is being used by another person or program.

Cannot delete "filename": It is being used by another person or program.

Close any programs that might be using the file and try again.
Occasionally you encounter some annoying program that just latches onto a file and doesnt let go.

I've noticed this with Yahoo Messenger 8's file transfer.
Alot of the time I only need to quickly send a screenshot saved on my desktop and then delete it.
After file transfer is complete, it is expected that Yahoo would let go of the file.
This is when a "handle" is not released by a program.

It may also occur when you are viewing your video files in Windows Explorer in thumbnail mode.
Some badly written codec plugins will hold onto a file when the thumbnail is requested, making it near damn impossible to delete the video!

In comes SysInternals' Process Explorer to save the day!
There is ALOT of stuff this program can do, but for the purpose of this post, we only need to close the necessary handle so we can delete stuff!

Download it, run it.
Click on "Find" > "Find Handle or DLL..." on the top menu.
Type in the filename you wish to unlock (not case sensitive) and click "Search".
Double click on the search result and it'll show you a handle to a "File".
Right click, select "Close Handle" and confirm.

If there were more than one result when you searched, repeat the process until the file is no longer locked.

Windows XP Auto Login

Like many people, we only have one user account for our computers.
However, when we turn on our computers and walk away to get a drink, we expect it to be loaded and ready to serve our every little whim.

Its a shame though that by default Windows XP will wait at the login screen, even if there is one user with no password protection, for us to click to proceed.

Why? Just load damn you!

Luckily, theres a way around it.

1. Go to "Start" > "Run" and type "control userpasswords2".
2. Untick "Users must enter a username and password to use this computer".
3. Click "OK".
4. Enter the details of the account you wish to automatically log in as.
5. Profit!

[ Source ]

VMware massive harddrive lag after pausing/stopping guest

I've noticed that ever since the upgrade to v6.5.1, my laptop has had trouble hibernating.
It would just halt at "preparing to hibernate" and the disk would keep whirring.

After a bit of experimentation, I've realised that its not because of the hibernation processing screwing up, but the to the excessive harddrive activity after shutting down VMware.

The upgrade changed the way some harddrive options worked for the guest.
While the guest is running, any changes to the hdd would be kept in a "redo log" and processed when a snapshot is taken.

After running a guest for about an hour, this equates to ALOT of backlogged processing which takes a few good minutes to perform. Generally, a few good minutes which I dont have.

Luckily, it is quite easy to disable this feature.

Go to your virtual machine and make sure it is not suspended.
Edit the hard disk settings and go to "Advanced".
Click on "Independant" and ensure that "Persistant" is selected.
Save your settings and all should be well.

[ Source ]
No real instructions provided by the source, but it let me figure out where to look.

Remove Nero Search from Taskbar

After updating my Daemon Tools today, which now comes with alot of adware crap, I made some routine checks to ensure that my computer is as adware free as possible.

I noticed that I had an option in my "toolbars" that I never noticed before called "Nero Search".

What the fuck? How did that slip in there?

A quick search online gave the results on how to remove this royal peice of shit from my taskbar.

[ Source ]
Cmd.exe /c regsvr32 /u /s "%ProgramFiles%\Common Files\Ahead\Lib\NeroSearch.dll" && regsvr32 /u /s "%ProgramFiles%\Common Files\Ahead\Lib\NeroSearchBar.dll" && regsvr32 /u /s "%ProgramFiles%\Common Files\Ahead\Lib\NeroSearchTray.dll"
Everything should be working fine after that.

PHP output buffering nightmare

While going through some code at work, I noticed that some output buffering wasnt being ended correctly.

The number of ob_start()'s werent being ended properly, causing a buffer to carry through all the way to the end of the page.

Eventually it was found to be a simple mistake.
The use of "ob_clean()" instead of "ob_end_clean()".
$ret = ob_get_contents();
return $ret;
Please! Just use "ob_start()" and "ob_get_clean()" !!!
They're both one line, respect the current buffering level and incredibly simple to use!

Eclipse - Windows/Unix new line formatting

Sometimes you have to do work with Unix/Linux machines and the differences in new line encodings can be annoying, especially when doing diffs or merges.

Luckily, Eclipse has options for this which covers a global and per-project scope.

To change the option globally:
1. Open the preferences dialog.
2. Select "General" > "Workspace".
3. Change the "New text file line delimiter" to "Other" and select your preference.

To change the option on a per-project basis:
1. Open the project.
2. View the project properties.
3. Select "Resource"
4. Change it from "Inherited from container" to "Other" and select your preference.

If your project is using UTF8, you might want to take the time to change it to UTF8 while you're at it.

Fix for Ubuntu Vi editor retarded arrow keys

After a fresh installation of Ubuntu (or Kubuntu/LinuxMint), I noticed that the "vi" editor didnt use the arrow keys properly.

It was horribly annoying, and inserting/replacing characters with "A", "B", "C" or "D".
Also, the Home and End keys were acting up, replacing characters with "H" and "F".

The solution? Incredibly easy!
Apparently "vi" is a lightweight version of "vim", so just alias the vi command to use vim instead in your bashrc profile.

To do that:
1. Open up a terminal shell
2. Type: "vim ~/.bashrc" (you may need to create it first, by copying "cp ~/.bashrc_vanilla ~/.bashrc" for LinuxMint)
3. Go to the end of the file.
4. Type: "alias vi='vim' " at the end of the file
5. Save and exit.
6. Next time you start a terminal session, it'll automatically use vim whenever you type vi.

If you want to use it immediately, type the alias command in the terminal window and it'll take effect immediately.

*edited* 19/12/2008
Forgot to mention that you need to create the file first on LinuxMint by copying the vanilla file.

[ Source ]
Included source

Firefox 3 - Removing individual auto complete entry

[ Source ]

When typing into textfields, there are some values you dont want displayed again (ie. text values, random jibberish, etc)

Theres a button in the options dialog to clear everything, but I hate letting it learn all my usernames again.

Instead, only delete the ones you dont want by:
1. Start typing into a textbox and some suggestions will appear.
2. Highlight them by pressing "up/down" on the keyboard and then press the "delete" button.
3. Whalla! Gone! Wonder in amazement at how easy it was.
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog