what code should i do to autorun a program to my computer using my USB? or just a program that will execute a start up and save it to the computer?VB6

u mean the program can be run when your usb connect to computer?

or you mean run from usb?

i guest connect the usb and run from usb.

specify more friend..

I've just done some testing on the laptop (running Vista) and have found that an autorun.inf kind of works in that it pops up the "AutoPlay" dialog (which usually gives you options to choose from - whether to load music into WMP, pictures into the picture viewer or just to go to explorer and view the contents) except after lumping in an autorun.inf (I'll enter this file's contents below), I only have 2 options... one to open the exe referenced in the autorun.inf and the other to go to windows explorer and view the drive contents.

[autorun]
icon=icon.ico
open=apps\test_app.exe

for info, I have a folder named "apps" on my usb flash key with test_app.exe inside of it but you'd just need to change the items to your own settings.

I have had problems getting it to work on an old PC of mine at home, so I suppose its a case of trial and error...

what is test_app.exe>?

it's like a virus behavior that will the usb from computer and autorun the file i want and save to computer and run

what is test_app.exe>?

its your exe name...
if you want the program copied their self to new pc, you must added function to copy their self in your program...

what is test_app.exe>?

it's like a virus behavior that will the usb from computer and autorun the file i want and save to computer and run

test_app.exe is the app I used to demonstrate the autorun.inf working.

As Jx_Man said, you could add the functionality to your application which will make it copy itself to the computer. Alternatively, you could possibly call a batch file or a small VB project which copies a file from the USB key onto the computer using FSO and then run it that way...

FSO and then run it that way...

what do you mean of this?

what do you mean of this?

If you had a 2nd VB app on your usb flash drive which auto-loaded when inserted, this 2nd app could copy the main app to your computer.

I would say the easiest option would be to have a batch file running when the flash drive is inserted, or even editing the existing app to copy itself over.

A batch file (whilst easy to make), would look unattractive to the user, but it depends what the purpose of your application is really and who the end user is.

A batch file (whilst easy to make), would look unattractive to the user, but it depends what the purpose of your application is really and who the end user is.

can i have a sample of wat u r saying...


any one are intersted to help to create a program that will execute a computer using flash drive just p.m me

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.