• You are not logged in.

    PKL: Portable Keyboard Layout autoplay

    • Started by Jag02
    • 3 Replies:
    • Reputation: 0
    • Registered: 04-Feb-2009
    • Posts: 51

    Is there anyway I can the PKL to start automatically, as soon as I insert the USB stick?

    Also, is there anyway that I can get PKL to uninstall itself, as soon as I unplug the USB stick?

    Last edited by Jag02 (14-Feb-2010 20:05:53)
    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,361

    This totally belongs in the PKL thread on the autohotkey forum, on the sourceforge PKL forum or on the PortableApps forum!

    However, I'll indulge you my friend, just because I love typing in Colemak!  :)

    To actually autorun something from a USB stick, you'll need a special U3 stick. Mine's a Kingston Traveller with U3. That has a hardware solution that mounts a virtual CD-ROM which is allowed to AutoRun unlike other USB drives (it's a case of somewhat misguided security measures in Windows). Then, that 'CD-ROM' has a launcher app that runs stuff from your USB drive. The U3 drive looks like two drives in the Windows Explorer. Usually a U3 drive will launch the standard U3 menu which is kinda naff but you can get all sorts of apps for it (most of it too commercial for my tastes though). So I hacked mine and wrote my own launcher which now autoruns Geek.menu (PortableApps spinoff), C.A.F.E. (manages file extensions so portable apps can intercept them), PKL and whatever else I may feel like using.

    The normal modus operandi for a USB drive is AutoPlay, in which you get that menu asking you what to do when you insert the drive. Slightly less sexy than the U3 package, but only a key press or click and you're up and running. Now, if you're using your stick at your workplace you may not be able to use either of these mechanisms since IT departments may have had the good sense to disable them. Also, some virus scanners are twitchy (I've had run-ins with F-Secure I think) and automatically assume that any AutoPlay file must by necessity be malware! Kinda like that habit of detecting any and all scripts (including some I've written myself) as trojans. Lazy, incompetent, neurotic... but I digress.

    Unless you have or get a U3 drive (in which case I might help you 'jailbreak' it should you so desire), you can do the AutoPlay thing: In the drive's root directory, create an autorun.inf file and have it look like this or similar:

    [autorun]
    label=MyUSBDrive
    icon=PortableApps\PortableKeyboardLayout\pkl.exe
    action=Run Portable Keyboard Layout
    open=PortableApps\PortableKeyboardLayout\pkl.exe
    UseAutoPlay=1

    I don't know about how Win Vista or 7 handles this; I've heard rumours that they have a higher default security level against autorunning.

    At any rate, I also leave a shortcut to the geek.menu (from which I can easily run PKL by hotkey) in the USB disk's root directory. So if security measures prevent me from autorunning my stuff I only have to view the drive and run that shortcut directly.

    Last edited by DreymaR (15-Feb-2010 09:47:29)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 0
    • Registered: 04-Feb-2009
    • Posts: 51

    I have received my SanDisk refurbished u3 stick.  How can I jailbreak it so that I can put a pkl.exe file or any exe file, and also word documents, spreadsheet etc onto the u3 Launchpad?

    Last edited by Jag02 (18-Mar-2010 16:43:31)
    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,361

    Ah, longish story and possibly a bit on the side both in terms of subject and legality?

    I couldn't send you a forum (email) message? Maybe I've forgotten how to do it, and maybe you chose not to get messages. If so, send me one and we'll take it from there.

    Messing with U3 is good fun, but be aware that you'll delete everything on the disk so it needs to be backed up. And there's a microscopic chance you'll ruin the disk from what I hear, so if the SanDisk is your dearest possession you might back out.  :)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0