DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 9 of 9

Thread: AutoRun

  1. #1
    Sergey Zaikin Guest

    AutoRun


    I need to make a program that will start automaticly when CD is inserted.
    The trouble I am getting into is how do I make it so it will find the drive
    letter of the CD and automaticly assign it to a string variable so I can
    run different program on same CD. If anyone has anything let me know thank
    you.

  2. #2
    Robert Gelb Guest

    Re: AutoRun

    Because autorun.inf will be on the same drive as your program, you can use
    relative path, like \..\yourprogram.exe

    --
    Robert Gelb

    "Sergey Zaikin" <szaikin@spk.usace.army.mil> wrote in message
    news:394ed276$1@news.devx.com...
    >
    > I need to make a program that will start automaticly when CD is inserted.
    > The trouble I am getting into is how do I make it so it will find the

    drive
    > letter of the CD and automaticly assign it to a string variable so I can
    > run different program on same CD. If anyone has anything let me know thank
    > you.




  3. #3
    Robert Gelb Guest

    Re: AutoRun

    Because autorun.inf will be on the same drive as your program, you can use
    relative path, like \..\yourprogram.exe

    --
    Robert Gelb

    "Sergey Zaikin" <szaikin@spk.usace.army.mil> wrote in message
    news:394ed276$1@news.devx.com...
    >
    > I need to make a program that will start automaticly when CD is inserted.
    > The trouble I am getting into is how do I make it so it will find the

    drive
    > letter of the CD and automaticly assign it to a string variable so I can
    > run different program on same CD. If anyone has anything let me know thank
    > you.




  4. #4
    Michael Culley Guest

    Re: AutoRun


    Left$(app.Path,3) & "MyDir\MyProc.exe"

    Michael Culley

    "Sergey Zaikin" <szaikin@spk.usace.army.mil> wrote:
    >
    >I need to make a program that will start automaticly when CD is inserted.
    >The trouble I am getting into is how do I make it so it will find the drive
    >letter of the CD and automaticly assign it to a string variable so I can
    >run different program on same CD. If anyone has anything let me know thank
    >you.



  5. #5
    Michael Culley Guest

    Re: AutoRun


    Left$(app.Path,3) & "MyDir\MyProc.exe"

    Michael Culley

    "Sergey Zaikin" <szaikin@spk.usace.army.mil> wrote:
    >
    >I need to make a program that will start automaticly when CD is inserted.
    >The trouble I am getting into is how do I make it so it will find the drive
    >letter of the CD and automaticly assign it to a string variable so I can
    >run different program on same CD. If anyone has anything let me know thank
    >you.



  6. #6
    Ray Mercer Guest

    Re: AutoRun

    Better not write this program in VB6 though...

    Unless it autoruns the installer first ;-)

    Ray

    "Michael Culley" <m_culley@one.net.au> wrote in message
    news:394eeee9$1@news.devx.com...
    >
    > Left$(app.Path,3) & "MyDir\MyProc.exe"
    >
    > Michael Culley
    >
    > "Sergey Zaikin" <szaikin@spk.usace.army.mil> wrote:
    > >
    > >I need to make a program that will start automaticly when CD is inserted.
    > >The trouble I am getting into is how do I make it so it will find the

    drive
    > >letter of the CD and automaticly assign it to a string variable so I can
    > >run different program on same CD. If anyone has anything let me know

    thank
    > >you.

    >




  7. #7
    Ray Mercer Guest

    Re: AutoRun

    Better not write this program in VB6 though...

    Unless it autoruns the installer first ;-)

    Ray

    "Michael Culley" <m_culley@one.net.au> wrote in message
    news:394eeee9$1@news.devx.com...
    >
    > Left$(app.Path,3) & "MyDir\MyProc.exe"
    >
    > Michael Culley
    >
    > "Sergey Zaikin" <szaikin@spk.usace.army.mil> wrote:
    > >
    > >I need to make a program that will start automaticly when CD is inserted.
    > >The trouble I am getting into is how do I make it so it will find the

    drive
    > >letter of the CD and automaticly assign it to a string variable so I can
    > >run different program on same CD. If anyone has anything let me know

    thank
    > >you.

    >




  8. #8
    René Whitworth Guest

    Re: AutoRun

    Depends on how the program was written (which controls are used, what
    references have been set).
    If you write an app using only the default controls you only need to make
    sure the MSVBVM60.DLL is in the same folder the app is in.
    If you use some OCXs or ActiveX DLLs you'll have to install them, but this
    can be done in the Sub Main of the app using our InstallOCX.bas (available
    on our site, link below).

    --
    Hope this helps ...

    Rene Whitworth
    Whitworth Software Solutions - Germany
    http://www.w-s-s.de
    Please reply to the newsgroup :-)


    "Ray Mercer" <raymer@mvps.org> schrieb im Newsbeitrag
    news:394f33f6@news.devx.com...
    > Better not write this program in VB6 though...
    >
    > Unless it autoruns the installer first ;-)
    >
    > Ray
    >
    > "Michael Culley" <m_culley@one.net.au> wrote in message
    > news:394eeee9$1@news.devx.com...
    > >
    > > Left$(app.Path,3) & "MyDir\MyProc.exe"
    > >
    > > Michael Culley
    > >
    > > "Sergey Zaikin" <szaikin@spk.usace.army.mil> wrote:
    > > >
    > > >I need to make a program that will start automaticly when CD is

    inserted.
    > > >The trouble I am getting into is how do I make it so it will find the

    > drive
    > > >letter of the CD and automaticly assign it to a string variable so I

    can
    > > >run different program on same CD. If anyone has anything let me know

    > thank
    > > >you.

    > >

    >
    >




  9. #9
    René Whitworth Guest

    Re: AutoRun

    Depends on how the program was written (which controls are used, what
    references have been set).
    If you write an app using only the default controls you only need to make
    sure the MSVBVM60.DLL is in the same folder the app is in.
    If you use some OCXs or ActiveX DLLs you'll have to install them, but this
    can be done in the Sub Main of the app using our InstallOCX.bas (available
    on our site, link below).

    --
    Hope this helps ...

    Rene Whitworth
    Whitworth Software Solutions - Germany
    http://www.w-s-s.de
    Please reply to the newsgroup :-)


    "Ray Mercer" <raymer@mvps.org> schrieb im Newsbeitrag
    news:394f33f6@news.devx.com...
    > Better not write this program in VB6 though...
    >
    > Unless it autoruns the installer first ;-)
    >
    > Ray
    >
    > "Michael Culley" <m_culley@one.net.au> wrote in message
    > news:394eeee9$1@news.devx.com...
    > >
    > > Left$(app.Path,3) & "MyDir\MyProc.exe"
    > >
    > > Michael Culley
    > >
    > > "Sergey Zaikin" <szaikin@spk.usace.army.mil> wrote:
    > > >
    > > >I need to make a program that will start automaticly when CD is

    inserted.
    > > >The trouble I am getting into is how do I make it so it will find the

    > drive
    > > >letter of the CD and automaticly assign it to a string variable so I

    can
    > > >run different program on same CD. If anyone has anything let me know

    > thank
    > > >you.

    > >

    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center