-
Hey folks.
I recently got a 2GB USB thumbdrive, and have started taking it with me everywhere I go. It has all my school-work, and also all of my CAD work for the company I work for. I always work OFF the stick, so everywhere I go I've got the latest drawings with me. My concern, however, is what happens if I lose the stick? Never mind the security implications of losing the original CAD drawings that I've worked so hard on to someone else who could steal them, but the biggest issue would be to lose the ONLY copy of all those drawings.
Now, I don't remember exactly how far we got on the whole thumbdrive auto-playing concepts back in the day here, but I need a way to make the drive copy itself onto the hard-drive, every time it's plugged in. So whenever I'd plug it in at school, up would pop the autoplay thingie, and I'd click 'School' and all the school files would go onto the school computer. Then I got home, I'd get the popup thingie and I'd click 'Work' and all the work files would go onto my computer.
Carlos, rest... help!Posted 5 years ago # -
Purpose: Create a USB drive with portable applications for computers with Windows 98 SE or newer.
Level: Stupid simple.
Time Required: 10 minutes on the short side, the rest of your life if you tinker around alot.
Intent:
Step 1 - Create as USB flash drive that contains portable freeware applications you can run on any Windows computer.
Step 2 - Create an autorun file for you USB flash drive
Required Ingedients:
computer with Windows 98 SE, Windows 2000, Windows XP or Windows 2003 installed and a free USB port.
USB drive of at least 128Mb capacity, more required if you wish to install more applications
Internet access to download portable applications
Sites with USB Portable Apps:
NB: I've put this at the top of the instructions as you'll want to refer to the list frequently once you've set up your drive. I tried to not list sites already on Wikipedia with the exception of John Haller's site which is quite possibly the best all round site that deals with portable apps
http://en.wikipedia.org/wiki/List_of_po ... plications - Probably the most complete list of portable apps I've seen yet.
http://portableapps.com - ohn T Haller's seminal site dealing with portable applications. PortableApps.com is a community site devoted to the development, promotion and use of portable applications.
http://loosewire.typepad.com/blog/2005/ ... y_of_.html - Jeremy Wagstaff's site that lists his choices of USB apps
http://www.combobulate.com/node/13 - This is a nice listing programs that will run off of your USB drive.
http://www.techtastic.ca/articles/portable.html - A short list of portable apps that can fit the bill.
Step 1 - Create a USB flash drive with portable freeware applications
Rather than cart a laptop around, why not just use a USB drive? It's portable, lightweight and easy to use. You'll need to download some applications from one of the sites listed above. The basic list of portable applications I recommend are the following:
Portable Firefox (web browser)
Portable Thunderbird (E-mail and newsgroup reader)
Portable Open Office (MS Office compatible apps)
Portable FileZilla (FTP program)
EssentialPIM (Personal information manager)
FoxitReader (PDF reader)
PStart (Application launcher)
Installation of each program will vary. the Portable Apps series of programs from Haller's site will install directly to the folder of your choice on the USB drive.
This is my recommended file structure for the USB drive (where x:\ is your USB drive root directory):
x:\
x:\pstart.exe
x:\apps
x:\apps\essentialpimport1
x:\apps\PortableFirefox
x:\apps\PortableOpenOffice
x:\apps\PortableThunderbird
x:\docs
x:\docs\images
x:\docs\notes
x:\docs\pdf
x:\docs\txt
These are, of course, nothing more than recommendations as your needs will dictate how you set things up. If you chose a different files structure for your applications, you will need to adjust the next Step's instructions accordingly.
I've placed PStart.exe in the root directory of my USB drive. That makes it easy to locate and run in case the autorun feature is disabled on the computer currently in use. PStart will create an .xml file in the same directory as the executable. These are the only files I keep in the root directory, everything else gets filed in x:\docs.
Step 2: Create an autorun file for your USB drive
Now that you've installed your applications and given them a test run to show they work correctly you'll probably be ready for the next step; adding an autorun.inf file to your USB drive.
Why would you want to do this? It makes access to your USB drive's apps much more convenient. When you plug the drive in, the application specificed on the autorun.inf will appear at the top of the popup list, waiting for you to click it. Also, when you right click on the USB drive in Windows Explorer, you'll be presented with a list of all the programs you've set up. To run your app of choice, simply click on it from the right click context menu. You'll also learn how to specify a custom icon that will appear in Windows Explorer.
If you followed my suggested file structure above, you can copy the lines below and everything will work right away.
First, create a text document with the name "autorun.inf" in the root folder of your USB drive.
Second, paste into this document the following text:
---------Start Copy below this line------------------------
[autorun]
action=Launch Portable Start Menu
icon=..\PStart.exe
open=..\PStart.exe
Label = MyDrive
shell\essential=&EssentialPIM
shell\essential\command=..\apps\Essentialpimport1\EssentialPIM.exe
shell\firefox=&FireFox
shell\firefox\command=..\apps\PortableFirefox\PortableFirefox.exe
shell\thunderbird=&ThunderBird
shell\thunderbird\command=..\apps\PortableThunderbird\PortableThunderbird.exe
shell\openoffice=&OpenOffice
shell\openoffice\command=..\apps\PortableOpenOffice\PortableOpenOffice.exe
---------Stop Copy above this line-----------------------
You'll see a few references to "..\Apps\" The double dots refer to the root directory of the device. Don't change that because you'll want the relative path. You won't always know beforehand the drive letter of your USB device so the relative path gets you to the root of your USB drive. The "\Apps\" should be changed to reflect the location of the program you want to autorun. If your program is in the root directory then change it to read "\yourapp.exe".
Here's an explanation of the different entries:
-->[autorun]
This is nothing more than a section label that goes with a specific platform. If you wish, you could create several section labels that identify actions to perform based upon the platform (always a windows OS). Some other options are:
[autorun.mips]
[autorun.alpha]
[autorun.ppc]
-->action=Launch Portable Start Menu
This is the text that shows up in the Autorun pop up window when you insert the USB drive. Under XP, if you have the Autorun feature enabled for removable media, this text will show as the first line in the Autorun pop up window. All you need do is click OK and you're off!
-->icon=..\PStart.exe
This determines what Icon will show up for the drive in Windows Explorer. You can be creative and point it to an icon file named whatever.ico with your own personalized icon or you can point it to any other program you want. If your icon file or exe contains several icons, you can specifywhich one to use by placing a comma (without a space) after the file name and then the number of the icon you want to use. EG: icon=..\Apps\PStart.exe,3
-->open=..\PStart.exe
This is the name of the program you want to launch from the pop up window.
-->label=MyDrive!
This tells Windows what name you want your drive to have in Windows Explorer. I'm sure there are limitations as to length but I haven't bothered figuring that out yet. Go crazy with this.
-->shell\firefox=&FireFox
-->shell\firefox\command=..\apps\PortableFirefox\PortableFirefox.exe
If you have one of these lines, you should have the other. The first line creates the text for the right click context menu in Windows Explorer. The ampersand appears before the letter you want underlined to create the Alt- combination to activate the command. It doesn't workin this context though. Hitting the Alt key will make the context menu go away....
The next value is the action to perform. In this case we want the program PortableFirefox.exe to run so we put a fully qualified relative path (I love it!) to our application in there. You can add any number of these into your right click context menu, just keep repeating this for everything you want to add in.
Copyright © 2006 by James Weaver
Maastricht, June 2, 2006.Steven Hodson
WinExtra / Shooting at Bubbles / Braincell SoupPosted 5 years ago # -
OK, that is the basic idea. I haven't done it in a while, and need to refresh myself, especially after seeing Brookstone implement my idea. Actually I don't think you really want any portable apps. You're just working with data. You need the ini file so that it autoplays, and gives you a menu (work, home).
I believe you will have to write two bat files to do the copying same as you would automate any transfer. When you click home you will then runetc.
Let me know if that is enough information.No sweat G.I., pretty soon payday.Posted 5 years ago # -
Steven's above lines don't actually explain how to do what I want to accomplish. This brings up ONE option, which runs one program.. I need more than one option in the pop-up, which run more than one program (or bat file)
Can I just do like this ??
[autorun]
action=Launch 1
open=..\1.bat
action=Launch 2
open=..\2.batPosted 5 years ago # -
Arni wrote:Steven's above lines don't actually explain how to do what I want to accomplish. This brings up ONE option, which runs one program.. I need more than one option in the pop-up, which run more than one program (or bat file)
Can I just do like this ??
[autorun]
action=Launch 1
open=..\1.bat
action=Launch 2
open=..\2.bat
[autorun]
action=School
open=..\school.bat
action=Work
open=..\work.bat
action=Home
open=..\home.bat
That would give you better results. Have you searched for any programs available on the internet that will do this? The PStart program will create an autorun menu for you if you desire. What you really need is a .com program that will automatically figure out the drive letter of the USB drive and then copy the needed files from there onto a designated location on the computer.Posted 5 years ago # -
PJ wrote:[autorun]
action=School
open=..\school.bat
action=Work
open=..\work.bat
action=Home
open=..\home.bat
That would give you better results.
What's the difference between what you wrote, and what I wrote? Because what I wrote doesn't work (I get only one menu, Launch 1)PJ wrote:Have you searched for any programs available on the internet that will do this? The PStart program will create an autorun menu for you if you desire. What you really need is a .com program that will automatically figure out the drive letter of the USB drive and then copy the needed files from there onto a designated location on the computer.
shouldn't xcopy ../work/*.* /s C:\dobuments\blablabla\ work? do I really need the drive letter at all ?
Incidentally, I can just write the bats to work on THIS machine (which gives the drive D without change), and the school computer's (which give the drive E without change) and basically make it count on the fact that the drive letters never change ! ? !
Oh, OT: Found out today at school that it's quite easy to boot off a thumbdrive (I knew it worked in BIOS flashing, but never thought about it this way), so would there be something to gain by loading XP Corp + Program files onto a THUMB drive, and booting from that all the time ?Posted 5 years ago # -
Arni wrote:What's the difference between what you wrote, and what I wrote? Because what I wrote doesn't work (I get only one menu, Launch 1)
shouldn't xcopy ../work/*.* /s C:\dobuments\blablabla\ work? do I really need the drive letter at all ?
Arni, I should have paid more attention to what you wrote. My re-write was to give you a third option that would cover all of your bases. In either case, the commands are totally wrong. A USB drive gives you the option to autorun only 1 program which is specified by the open= command. In this case you're trying to get it to run three commands. Won't work. May I suggest a more careful reading of the text? The options are, hopefully, clearly explained. If not, let us know and I'll have a chat with the author and have things corrected.
PStart.exe will write an autorun file for you that will open the menu and let you select which batch file you wish to run. The batch file names you put will work but a more descriptive name may be more helpful. Your command line will work as well (correct the spelling though). Drive letters are needed in the destination of your files.
There are other options.
1. Use a U3 enabled flash drive. It will autorun as though it were a CD inserted into a CD drive. U3 requires the manufacturer build in the autorun functionality.
2. PStart.exe will pop up with a menu if you have autorun enabled on your computer.
3. A recently updated program called Ceedo 2.0 will provide the functionality of U3 flash drives. It costs $30 and will work with any flash drive. Ceedo can be found at http://www.ceedo.com.
4. Another option is MS's own freeware program called USB Flash Drive Manager. This is a somewhat different approach in that the program resides on the computer and will, on demand, make a backup copy of your USB drive or a specified directory. You'll have to search for it on the MS website.
5. Here's another option (freebee) that may fit your needs:
1. Use PStart.exe to create an autorun menu with three options.
2. Exit out and then manually edit the autorun.inf file.
3. Using your xcopy command, change each of the entries to fit your needs. Don't use a batch file, just enter the command directly onto the line.
e.g.
shell\=Home
shell\command = xcopy ..\work\*.* C:\documents\bla\*.* /s
a. Remember to pay attention to the number of characters you use to create your subdirectories. DOS has a limit of 256 characters. Directory names and file names added together can create very long names, sometimes well over 256 characters.
b. You may need to try using quotes in strategic locations in order to work around DOS' issues with spaces in file names. The command, as it is above, should work without quotes.
c. Your command line switches (/s) occur at the end of the xcopy command.
d. The DOS command "copy" would not work for you in this case as it doesn't offer the /s switch.
e. If you know the drive letter of the flash drive will not change, you can substitute it in just before the \work\ so it'll appear as x:\work\*.* where x represents your static drive letter. My experience is that the static drive letter mapping is unpredictable.
You would repeat the above two lines the number of times needed to provide all the options you want. Not forgetting to modify each line appropriately.
Good luck and don't hesitate to ask if you have problems.
PJPosted 5 years ago # -
PJ wrote:[autorun]
action=School
open=..\school.bat
action=Work
open=..\work.bat
action=Home
open=..\home.bat
Shouldn't it be- Code: Select all
[autorun]
action=School
open=.\school.bat
action=Work
open=.\work.bat
action=Home
open=.\home.bat
instead?"If those who say bad things about me knew what I think of them, they'd say even worse." (Sacha Guitry)
------------------------------------------------
"Earth is the cradle of mankind. Nobody can live in the cradle forever" (Constantin Tsiolkovski)Posted 5 years ago # -
Pierre wrote:Shouldn't it be
- Code: Select all
[autorun]
action=School
open=.\school.bat
action=Work
open=.\work.bat
action=Home
open=.\home.bat
instead?
*shrug*
Well, ok. But only because you want it that way.
In truth, you're correct. In practice, it doesn't make much difference at the end of the day. It's just a difference of how far up the directory structure you want to look. The .. is a reference to the next directory level up the tree. ..\xxx.bat will, hopefully ensure you look up to the next level for the file. If it's not found, then it will look in the directory you currently occupy. .\xxx.bat will only look in the currently occupied directory. How much of a difference is it? Hadn't thought of it much.... When I initially put the text file together I started with an MS document that had the double dot, so I just kept it as it was.Posted 5 years ago # -
PJ wrote:The .. is a reference to the next directory level up the tree. ..\xxx.bat will, hopefully ensure you look up to the next level for the file. If it's not found, then it will look in the directory you currently occupy.
That's not how DOS or Windows work. If you specify a path, the system will not look elsewhere. If you don't, it will first look in the current directory, then in the various directories named in the PATH environment variable, if any. There is no default PATH.Posted 5 years ago # -
Pierre wrote:That's not how DOS or Windows work. If you specify a path, the system will not look elsewhere. If you don't, it will first look in the current directory, then in the various directories named in the PATH environment variable, if any. There is no default PATH.
Again, you are correct. The worst part, I already knew what you were saying. In the day I was a batch file guru. I wrote many a batch file menu and file management system. There is a PATH environment variable (two actually) under XP. Right click on "My Computer" and select Advanced. You'll find a button for "Environment" under there. Click that and you'll find all the familiar environment variables: path; temp; tmp; windir.Posted 5 years ago # -
PJ wrote:There is a PATH environment variable (two actually) under XP.
You're correct, sorry. For some reason I was thinking of booting from the USB flashdrive, not autostarting it
Posted 5 years ago # -
Hey now, both of you guys are right. Yeeha, let's drink.Pierre wrote:You're correct, sorry. For some reason I was thinking of booting from the USB flashdrive, not autostarting it
Posted 5 years ago # -
xcarlosx wrote:Hey now, both of you guys are right. Yeeha, let's drink.
As though you needed a reason...
Posted 5 years ago # -
Pierre wrote:As though you needed a reason...

You are, of course, correct in your assessment of the situation. I would like to extend it though to my present situation: as though I needed a reason....Posted 5 years ago #

