Delphi documentation
While writing some Delphi code at work, I spotted this in the documentation. Not sure if I want to call that function or not now…
While writing some Delphi code at work, I spotted this in the documentation. Not sure if I want to call that function or not now…
A user on the JKDefrag forum was asking about not running JKDefrag if another process is running (as they don’t play nice together), so I whipped this up.
You’ll need PsList from SysInternals in your path somewhere.
Change the three SET lines to point to jkdefrag, give the parameters you want to use, and the name of the program to avoid. (Get the name of the program from PsList.)
The “>2 NUL” sends stderr to NUL to avoid printing the PsList banner. It works on Vista, not sure about XP/2003. If it doesn’t just remove it and live with the PsList banner showing up.
Making this check for more than one process is an exercise for the reader. Also, you could use this with PsExec to check for the process on a remote host and then launch JKDefrag over there.
@echo off REM Only run jkdefrag if another process is not running REM Path to jkdefrag SET JKDEFRAG=c:\jkdefrag\jkdefrag.exe REM Options for jkdefrag SET JKDEFRAGOPTS=-a 3 REM Process we don't want running SET AVOID=explorer REM Here we go! pslist %AVOID% > NUL 2> NUL if %ERRORLEVEL% == 0 goto skip REM If we made it here, pslist didn't find the process echo Couldn't find %AVOID% running, starting jkdefrag... %JKDEFRAG% %JKDEFRAGOPTS% goto end :skip echo %AVOID% is running, not running jkdefrag :end
I’ve been having some problems with the “Search Assistant” (the stupid dog thing in Explorer on Windows XP when you use the Find thingy) at work. For some reason recently opening the search sidebar results in Explorer crashing with a Data Execution Prevention error. Disabling the DEP stuff for explorer.exe just results in a regular crash. Alas, to disable the dog thing you need to be able to open the search panel… or just stick this in your registry.
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState] "FullPathAddress"=dword:00000001 "Use Search Asst"="no"
Log off and back on again and the dog has been slaughtered.
Stupid yapping thing. :fuckoff:
It’s taken me too long to find this.
(For the uninitiated, Exchange Recipient Policies tell Active Directory how to automatically generate email addresses for your users.)
If you want to tell a recipient policy in Exchange 2003 (and presumably 2007) how to generate the localpart other then just username, use these expanos:
%s : Surname (last name)
%g : Given name (first name)
%i : Middle initial
%d : Display name
%m : Exchange 2003 alias
%rxy : Replace all subsequent characters x with character y in username. If x = y, the character will be deleted.
There are other things you can do like chopping the string to a certain number of characters, see the full article for details.
No longer will I have to manually add first.last@domain.com to every user I create :D
The disc is created.
Remove the disc and label it
“VGN-SZ3VMP_X Application Recovery Disc”
That’s easy for you to say, Sony.
In the kitchen at work, a box has appeared with a riddle on it, inviting people to submit their answers for a prize draw.
What is brown, has a head and a tail but no legs?
The girls agree it’s a one or two pence coin.
The consensus among the boys seems to be that it’s a turd.
While rummaging around the APC site to find information on Uninterruptible Power Supplies, I noted that one of the features was “ERROR: No Translation Found”:

I’m not sure if an error is a feature I do or don’t want, to be honest.
While chatting with my new boss at lunchtime the other day, she said that her favourite restaurant was in Tring, which I mentioned was near where I came from. When I said I came from Aylesbury (because most people have heard of that) she said
Oh, I went to school in Aylesbury
“Me too!” I replied, “Which school did you go to?”
:fry: This might seem a little odd since AGS is an all-boys school, and Viv isn’t any boy at all. However, all is explained by the fact that she started there before the girls split off and formed Aylesbury High over the road.
It’s a small world after all.
(That last line was added especially for simsea.)