Wednesday, March 12, 2008

Take your scripts and commandline apps with you

Interesting thing about environment variables. They can be temporarily altered on a program by program basis. Dos prompts are a fine example of this. And with a program like Console you can wrap up a nifty tweak to the %PATH% variable.
Assuming you have your batches and console apps in one directory(\Data\bin\) you can run a script that would look like this...

:: Pulls drive letter from CD root variable
:: %CD:~0,1%
:: Does a string operation then assigns
@IF %CD:~0,1% EQU D SET USBroot=D:
@IF %CD:~0,1% EQU E SET USBroot=E:
@IF %CD:~0,1% EQU F SET USBroot=F:
@IF %CD:~0,1% EQU G SET USBroot=G:
@IF %CD:~0,1% EQU H SET USBroot=H:
@PATH=%USBroot%\Data\Bin;%Path%

This batch script if ran from console on a usb drive will pull the drive letter from the %CD% environment variable, and through a series of IF statements will set the drive letter based on %USBroot%

Modify the code to suit your USB drives folder hierarchy. And start Console with the following commandline switches:
Console.exe -c "/k \Data\Bin\Drive.bat&CD \"

Which will run the batch script and then bring you to the root directory of the USB drive. If you have Pstart to launch console for you, you'll have to do things this way as well. I tried but apparently regular expressions are not performed by Pstart for setting environment variables. And the %pdrive% variable only works in the general and advanced tabs. But mind not, this is a great fix to a problem that wasn't really that complicated anyway.
Just a not I didn't use Console2(beta), if you do it should be just as easy for you to set it as well.

Wednesday, January 9, 2008

Coccinella IS Portable

Coccinella is a Jabber client with a builtin Whiteboard(used to go by that name) and has VoIP features optional. A recent update made this client portable with a simple preference option. Once checked the data is saved in a folder(Coccinella-prefs) outside of the Application folder.
/App
/Data
Get the idea now? Back to the subject.
And to make the portable feature easier to use, it comes in a nifty little zip file. Either grab the build with VoIP or the one without. I'd rather use Meebo for voice communication over the web anyway. In this case it's for those who have managed to migrate completely to Jabber and somehow convinced their contacts to follow too. I should mention the new update also comes with a sleek black skin.

Pidgin Portable, Again

I added in a few minor changes to make the process more automatic for users upgrading their copy of Pidgin.
Not only that but I made the process faster be only overwriting old files and dropped the number of exclude files.
Don't Worry I'll have some interesting info to report on PortableTor soon.

::2 point "oh snap"
::First things first. I'm in UR Echo, dumping my excludes.
Echo \perlmod\ >Exclude1
Echo \locale\ >Exclude2
Echo Pidgin.exe >>Exclude1
Echo pidgin-uninst.exe >>Exclude1
Echo perl.dll >>Exclude1
Echo tcl.dll >>Exclude1
:: Base dirs
MKDIR Programs
MKDIR Programs\Pidgin\
MKDIR Programs\GTK\
:: Pidgin Lines
MKDIR Programs\Pidgin\pixmaps\
MKDIR Programs\Pidgin\sounds\
:: Went with XCOPY instead :p
XCOPY "C:\Program Files\Pidgin\Pidgin.exe" "Programs\Pidgin\Pidgin-portable.exe" /D /H /G /Y
XCOPY "C:\Program Files\Pidgin\*.*" "Programs\Pidgin\" /D /E /H /G /EXCLUDE:Exclude1+Exclude2 /Y
:: REN Programs\Pidgin\Pidgin.exe Pidgin-portable.exe (got in the way)
:: Excluding TCL and Perl dlls
:: /Pidgin lines

:: GTK lines "C:\Program Files\Common Files\GTK\2.0"
MKDIR Programs\GTK\
MKDIR Programs\GTK\bin\
MKDIR Programs\GTK\etc\
MKDIR Programs\GTK\lib\
MKDIR Programs\GTK\share\
XCOPY "C:\Program Files\Common Files\GTK\2.0\bin\*.*" "Programs\GTK\bin\" /D /E /H /G /Y
XCOPY "C:\Program Files\Common Files\GTK\2.0\etc\*.*" "Programs\GTK\etc\" /D /E /H /G /Y
XCOPY "C:\Program Files\Common Files\GTK\2.0\lib\*.*" "Programs\GTK\lib\" /D /E /H /G /EXCLUDE:Exclude2 /Y
XCOPY "C:\Program Files\Common Files\GTK\2.0\share\*.*" "Programs\GTK\share\" /D /E /H /G /Y
:: /GTK lines
Del Exclude1
Del Exclude2

:: Plus Aspell

:: Aspell lines
MKDIR Programs\Aspell\bin
MKDIR Programs\Aspell\data
MKDIR Programs\Aspell\dict
XCOPY "C:\Program Files\Aspell\bin\Aspell-15.dll" "Programs\Aspell\bin\" /D /H /G /Y
XCOPY "C:\Program Files\Aspell\data\*.*" "Programs\Aspell\data\" /D /E /H /G /Y
XCOPY "C:\Program Files\Aspell\dict\*.*" "Programs\Aspell\dict\" /D /E /H /G /Y
:: /Aspell lines
:: Using /D for xcopy to speed things up.

Monday, January 7, 2008

Holiday Vaction

Please Bear with us, the holidays can be a taxing time. I promise to have some posts our soon.

Echo

Monday, December 3, 2007

Plugins for Pidgin and certifiably portable

Two plugins for pidgin that are both portable. Even though it seems obvious to me, maybe I should explain that they are as portable as the program that they were designed for.

Pidgin Off The Record(OTR).
Pidgin Encryption.

Pidgin OTR stores keys in the profile directory whereas Pidgin Encryption give you a choice to store them in the profile or elsewhere. PE also lets you choose the size(512-4096) of your keys as well. PE will of course automatically generate keys for accounts that already exist where as OTR requires manual generation. Both are good. Just a matter if you want AES or RSA as your means of encryption.


Pigin Encryption
Pidgin OTR

Sunday, December 2, 2007

Alternate shell from your USB

BlackBox is an alternate shell some of you have probably seen on Linux distros. But it has a port for windows. There are a few variants for Blackbox for windows(BB4W) as well. And best of all, they are to the best of my knowledge portable. Even though they are portable you have the option of full installation. It's fast, lightweight, minimalistic, and even though it was designed to be fast and not pretty you can have that too. If you don't like the styles that came with Blackbox or the flavor you downloaded you can always hit up BoxShots to see more or even make your own.

My Flavor of choice is BBLean, because I can drag and drop wallpapers to my desktop. Now I'm sure those of you who have tried running Blackbox from your USB or tested it without installing noticed there were some minor features you couldn't use without installing(or so you first thought). Ditto. Like how some icons never show up in the tray, I have a shortcut for you.

1.Three finger Salute Ctr+Alt+Del , This brings up task manager
2. Kill the Process Tree for Explorer.exe
3. From the task manager, start a new task:

[path-to-blackbox]\Blackbox.exe

4. Presto, you're running Blackbox without installing and your BlackBox tray now loads all icons.

With this you can have BBLean running portable.


BBLean
BlackBox for Windows
BlackBox Wiki @ Sourceforge

Friday, November 30, 2007

Another Portable Wiki

StickWiki is a small lightweight portable wiki that is standalone and operates from a single xhtml file. It offers AES encryption as well. It isn't that large and has built in documentation for making and adding pages, links, etc. It certainly has a different approach compared to TiddlyWiki in terms of function and interface. I recommend this as an alternative to TiddlyWiki, if not for the encryption features.



Wiki on a Stick!
StickWiki Project page @ sourceforge