+ Post New Thread
Results 1 to 9 of 9
How do you do....it? Thread, How to make visual basic application run when double click cd drive/usb drive in Technical; I'm creating a little application in visual basic 2010 express to mount/dismount a truecrypt volume thats stored on a USB ...
  1. #1

    Join Date
    Jun 2010
    Location
    England
    Posts
    735
    Thank Post
    89
    Thanked 52 Times in 46 Posts
    Rep Power
    35

    How to make visual basic application run when double click cd drive/usb drive

    I'm creating a little application in visual basic 2010 express to mount/dismount a truecrypt volume thats stored on a USB drive.
    I want this application to autorun when someone double clicks on the USB device.

    How can i do this?
    It's for windows XP and 7.

    I tried the autorun.inf way of
    open=myapplication.exe

    When I double click the usb drive it doesnt launch the application. Can i do something in visual basics to make the application autorun?

    I want it to work like when you insert a windows cd into your pc. If you insert windows XP and go my computer and double click the cd drive the setup.exe will launch. I want exactly this, just it needs to work on a usb device and launch my visual basic application

    please help
    Last edited by ihaveaproblem; 11th June 2011 at 11:14 PM.

  2. #2

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,696
    Thank Post
    335
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Win7 auto blocks autorun.inf on USB drives for "security reasons"

    Steve

  3. #3

    Join Date
    Jun 2010
    Location
    England
    Posts
    735
    Thank Post
    89
    Thanked 52 Times in 46 Posts
    Rep Power
    35
    But why does Windows XP CD still work then?
    If i go to my computer and double click the CD drive that XP is in it launches the setup.exe automaticaly.

    Why can windows XP do it but not me lol?

    EDIT

    Also it doesnt work on XP for me either.

  4. #4

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,696
    Thank Post
    335
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Fixed media can still run, aka cd/DVD it was done to stop Conficker on USB.

    Can you copypaste whole autorun you're trying

    Steve

  5. #5

    Join Date
    Jun 2010
    Location
    England
    Posts
    735
    Thank Post
    89
    Thanked 52 Times in 46 Posts
    Rep Power
    35
    Ah that makes sence!
    It should work on WinXp though right?

    My autorun is this
    [autorun]
    label=Encrypted
    open=encrypt.exe
    icon=encrypt.exe
    encrypt.exe is in the root of the usb along with the autorun.inf

  6. #6

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,696
    Thank Post
    335
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Quote Originally Posted by ihaveaproblem View Post
    Ah that makes sence!
    It should work on WinXp though right?

    My autorun is this


    encrypt.exe is in the root of the usb along with the autorun.inf
    Assuming they haven't disabled autorun it'llproc autoplay, giving option to run it.

    However not sure your name tag is valid, I may be mistaken but isn't it label? Or is there both

    Steve

  7. #7


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    8,899
    Thank Post
    226
    Thanked 2,676 Times in 1,973 Posts
    Rep Power
    787
    The only way you're going to get this to work is to use USBDLM to automatically run Encrypt.exe when the USB flash drive is inserted. I can post more details if interested?

  8. #8

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,696
    Thank Post
    335
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Quote Originally Posted by Arthur View Post
    The only way you're going to get this to work is to use USBDLM to automatically run Encrypt.exe when the USB flash drive is inserted. I can post more details if interested?
    I took the assumption this is for staff at home, so installing a per pc client didn't seem to work

    Steve

  9. #9

    Join Date
    Jun 2010
    Location
    England
    Posts
    735
    Thank Post
    89
    Thanked 52 Times in 46 Posts
    Rep Power
    35
    Thanks both. I decided to drop having it auto run and went down a different route.
    Thanks again.

SHARE:
+ Post New Thread

Similar Threads

  1. Run out of space on Server C drive!
    By phantomphan in forum Wireless Networks
    Replies: 39
    Last Post: 22nd June 2011, 01:03 PM
  2. redirecting Application data to a mapped drive
    By craigg in forum Windows Server 2008 R2
    Replies: 5
    Last Post: 9th February 2011, 09:07 AM
  3. USB DRIVE
    By mhussain in forum Windows
    Replies: 16
    Last Post: 24th June 2010, 12:55 PM
  4. Make a data drive
    By leco in forum How do you do....it?
    Replies: 4
    Last Post: 18th February 2009, 01:06 PM
  5. How do I make an USB Drive Bootable.?
    By Grommit in forum Windows
    Replies: 7
    Last Post: 17th December 2007, 07:56 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •