Showing posts with label productivity. Show all posts
Showing posts with label productivity. Show all posts

Thursday, August 04, 2011

Caffeine - Utility to disable screen saver w/o interrupting input

I ran this on a machine I was RDP’d into to prevent the screen saver from appearing while I was logged in.  Handy.  And like other powerful utilities, potentially dangerous.  Not so much in an RDP session, though, because the console running the RDP client wouldn’t/shouldn’t(not a good idea) have this running, just the target host.  The author simulates an F15 keypress to make this work.  Didn’t know I had an F15 key.  Very nice.

Only 2 files inside the compressed download, and one is a README.

http://www.zhornsoftware.co.uk/caffeine/
Caffeine

imageIf you have problems with your PC locking or going to sleep, caffeine will keep it awake. It works by simulating a keypress once every 59 seconds, so your machine thinks you're still working at the keyboard, and won't lock the screen or activate the screensaver.

The icon is shown above - it's the leftmost one in the task tray, and this is all you see. Double-clicking the icon empties the coffee pot (that's what the icon is) and temporarily disables the program. Double-clicking it again refills the pot, and will keep your machine awake.

Thursday, October 30, 2008

All Your Command (CMD) Prompts Are Belong To Us

Ever typed SET to display all the useful environment variables windows has?

You can add those environment variables to your command prompt permanently. And No, Billy, this won't work by simply editing System Properties, so read on...

Four files and the PSEXEC.EXE utility are needed - save all 4 files in the same directory in a share(such as \\server\share ) to prepare to deploy your groovy command prompt on every server under your influence.

I changed the command prompt to better keep track of which server and which credentials are in use, and added a timestamp.

CMDPROMPT.BAT - contains the prompt with your preferred environment variables and gets copied to %windir%
:: c:\windows\cmdprompt.bat
@echo off
prompt $_[%ComputerName%\%Username%] $t$_$p$g

CMDPROMPT.REG - get registered on the target machine(s) to invoke CMDPROMPT.BAT when CMD.EXE is executed
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor]
"AutoRun"="%windir%\\cmdprompt.bat"


CMDPROMPT-INSTALL.CMD - the installer script - important for deploying the prompt to multiple machines
:: \\server\share\cmdprompt-install.cmd
@echo off
copy /Y \\server\share\cmdprompt.??? %windir%\
regedit /s %windir%\cmdprompt.reg


SERVERLIST.TXT - a list of target machines(one per line) that will receive the newly minted command prompt goodness.
Eriador
Gondor
GreyHavens
Minastirith
Mordor
Rivendell
Rohan
Bullwinkle
Rocky
Elaine
George
Jerry
Challenger
Cubs
Hindenburg
SpruceGoose
Titanic
TowerofPiza

Now to install! Open up a command prompt and cd to the directory containing the SERVERLIST.TXT , then run the following:
psexec @SERVERLIST.TXT -c -u DOMAIN\%username% \\server\share\cmdprompt-install.cmd


Login to some of these target servers and enjoy the utility of the improved prompt.

Friday, October 10, 2008

'Copy as Path' - Vista's Best Feature

Arguably one of the best features in Vista for those who live in Explorer with files and directories appears by holding down the Shift key when right-clicking a file or folder:



Copy as Path copies the full path of the file or folder selected as text to the clipboard that can then be pasted in email, in code or at the command line.

The full path gets copied as a plain text string, surrounded by quotes to handle any spaces that might be contained in the path/filename.