DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 9 of 9

Thread: autorun

  1. #1
    jatefio Guest

    autorun


    I am a new user of VB and have what I hope is a simple question. I am creating
    an instructional CD using Lotuse Screen cams. I have created a simple interface
    using VB. I have created a straight forward inf autorun file but is that
    all I need on my CD. I want people to simply stick the CD in and have it
    automatically run my VB interface. Do I need to write any code into my exe.
    file in case a computer has a different drive designated for the CD ROM?

  2. #2
    Shawn K. Hall Guest

    Re: autorun

    Depends on how you call the app in autorun:

    Should be something like:
    open=mycoolapp.exe

    and NOT
    open=D:\mycoolapp.exe

    The application does not need to handle it automatically, *unless* you
    need to install the application the first time (like require runtimes
    or controls on the harddrive) in which case you should design the exe
    on the open statement to check a certain value on the computer (like
    checking for the existence of a registry key) and either starting the
    install or passing off to the application. If you need to do this, I
    recommend designing the "open" application in another language (like
    C++) which has the required runtimes on the destination PC - that will
    keep your app from flaking out when the destination PC doesn't have
    the vb runtimes.

    Regards,

    Shawn K. Hall
    Programmer / Analyst
    *Please* post/respond in the newsgroups!
    http://i.am/shawnkhall


    "jatefio" <bmackenz@silver.ugdsb.on.ca> wrote in message
    news:393c4e1a$1@news.devx.com...
    >
    > I am a new user of VB and have what I hope is a simple question. I

    am creating
    > an instructional CD using Lotuse Screen cams. I have created a

    simple interface
    > using VB. I have created a straight forward inf autorun file but is

    that
    > all I need on my CD. I want people to simply stick the CD in and

    have it
    > automatically run my VB interface. Do I need to write any code into

    my exe.
    > file in case a computer has a different drive designated for the CD

    ROM?



  3. #3
    Eric D. Burdo Guest

    Re: autorun

    Your biggest problem is going to arise if the user does not have VB runtimes
    on their machine. Then your autorun will generate an error. VB is not a
    good choice for autorun programs. You may want to look into something else.

    --

    Eric D. Burdo, Red-Leif International
    VB Programmer and Consultant
    <http://www.redleif.com>

    *** Please reply to the newsgroup so all can benefit. ***
    "jatefio" <bmackenz@silver.ugdsb.on.ca> wrote in message
    news:393c4e1a$1@news.devx.com...
    >
    > I am a new user of VB and have what I hope is a simple question. I am

    creating
    > an instructional CD using Lotuse Screen cams. I have created a simple

    interface
    > using VB. I have created a straight forward inf autorun file but is that
    > all I need on my CD. I want people to simply stick the CD in and have it
    > automatically run my VB interface. Do I need to write any code into my

    exe.
    > file in case a computer has a different drive designated for the CD ROM?




  4. #4
    Kathleen Dollard-Joeris Guest

    Re: autorun

    Eric,

    > Your biggest problem is going to arise if the user does not have VB

    runtimes
    > on their machine. Then your autorun will generate an error. VB is not a
    > good choice for autorun programs. You may want to look into something

    else.

    Actually for anyone who still has it, VB3 works just fine. Avoids learning a
    new language.

    --
    Kathleen
    (MS-MVP)
    Reply in the newsgroup so everyone can benefit
    --



  5. #5
    Jim Pragit Guest

    Re: autorun


    As Kathleen stated, you can rewrite your application using VB3. But you have
    to give up classes, OCXs, and just about every other advance of the last
    5-10 years. Plus, you'll be creating 16-bit code instead of 32-bit.

    If you want to learn a new language, try Delphi:

    http://www.borland.com/delphi/

    Delphi can create a stand alone EXE that runs directly from a CD without
    a setup program. It's similar to VB (you drag and drop controls on a form
    just like VB) except it uses Pascal as its underlying language instead of
    BASIC. If you're not willing to shell out your hard-earned money without
    trying it first, you can get a free demo from the following URL:

    http://www.borland.com/delphi/trial5/trialdownload.html

    - Jim

    "Kathleen Dollard-Joeris" <kjoeris@noemailplease.com> wrote:
    >Eric,
    >
    >> Your biggest problem is going to arise if the user does not have VB

    >runtimes
    >> on their machine. Then your autorun will generate an error. VB is not

    a
    >> good choice for autorun programs. You may want to look into something

    >else.
    >
    >Actually for anyone who still has it, VB3 works just fine. Avoids learning

    a
    >new language.
    >
    >--
    >Kathleen
    >(MS-MVP)
    >Reply in the newsgroup so everyone can benefit
    >--
    >
    >



  6. #6
    Kathleen Dollard-Joeris Guest

    Re: autorun

    Jim,

    > As Kathleen stated, you can rewrite your application using VB3. But you

    have
    > to give up classes, OCXs, and just about every other advance of the last
    > 5-10 years. Plus, you'll be creating 16-bit code instead of 32-bit.


    None of which you need/want for any Autorun program I can think of. I am not
    suggesting people right non-trivial stuff in VB3. Delphi or C are better if
    there is a requirement to do _nothing_ to the users machine in all cases in
    all operating systems.

    --
    Kathleen
    (MS-MVP)
    Reply in the newsgroup so everyone can benefit
    --



  7. #7
    Kathleen Dollard-Joeris Guest

    Re: autorun

    Jatefio,

    You will need to install VB runtimes if they are not already on the users
    machine. The autorun exe should check whether you installed and either run
    the installer or the application. The autorun exe should not be written in
    VB above VB3, since the point is that the run times may not be there.

    --
    Kathleen
    (MS-MVP)
    Reply in the newsgroup so everyone can benefit
    --
    jatefio <bmackenz@silver.ugdsb.on.ca> wrote in message
    news:393c4e1a$1@news.devx.com...
    >
    > I am a new user of VB and have what I hope is a simple question. I am

    creating
    > an instructional CD using Lotuse Screen cams. I have created a simple

    interface
    > using VB. I have created a straight forward inf autorun file but is that
    > all I need on my CD. I want people to simply stick the CD in and have it
    > automatically run my VB interface. Do I need to write any code into my

    exe.
    > file in case a computer has a different drive designated for the CD ROM?




  8. #8
    Jim Pragit Guest

    Re: autorun


    Well, I guess it depends on the type of code you write. Personally, I can't
    think of any recent program I've written that didn't use at least one class
    or 32-bit specific feature. I don't rely too much on OCXs (I prefer my own
    homegrown code) but I know many people do.

    I just wanted the poster (and anyone else reading this thread) to know that
    there are alternatives besides rewriting your code in VB3.

    - Jim

    "Kathleen Dollard-Joeris" <kjoeris@noemailplease.com> wrote:
    >Jim,
    >
    >> As Kathleen stated, you can rewrite your application using VB3. But you

    >have
    >> to give up classes, OCXs, and just about every other advance of the last
    >> 5-10 years. Plus, you'll be creating 16-bit code instead of 32-bit.

    >
    >None of which you need/want for any Autorun program I can think of. I am

    not
    >suggesting people right non-trivial stuff in VB3. Delphi or C are better

    if
    >there is a requirement to do _nothing_ to the users machine in all cases

    in
    >all operating systems.
    >
    >--
    >Kathleen
    >(MS-MVP)
    >Reply in the newsgroup so everyone can benefit



  9. #9
    Greg Silvano - CodeHound.com Guest

    Re: autorun

    I know this is going to result in a billion people telling me that I'm
    wrong, BUT...

    You *can* write a simple application in VB4/5/6, compile it to an EXE, and
    just put the MSVBVMx.DLL in the same directory on the CD-ROM. As long as
    you don't use anything outside the scope of the intrinsic VB functions, it
    will work just fine. Yes, I am correct...please try it on a totally clean
    machine before responding with "No, Greg - you're an idiot".

    And yes, I mean a totally clean machine: format the hard drive and install
    Win95 from the CD-ROM. Don't install anything else. Look for any VB
    runtimes and unregister/delete as necessary (the VB5/6 runtimes obviously
    won't be there, but look anyway). Put a simple "Hello World" EXE in a
    directory with MSVBVM6.DLL in the same directory and the EXE will run just
    fine.

    I still would *never* do this for a commercial application (I use an autorun
    program called "AutoPlay Menu Studio" from Indigo Rose:
    http://www.indigorose.com , which I love), but it is nonetheless possible.

    --
    Regards,

    Gregory Silvano
    http://www.codehound.com
    Free Internet Search Engine for VB Developers

    "Eric D. Burdo" <vbtips@redleif.com> wrote in message
    news:393d0e19$1@news.devx.com...
    > Your biggest problem is going to arise if the user does not have VB

    runtimes
    > on their machine. Then your autorun will generate an error. VB is not a
    > good choice for autorun programs. You may want to look into something

    else.
    >
    > --
    >
    > Eric D. Burdo, Red-Leif International
    > VB Programmer and Consultant
    > <http://www.redleif.com>
    >
    > *** Please reply to the newsgroup so all can benefit. ***
    > "jatefio" <bmackenz@silver.ugdsb.on.ca> wrote in message
    > news:393c4e1a$1@news.devx.com...
    > >
    > > I am a new user of VB and have what I hope is a simple question. I am

    > creating
    > > an instructional CD using Lotuse Screen cams. I have created a simple

    > interface
    > > using VB. I have created a straight forward inf autorun file but is

    that
    > > all I need on my CD. I want people to simply stick the CD in and have

    it
    > > automatically run my VB interface. Do I need to write any code into my

    > exe.
    > > file in case a computer has a different drive designated for the CD ROM?

    >
    >




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