You are here

AutoStart initial release

34 posts / 0 new
Last post
rene
Offline
Last seen: 17 years 7 months ago
Joined: 2006-03-29 16:16
AutoStart initial release

Well AutoStart has been released. I finally felt comfortable enough with its quality to release it to the general public. So now I'd like to get some feedback and drive the bugcount to zero.

For those of you who haven't heard of AutoStart, it is a Launcher for portable apps designed to be both tiny in size and extendable. It creates icons in the taskbar notification area for every USB Flash Drive you have attached to your system.

It can be distributed under GNU General Public License and the sources are availalbe from the Liberta project page. To see the sources you'll need to go to the sourceforge website and look in the subversion repository of Libertà.

You can download a binary from http://xpt.nl/downloads

Here's a rundown of the features:

1. Installer is built-in. So it can install itself on flash drives or on the PC.
2. Supports most of the standard Microsoft autorun.inf features.
3. Automatically generates or updates autorun.inf with applications it finds during installation on a flash drive.
4. Creates an icon in the notification area for every flash drive connected.
5. Start menu for launching applications. Shown when icon is right clicked.
6. Left clicking a trayicon will run app specified by 'shell' value in autorun.inf
7. Right click drive icon gives menu with Unplug/Eject drive option.
8. Eject drive implemented directly through Windows API calls.
9. Designed to leave no trace on a PC when not installed.
10. Tiny, 90KB compressed with exe compressor.

Future Enhancements planned:
1. Implement inplace upgrading
2. Support fixed drive like USB Hard Drives.
3. Support TrueCrypt volumes, both fixed and removable drives.
4. Feedback in the form of balloon help popups.
5. Reduce the size to further to approx 50KB by removing dependencies on ATL7 going back to ATL 3. This will also make it possible to build AutoStart with freely available tools !
6. Support some sort of detection of applications running from a flash drive when ejecting a drive.
7. Last but not least make all internal APIs available as an extension SDK for easy creation of extensions like launchpads.

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 3 months ago
Developer
Joined: 2005-12-10 15:22
Just to say

I've been running the beta and I must say that its awesome.
P.S. Any news on the release date of the Launchpad Wink

Yours

Steve Lamerton

Jonathan
Offline
Last seen: 17 years 1 month ago
Joined: 2006-04-12 21:49
Wait, this isn't the

Wait, this isn't the launchpad?

rene
Offline
Last seen: 17 years 7 months ago
Joined: 2006-03-29 16:16
This is the core for the launchpad

Although AutoStart actually has a menu allowing you to start applications, it is not the visual skinable launchpad.

The idea is that we have a small long running application that does core functionality like device detection/monitoring/ejection, program installation/deinstallation and application scanning/launching. This application has a minimal memory footprint exactly because it is long running, but it provides an API where extension can plugin to.

Then you create extensions that plugin to this core functionality to give you things like a nice cool looking launchpad. Depending on the level of eye candy these extensions can be rather big. However, a launchpad is transient in nature so once you have launched your application the extension is unloaded and we are back to the small footprint once again.

So we get the core down a very small footprint. This will load with lightning speed from any USB Flash Drive no matter how slow. Then the launchpad is really easy to create once you have this core in place.

Jonathan
Offline
Last seen: 17 years 1 month ago
Joined: 2006-04-12 21:49
I see because right now I've

I see because right now I've installed it on my PC but I can't install it on my external hard drive so I'm not really able to test this out very well.

And can't wait for the launchpad! Smile

rene
Offline
Last seen: 17 years 7 months ago
Joined: 2006-03-29 16:16
A USB Hard Drive is actually

A USB Hard Drive is actually seen as a fixed drive by windows. As far as I can tell Windows has AutoRun enabled for fixed drives and actually supports autorun.inf on such a drive even in Windows 2000.

Currently AutoStart only does removable drives, but only because I don't have a USB Hard Drive laying around yet. I'll order one tomorrow, so I can test all the device detection/removal event fun.

I don't see big problems with supporting USB Hard Drives though so this should be available with the next update of AutoStart.

Jonathan
Offline
Last seen: 17 years 1 month ago
Joined: 2006-04-12 21:49
When I install on a PC it

When I install on a PC it has no affect and nothing changes. Is there something I specifically need to do to get it to work?

rene
Offline
Last seen: 17 years 7 months ago
Joined: 2006-03-29 16:16
Changes after installing....

The things you should notice are :

1. Right click menu on the icon now says "Uninstal from PC"
2. Menu item Start>Programs>Startup>AutoStart should be present
3. AutoStart.exe is now stored in C:\Program Files\Liberta\AutoStart
or in C:\Documents and Settings\\Local Settings\ApplicationLiberta\AutoStart depending on your privileges
4. There should be an item in Control Panel>Add/Remove Programs>Liberta AutoStart

Let me know what you are not seeing.

azjerry
Offline
Last seen: 7 years 3 months ago
Joined: 2005-12-09 12:42
?????

So it actually has to be installed on the host PC? Doesn't that preclude it's use on most public PCs and any where the user doesn't install priviledges?

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 3 months ago
Joined: 2006-01-06 21:27
No

That's if you want it permanently at home. Click install on USB instead.
----
R McCue
PortaBlog Home and My Website
And before anyone complains about the grammar, I'm so jetlagged that my
hands aren't even in the same time zone...

"If you're not part of the solution, you're part of the precipitate."

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 3 months ago
Developer
Joined: 2005-12-10 15:22
Right,

as I understand it this is how you install it:

1. Run the program, his will put a small icon into your taskbar.
2. Right click on it and choose where you want to install a copy, if you put a copy on your usb drive you'll find the new autorun.ini file populated with the programs on the drive, if you install it to pc it'll automatically load when you plug it into your pc.
3. If you installed it on your pendrive, remove it and plug it back in again, the option on the top of the list should be to run autostart, this will put the icon (a different one this time) in the taskbar and you can easily launch all of the apps on your drive from there.
4. If you put a copy on your PC the next time you plug the drive in you will find that it loads the taskbar icon without you having to do anything.

Any questions please ask.

Yours

Steve Lamerton

rene
Offline
Last seen: 17 years 7 months ago
Joined: 2006-03-29 16:16
Couldn't have said better myself

AutoStart is meant to work as good as it can given reduced user privileges.
However if you've got the user privileges you can make it do more for you.

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 3 months ago
Developer
Joined: 2005-12-10 15:22
Indeed,

for example I've got it installed on my home PC's but it runs off the USB drive at school, perfect!

Yours

Steve Lamerton

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 3 months ago
Developer
Joined: 2005-12-10 15:22
Also,

we could do with looking at the method it uses to get the program name, possibly changing it to cut the last four characters off as I have a couple like:

Portable wxDev-Cpp Launcher runs wxDev-Cpp from a removable drive
PortableFileZilla Launcher runs FileZilla from a removable drive

Which is a little annoying.

Yours

Steve Lamerton

rene
Offline
Last seen: 17 years 7 months ago
Joined: 2006-03-29 16:16
Steps to get the program name when installing on flash drive

I'm getting the program name from the file version info.
First I look for a Product Name, and use that if found.
When there is no Product Name I look for a Description and use that when found.
If that also fails I use the filename minus extension.

I think you've got a few portable launchers with a very long description and no product name. Perhaps I should just skip the description and directly look for Camel Case in the program name and insert spaces where appropriate.

By the way, you can install AutoStart several times on the Flash Drive without any problems, when it finds new applications AutoStart only adds these to the AutoRun.inf file.

ernstmik
Offline
Last seen: 18 years 3 months ago
Joined: 2006-08-01 08:15
I like this...

This is great. Thanks rene for your hard work. Now time for my questions.

1.) On XP, it still doesn't "autoplay". Instead a dialog opens up asking what do I want Windows to do with the Liberta Autostart application already pre-selected. I have to click a button to make it start. Is this normal for your AutoStart application on Windows XP?

2.) It didn't find any of my application executables when I installed it to my USB drive. Why did it do that and how can I list my programs on the right click menu?

3.) When I right click on the system tray icon and select "Eject/Unplug", my USB drive doesn't really eject and I still have to go through the Windows XP "Safely Remove Hardware" dialog to actually "eject" my USB drive. What am I missing here?

Thanks for the hard work on this app and look forward to using it quite a bit once I figure out what I am doing in regards to my questions above. Thanks, rene.

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 3 months ago
Developer
Joined: 2005-12-10 15:22
Right then,

1) Yep, this is unavoidable in XP as it doesn't execute the autorun.inf file, basically it can be done. If you want an easier way you can always just hit enter.

2)I'll leave that one for René

3) Hmm, it works for me, have you got it installed on your PC or and the USB stick itself?

Yours

Steve Lamerton

rene
Offline
Last seen: 17 years 7 months ago
Joined: 2006-03-29 16:16
That's some weird behavior

OK, this is interesting.

1) When AutoStart is already running, i.e. the icon is visible in the taskbar notification area, then the Autoplay dialog should NOT be shown.
When you are not running AutoStart this is the normal dialog you will get.
But if you then eject your drive detach and reattach this dialog should not be shown.

2) App searching during install on the flash drive only goes 1 level deep, so it scans the root and the first level directories. This is where I though most PortableApps would be found. Scanning deeper will cause me to find the real applications.

However, I'm thinking about an alternative approach where for the directories 1 level deep I will scan until I find an executable and then call it quits on all subdirectories under that directory. Is that an idea that would work in your situation ?

Let me know how your directory layout is on the drive.

3) After Ejecting the icon should disappear (more than 1 drive attached) or change to the AutoStart icon (last drive detached). Could you see if the menu when right clicked now says 'No Drive' as the top entry ? If it does the drive actualy has been ejected.

If it doesn't say 'No Drive' that can have a number of causes:
1. You still have an application open started from that drive.
2. You've got a truecrypt volume still open on the drive.
3. You've got hardware that behaves differently from what I expect (Kingston U3 drives act weird for instance, but I created work-arounds for that).

Also I try to be smart about how I eject so I try to prevent accidently disconnecting your multi-card reader from USB (thanks very much, please reboot to get it back situations).

So let me know if this brings some clarity to your situation and also please let me know the make and model of your USB drive. And also whether you are logged in as an:
1) Adminstrator
2) Standard User (or Power User as it is also called)
3) Limited User
4) Guest

This will help me greatly to determine why your configuration is failing.

ernstmik
Offline
Last seen: 18 years 3 months ago
Joined: 2006-08-01 08:15
Thanks for helping

1) When AutoStart is already running, i.e. the icon is visible in the taskbar notification area, then the Autoplay dialog should NOT be shown.
When you are not running AutoStart this is the normal dialog you will get.
But if you then eject your drive detach and reattach this dialog should not be shown."

Perfect, I just didn't understand how it worked. When I safely remove my USB drive, I also close everything related to it, including the AutoStart icon. This time, after reading your response, I didn't. I just removed it and then plugged it back in and it auto ran without that annoying Windows XP "What do you want me to do?" dialog.

2) App searching during install on the flash drive only goes 1 level deep, so it scans the root and the first level directories. This is where I though most PortableApps would be found. Scanning deeper will cause me to find the real applications. However, I'm thinking about an alternative approach where for the directories 1 level deep I will scan until I find an executable and then call it quits on all subdirectories under that directory. Is that an idea that would work in your situation? Let me know how your directory layout is on the drive.

I go deeper than 1 level deep which, your answer, then explains why it didn't find anything. Here is an example of my directory structure:

\ root
  +\Documents
    +\Music
    +\Pictures
    +\Video
  +\PortableApps
    +\FirefoxPortable
      +\App
      +\Data
    +\GaimPortable
      +\App
      +\Data
    +\Notepad++Portable
      +\App
      +\Data
    +\IrfanViewPortable
      +\App
      +\Data
    +\PortableAppsBackup

3) After Ejecting the icon should disappear (more than 1 drive attached) or change to the AutoStart icon (last drive detached). Could you see if the menu when right clicked now says 'No Drive' as the top entry ? If it does the drive actualy has been ejected. If it doesn't say 'No Drive' that can have a number of causes:
1. You still have an application open started from that drive.
2. You've got a truecrypt volume still open on the drive.
3. You've got hardware that behaves differently from what I expect (Kingston U3 drives act weird for instance, but I created work-arounds for that).
Also I try to be smart about how I eject so I try to prevent accidently disconnecting your multi-card reader from USB (thanks very much, please reboot to get it back situations).

When I click "Eject/Unplug", the cool Liberta AutoStart icon turns from blue to gray. Then when I right click on it while it is gray, it says "No Drive" at the top and all menu options specific to the drive are grayed out. However, the blue light on the drive itself is on and it still appears in both Windows Explorer and the Safely Remove Hardware dialog.

So let me know if this brings some clarity to your situation and also please let me know the make and model of your USB drive. And also whether you are logged in as an:
1) Administrator
2) Standard User (or Power User as it is also called)
3) Limited User
4) Guest
This will help me greatly to determine why your configuration is failing.

My drive is a SanDisk U3 Titanium 2.0 GB USB Drive with the all U3 related material removed, i.e. U3 launchpad. I have administrator rights on this laptop.

Thanks the answers you have already given and for continuing to help me. Like I said in my earlier post, great work and I love the app (as I learn more about it :P)

ernstmik
Offline
Last seen: 18 years 3 months ago
Joined: 2006-08-01 08:15
Update...

Though my drive still appears in Windows Explorer and the Safely Remove Hardware dialog, it is "unavailable" meaning when I click on it in Windows Explorer I get a "Please insert a disk into drive F:." message box from Windows.

azjerry
Offline
Last seen: 7 years 3 months ago
Joined: 2005-12-09 12:42
I get the same

The AutoRun menu says no drive and, although the drive is still in My Computer I can't access it. But I'm still uncomfortable removing the drive since the drive LED is still on. At this point I can use Safely Remove Hardware icon and have it succeed (the LED goes off).

In the batch files I use with PStart I use 2 freebie utilities: unmount.exe which makes the drive unavailable followed by deveject.exe which turns the LED off.

Also: if AutoStart is not running when I plug the drive in I get the popup asking what to do but AutoRun is not an option, default or otherwise. If AutoStart is running the drive automatically mounts as it should.

This is on XP Pro SP2. I'm an administrator. Verbatim Store N Go 1G drive with U3 removed.

rene
Offline
Last seen: 17 years 7 months ago
Joined: 2006-03-29 16:16
Ah that explains it

My drive is a SanDisk U3 Titanium 2.0 GB USB Drive with the all U3 related material removed, i.e. U3 launchpad.

That explains it. Let me illustrate that with an example.
This is the device tree for my own U3 device.

USB Mass Storage Device
 +- Kingston Data Traveler U3 USB Device
 |   +--Generic Volume - (N:)
 +- Kingston Data Traveler U3 USB Device - (F:)

As you can see the device tree contains two volumes N: and F: where F: is the fake CDROM. When I told you I was being smart about ejecting I really meant that whenever the device tree gets complicated I just eject the volume from the drive instead of shutting down the whole tree up to and including USB Mass Storage Device Smile

So I see your U3 Drive as a complicated multi-card reader and therefore don't do what I should do.

I will extend the analysis of the device tree to specifically look for CDROM volumes inside the USB Mass Storage Device tree and based on that decide 'no this is not a multi-card reader, this is a USB Flash Drive with CDROM wart' and then shutdown the whole device tree.

Note that I actually safely ejected the volume that can be corrupted, so if you feel adventurous you can be very rude to your U3 device by just detaching it knowing your flash drive based volume has been saved anyway.

azjerry
Offline
Last seen: 7 years 3 months ago
Joined: 2005-12-09 12:42
no fake CD at this point

If he used the U3 uninstall program it actually removes the fake CDROM. The USB drive looks no different than a drive that never had U3. Only 1 drive letter is assigned. That's what happened when I removed the u# stuff from my Verbatim.

rene
Offline
Last seen: 17 years 7 months ago
Joined: 2006-03-29 16:16
I'll just analyze what I am

I'll just analyze what I am doing and try to fix it for the next release.
Perhaps I'm doing something else wrong.

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 26 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Not always

Sometimes some of the U3 structure is left behind by the uninstaller. It may, in fact, have one step deeper logical drive as the original had. Perhaps Rene can give you a code stub to analyze the structure of your drive.

Sometimes, the impossible can become possible, if you're awesome!

azjerry
Offline
Last seen: 7 years 3 months ago
Joined: 2005-12-09 12:42
folder structure doesn't work for me

My folder structure differs from what you search. I have

- the standard PortableApps folder- search of that works fine.

- a Programs folder that contains portable versions of other programs, each in it's own subfolder- search doesn't find these. And some of these have multiple .exes, some of which might make sense to have in the menu and others not.

- a folder off root that contains a number of installation programs. There's no need for these cluttering up the menu.

I also miss grouping into folders ala PStart. I can keep the most used in the main PStart list and group other less used but related in a folders.

rene
Offline
Last seen: 17 years 7 months ago
Joined: 2006-03-29 16:16
I think this goes beyond intended purpose for the install

The installation step will never be able to fully handle all the possible situations. The structure you describe cannot be handled by a generic algorithm.

If you don't feel comfortable with what the installation step has done, you need to go in and manually edit the contents of autorun.inf. A editing dialog for application shortcuts is planned as an extension at a later stage.

Good point about grouping though, I think I''ll support additional optional sections in the autorun.inf file for that.

azjerry
Offline
Last seen: 7 years 3 months ago
Joined: 2005-12-09 12:42
you're right of course,

an automated detection can't handle all cases. I was merely pointing out why automated by itself doesn't work for me. As long as I can edit the file I could get it working.

But if you only go one level deep you won't find the PortableApps either as they're two levels deep:
\PortableApps\FirefoxPortable\FirefoxPortable.exe

Another problem that has cropped up for me is that the autorun.inf doesn't work now. If AutoStart isn't running when I plug in the drive, I get the standard popup asking what to do but AutoRun is NOT one of the choices. If AutoStart is running, it works as you described.

This is on XP Pro SP2 and I'm an administrator.

rene
Offline
Last seen: 17 years 7 months ago
Joined: 2006-03-29 16:16
There is code in AutoStart that should handle this

To prevent popup of Autoplay when AutoStart is running I am manipulating NoDriveAutoRun in the registry under
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

When AutoStart starts it will backup the value in NoDriveAutoRun to NoDriveAutoRun.Original. Then it will disable autorun for all flash drives using a special NoDriveAutoRun value.

There is some voodoo going on with undocumented calls to the windows shell to get it all working together nicely.

When AutoStart stops it will restore NoDriveAutoRun from NoDriveAutoRun.Originial. Unless you kill AutoStart witb the taskmanager, this should restore Autoplay.

It does on my WindowsXP system and I'm running a fully patched US English Windows XP SP 2.

So could you perhaps dump values in the key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer and post the contents here ?

azjerry
Offline
Last seen: 7 years 3 months ago
Joined: 2005-12-09 12:42
here...

Windows Registry Editor Version 5.00

work PC (gets Windows popup, AutoStart not listed):
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDriveTypeAutoRun"=dword:00000091
"NoRecentDocsMenu"=hex:01,00,00,00

Home PC:
Interesting... the first 2 times I plugged it in I didn't get a popup but I did get an Explorer window for V:. Everytime since there's no reaction to plugging in the drive except the audio cue. Same NoDriveTypeAutoRun value. Neither machine has a NoDriveAutoRun.

PC is XP Pro SP2, administrator level account, flash drive is V:

rene
Offline
Last seen: 17 years 7 months ago
Joined: 2006-03-29 16:16
I've got it reproducable with a multi-card reader

I'm able to reproduce this behavior on Windows XP Professional SP 2.
I'm using my multi-card reader and I am seeing strange behavior there too.

My current theory is that this is related to ejecting media from a generic volume.

What I do is I first use an io control code IOCTL_STORAGE_EJECT_MEDIA to try and eject the media from the drive. Then I check whether the media is actually removed and when it is I assume it is a multi-card reader. In that case I'm not going up the device tree to try and shutdown the USB Mass Storage Device.

So we now have established that U3 drives are actually internally configured to have their media ejected.

I don't have a complete handle on all the factors involved, but what I do know is that at some point the explorer gets confused and doesn't handle Autoplay as it should.

Note that for me logging out and back in again fixes this problem.

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 26 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Ejection Code

Rene - Where did you get the code to programmatically eject a USB device from? The only code I could find for it was from Microsoft's Knowledgebase... which can't be incorporated into open source projects. So, I was left with a choice of closing the app... or just bringing up the USB safe eject dialog... I elected to do the latter in my menu.

Sometimes, the impossible can become possible, if you're awesome!

rene
Offline
Last seen: 17 years 7 months ago
Joined: 2006-03-29 16:16
With your permission I'd

With your permission I'd like to move that topic to a separate thread.
https://portableapps.com/node/3066

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 26 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Sure thing

I've responded there. Anyone else interested in contributing to the discussion, please do so in this new thread as well.

Sometimes, the impossible can become possible, if you're awesome!

Topic locked