View Full Version : More mods need help sometimes...
Here's what I need...
I am trying to put together a USB flash memory drive image that consists of OpenOffice.org portable, KeePass portable and a launcher...all to go onto about 200 1 GB drives...
The actual image of the drive is done...that is the easy part.
The hard part is...
I want to put it on a CD for someone else to do the actual install to the drives. We need to assume that the person doing the actual install knows next to nothing on how to do this. So what I want is something that will pretty much 'self install'. I can make the image a 'self extracting' zip file that will pause and allow the user to choose a drive to install to...but, that requires some sort of user interaction and some idea of where/what letter the drive is.
I want to eliminate that step and make it pretty much an 'automatic' thing, with a possible over ride/check to prevent the overwriting of the data already on the drive.
Whatever I come up with needs to be able to be used under 2k through Vista...
It would be nice to add a few other 'features' like some documentation for the software that can be accessed before the install, fancy buttons, a help file, but none of that is absolutely necessary.
So, let the ideas flow...
david eaton
08-28-2008, 05:48 PM
It may not be quite what you were looking for, but "browsercall" is a nice little program that can be called from an autorun.inf file on the cd. then a bit of HTML, and you have your doumentation, and install instructions done. Get it from http://www.ashzfall.com/products/autorun/browsercall.html
It may have what you are looking for, but it wouldn't all be accessable from the CD... I was thinking of doing an image of the drive. Then just throw the drive image onto the flash drive. The only big problem is that it may be hard to do the install from Windows, it might have to be done during boot up.
Paul Komski
08-29-2008, 01:53 AM
So what I want is something that will pretty much 'self install'. I can make the image a 'self extracting' zip file that will pause and allow the user to choose a drive to install to...but, that requires some sort of user interaction and some idea of where/what letter the drive is.
I want to eliminate that step and make it pretty much an 'automatic' thing, with a possible over ride/check to prevent the overwriting of the data already on the drive.
Unless there is some way of identifying the flash drive - perhaps there is - I don't see any way of avoiding any user intervention. There are any number of ways to either restore block data from an image file or to copy files or to self-extract them via the file-system but the destination must be capable of being identified to allow for automation. Are all the flash devices identical etc, etc?
If the chosen drive contains a file system but no files it is quite possible to query those facts using simple enough Win32 APIs that can be written into a simple VB exe. A specific id file could also be a way of confirming the drive but then I guess the user would need to copy it to the drive in advance. There are other ways to query the file system using VB.NET (or C, C+, etc) but I have avoided becoming familiar with them. In fact a simple vbscript might do all that you need - would have to explore that one and scripts are not always the best because so much script-blocking goes on.
You might want to have a play with Spoon Installer (http://sourceforge.net/projects/spoon-installer/) which can create a wizard driven install and so forth and it is not that hard to become familiar with; simpler and "cheaper" than most WinInstallers.
Auto-running html files (or other "documents") just requires the shellexecute command (http://www.wizbit.net/business_card_cd_creating_autorun_file.htm#shellex ecute) and the inf file (win2k and above).
I've gone ahead and simplified it some...decided not to worry about the autodetection of the USB drive and just let the end user worry about getting it to correct place.
So, the disk is built and ready to be put into action...
The whole point of this is to provide an 'easy to use' way of getting OpenOffice.org Portable onto several hundred flash drives for the freshman and sophomores at my daughter's high school...they were all given a drive this year and are expected to do 'everything' on it...but the staff was all complaining about the various versions of MS Office and the lack of compatibility...especially for Win2k and the newest Office versions. Most of the school's computers are 2k/XP machines with only a couple Vista machines, mostly in admin use.
I may revisit this disk at some point, but it is now functional...
Paul Komski
08-29-2008, 07:06 AM
Glad you are happy with where you are but I wish you hadn't posed these questions because its really bugging me to not be able to get it to work - cross platform that is. :mad: :mad:
There's quite a good MS utility (http://www.microsoft.com/downloads/thankyou.aspx?familyId=94991901-bfc4-485e-bcae-c9df0accdaae&displayLang=en) that will detect one or many flash drives and allow various manipulations to take place but it only functions on WinXPSP2 so that limits things a lot. It's quite a useful little baby to have in one's armoury in general though.
Auto-running things from the USB flash devices can be accomplished but isn't really of direct value here I guess since it means something must be installed to the relevant drive in advance. There are also cross platform differences and some of the configs and differences, as well as ways to manually write the autorun.inf files for flash drives, are outlined on this web page (http://www.samlogic.net/articles/autorun-usb-flash-drive.htm) and this one (http://www.pctipsbox.com/how-to-autorun-programs-from-usb-flash-drive/).
I know it must be capable of being done but I haven't yet been able to configure my own API to do so. I know, because it can be done by SyncBack-SE (http://www.2brightsparks.com/syncback/syncback-hub.html) (the paid version) which could be a neat way of doing it. It certainly works under both Win2K and WinXP and I'm pretty sure it is now supported under Vista.
Basically you set up a backup profile with the files you want copied sitting on your hard drive. Make the destination the relevant flash drive letter that it has or will be given by windows. Then under "When" you choose "Insert" and can specify the drive by label or serial number (just dir it under command prompt if you want to know its label or serial ID) or by drive letter. It can be set to run after a prompt or without user intervention. Now every time a relevant drive is inserted into that PC the copy process can be fully automated.
that sounds like an interesting Disc now that it is finished, any chance you will post it somewhere and give us the link to it?
Paul Komski
08-29-2008, 06:36 PM
that sounds like an interesting Disc now that it is finished, any chance you will post it somewhere and give us the link to it?
Just download and install to your heart's content
http://www.pcguide.com/vb/showthread.php?t=46483
well, the disk would make things a bit more convient...
Paul Komski
08-31-2008, 08:05 PM
mjc - you may have already got your job done but (even though it was a bit of a struggle) I think I have created a utility (http://www.paulski.com/zpages.php?id=1624) that will do what you want.
It was much harder than I anticipated and you need to manually override with Windows 2000. Even if too late for any help now it should have a couple of uses in a number of areas - including a simplified way of doing backup - for the future.
I'm pretty busy at the moment but it should be possible to customise it further if there is a need.
Sylvander
09-01-2008, 04:58 AM
Paul
Tried detectusb.exe
As with your previous offering = Selective Cloner, it looks good and does its job.
EXCEPT...
Any chance it could be made to copy a complete branch of a higherarchical system of sub-folders and files, rather than only the files in the folder?
If so I could use it to copy the [755MB] contents of my 1GB D: partition to my 1GB USB Flash Drive.
Paul Komski
09-01-2008, 05:04 AM
Any chance it could be made to copy a complete branch of a higherarchical system of sub-folders and filesIt's my intention to include this (or include it as an option); it's just finding the time, especially during the very small window of good weather we have here just now.
Sylvander
09-01-2008, 06:33 AM
"it's just finding the time, especially during the very small window of good weather we have here just now"
Understood. :)
Paul Komski
09-01-2008, 09:24 AM
It wasn't too hard to do while I was waiting for a customer. Some bugs fixed and others found.
Thanks Paul, this is turning out to be exactly what I was after...I'll probably play around with it a bit more later tonight.
Paul Komski
09-01-2008, 12:18 PM
I've managed to get it to detect and even autocopy under Win2K now. Revamped a few things and should hopefully upload v3 shortly (problems with ISP FTP currently).
The most tricky part of this venture has been to have the "loop" watching for device changes not interfere with the app itself. At first it was crashing out all over the place but I'm more familiar with the API as things stand. In fact although it is currently set to just do file system jobs such as copying there's now no fundamental reason to not initiate any other actions (say command line imaging for example) and I'm really glad I took up this challenge.
I'm going to give it a try running from the CD I built...since I didn't get it to them last week, I may just revamp it before I give it to them.
Paul Komski
09-01-2008, 12:58 PM
Theoretically there should be no basic problem from a CD but since the API's device detection seems to be capable of detecting IDE CD insertion and ejection (and I haven't learned yet how to finesse all its funcions) its possible that it would interfere with autodetection/autocopying. If that's a problem just do an override and then insert the USB flash memory. I had avoided such CD actions by just using the storage device information as my "trigger" but I had to enable other functions to get USB detection to happen under Windows 2000.
In such a case the manual copy button would also need to be activated since the next job I have in mind is to be able to do a total reset once the program is already running. Currently it must be stopped and restarted and that's not so easy if you are intending to autorun it from a CD. If it will autofunction from the CD please let me know.
Works fine from a CD...now to tweak the autorun.inf for the CD to behave the way I want and this one can go to production.
I may even fire up 2k and see how well it behaves there...
I wonder would it work in a VM (I may try that later, too)?
Sylvander
09-02-2008, 02:57 AM
I'm running Win2000Pro.
Super improvement in version 2! :D :cool:
Copied an extensive folder branch with MANY sub-folders and files [lots of portable programs]...
To the root of the USB Flash Drive.
Dare I ask?
Would it be possible to specify [navigate to] a destination folder on the Flash Drive?
I had previously tried copying the whole of my PC's D: partition, and it looked like it was doing well, so I went off to do some other work, and when I came back there was a warning:
"StartCopying" failure. Error #476
This because it was attempting to copy data files in use by Programs.
Paul Komski
09-02-2008, 05:34 AM
Would it be possible to specify [navigate to] a destination folder on the Flash Drive?Possible certainly but at the moment not probable coz trying to keep things as simple as possible (means less potential bugs in a beta situation for one thing). I realize that the utility can be used as a backup type of utility but that is not its primary function. Just now, I am concentrating on learning how to use and make use of the dynamic detection of drive insertion/removal. The "workaround", as is, is to modify source files and folders and put the exe in the parent folder of the tree to which you want to copy to the destination drive. There's no reason not to put mulitple copies of the exe in folders from which you want to run the program - but best to just run one of them at a time or you and the system may get muddled. There are no .ini files or reg entries so the exe is completely standalone (at the moment anyways).
This because it was attempting to copy data files in use by Programs.That's just the sort of "bug" I would expect at this stage and useful to know for future consideration. There's no detection of available space either. Error trapping and its management is one of the real bug-bears in application development. At least it didn't bomb-out without any warning.
Sylvander
09-02-2008, 06:17 AM
1. "I am concentrating on learning how to use and make use of the dynamic detection of drive insertion/removal."
It certainly does that flawlessly on my system. :D :cool:
2. "put the exe in the parent folder of the tree [branch] you want to copy to the destination drive...no reason not to put muliple copies of the exe in folders from which you want to run the program - but best to just run one of them at a time or you and the system may get muddled"
That's one of the things I like about this; the simplicity of that.
The exe file is so small that it wouldn't use too much space to put multiple copies in each folder [and its contents] to be copied, and run it from there.
Would be something of a pest to need to run one after the other, going through the whole process each time...
And then there's the problem that [at the present time] it isn't possible to specify a different destination folder for each copy/backup.
So each of those would lose their parent folder and would all be thrown together in the same root folder.
Not good for maintaining good order.
I know it's easy for me to get ambitious for what your program could do when it's you who has to do all the work of development...
But perhaps that's a good system for deciding which way to go?
An ordinary user who has no idea of the difficulties involved [whilst keeping it real] makes a wish list, and the wizard figures a way to make it happen.
Paul Komski
09-02-2008, 06:46 AM
I want to keep it simple - its a general philosophy of my own - and I think that many developers get carried away with making things more complex than needed or which attempt to do all things for all men in all OSes and on all PCs and just finish up with bloat. I prefer to use simple apps designed to do one thing.
We may be at cross-purposes but if you want to copy stuff to X:\folderA then you just need to have a source folder tree ...\sourcefolder\folderA and place the exe in the source folder: go to manual mode and deselect all files and select the sub-folder (folderA) that you want. If you want now to copy the same stuff to X:\folderB you would need to create a new source folder tree or just temporarily rename folderA to folderB and re-run the application.
If you have multiple instances just create shortcuts to them in a folder of your choice or use a file manager such as A3 to organise them. The shortcut line for the new shortcut wizard to open a folder (as a target for A3) is "%windir%\explorer.exe /e,<path to folder>". Just create it on the desktop and drag-n-drop into the A3 QuickLaunch Area. Ordinary shortcuts to folders wont function from A3 - only ones to files or exes.
A side-line of such simplicity that I have had in mind is that I can install it where it is needed (especially for people like my uncle who have great difficulty navigating or browsing directory trees) and pop a shortcut onto the desktop for easy access. If I then ensure he has a single drive-letter USB device its a no-brainer to get him to back-up his stuff.
petey2020
09-29-2008, 08:48 AM
Use a flash drive. Insert, go to my computer, right click on the flash drive, choose sharing and securities or properties, choose the autoplay tab on top, then under actions pick choose an action, files and folders and select the application. When the flash drive is inserted and found the application will automatically execute.
ummm...petey2020, did you actually read the original post?
The point of this was to try to come up with a way for a non-technically inclined user to be able to 'clone' a number of flash drives with minimal intervention. Especially, changing any permissions or settings...
vBulletin v3.6.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.