Loading ...
Sorry, an error occurred while loading the content.
 

AW: [libertybasic] Re: USB drive

Expand Messages
  • Jon Donohue
    I agree Stefan, no reason why the user shouldn t be responsible. Until now I just wasn t sure how or why things were working the way they were. Now that I know
    Message 1 of 16 , Feb 4, 2010
      I agree Stefan, no reason why the user shouldn't be responsible. Until now I just wasn't sure how or why things were working the way they were. Now that I know I shall set up my program in a fashion that I hope will make it easy to use on a USB drive. Perhaps there is a way to lock it on a drive so that it can be the only program on it? Is that possible?

      Thanks to all for there input. Tally-Ho, hey wot?

      Jon M Donohue
      donohuejon@...
    • Stefan Pendl
      ... Ad 1) This is set to ask the user for an action by default. You must at least once decide what action to take and select to always take that action as
      Message 2 of 16 , Feb 5, 2010
        >
        > The example I gave worked for me. The application runs
        > immediately upon inserting the USB stick.
        >
        > In my machine, autoplay was already enabled. This can be be checked.
        > 1) Contr Panel > Autoplay > Install or run program
        > 2) Contr Panel > Admin Tools > Services > Plug and Play
        >

        Ad 1)
        This is set to ask the user for an action by default.
        You must at least once decide what action to take and
        select to always take that action as default.
        Some Tweaking tools diced for you in this case,
        but I do not recommend to use Tweaking tools.

        Ad 2)
        This service is enabled by default, so there is nothing to do.

        ---

        There is nothing holding you back to create a menu application that is launched by the auto-run process, where you can select, which
        of the included programs should be started.
        Gordon Sweet has created an application launcher, which he offers with full source code at his site
        http://www.sigord.co.uk/npage4.html

        ---
        Stefan Pendl

        Liberty BASIC Assist 4.03 ........ http://www.libertybasic.com/assist.html
        Liberty BASIC 4.04 public beta ... http://www.libertybasic.com/lb404b3setup.exe

        Books at http://www.lulu.com/
        APIs for Liberty BASIC ..................... by Alyce
        Beginning Programming with Liberty BASIC ... by Carl

        Windows Vista Home Premium 32-bit SP2
        AMD Turion X2 RM-70 2GHz, 4GB RAM
      • rod_bird001
        I m sure other folks find this works but it is not working for me and I am not sure if it is working yet for Jon. Lets be clear about what we are talking
        Message 3 of 16 , Feb 5, 2010
          I'm sure other folks find this works but it is not working for me and I am not sure if it is working yet for Jon.

          Lets be clear about what we are talking about. Jon wants an .exe written to a stick to auto launch when it is plugged into a PC. No pre installation or fiddling, just pop the stick in and it runs.

          I can't get that to happen on Windows 7. There are three parts to it I think. The first is to have a .exe on the stick that runs when clicked. I do. The second is to have an Autorun file in the root of the stick that points at the .exe. In my case thats

          [autorun]
          open=fractal.exe
          icon=fractal.exe

          The .exe is held on the disc which is named I as I:\fractal\fractal.exe

          I used CreateApplication to copy dlls sll a.tkn and renamed run.exe
          All that works, but the one thing I am not sure about is should the path be included in the autorun.inf file? I have tried a path but no change.

          The third problem is to get AUTORUN to fire. What happens is I do get an AUTOPLAY dialog poping up but it never shows my .exe as an option just all the usual play with x ,y,z there is no run or install option presented. I have configured AUTOPLAY to install or run program files.

          Now when I last posted it was AUTORUN I was really discussing. I know I can fiddle with AUTOPLAY settings but the MSDN writings were implying it was AUTORUN that needs enabled for USB drives and I can't find how to do that, it is discussed as a Registry entry. Not my speciality.

          Or perhaps I am doing something really simple and stupid. If anyone has managed to get a stick to AUTORUN in Win 7 please say.

          I isn't a matter of life or death for me I'm just trying to get absolute clarity for Jon.

          --- In libertybasic@yahoogroups.com, "green8819" <green8819@...> wrote:
          >
          > I've wanted to try this for a long time.
          > I followed the cue from Bill Lopez and got it right on Vista.
          >
          > Naturally, to run a LB app without LB, you have to package it with TKN. Add the autorun file.
          >
          > Transfer everything to the USB stick. That's it.
          >
          > * Let's assume your application is 'Dice.bas' in your computer.
          > * Create a new folder in the blank USB drv, and name it 'Dice'.
          > * Open LB, open the app. (do not open the app directly). Do not run the app.
          > * Click Run > Create Application > Browse > Open the 'Dice' folder
          > * File name = Dice.exe > Save > Create
          > * Open the 'Dice' folder. It should contain the TKN, DLLs, SLLs, etc.
          > (You now have the packaged app which will run on any windows computer).
          >
          > * Right-click inside the folder, > New > Text Document
          > * Right-click the 'Text Document', rename it to 'autorun.inf'
          > * Open 'autorun.inf', then type-in these 3 lines:
          > [AutoRun]
          > open=dice.exe
          > icon=dice.exe
          > * Save. Now you have the app and its autorun file in the USB stick.
          > * 'Safely' remove the USB, wait for a while.
          > * Plug-in back the USB, and the app runs.
          >
          > It's easy. Try it. Only then I will tell you about a better and easier way to do it.
          >
        • Stefan Pendl
          ... Rod, your autorun/autoplay file works only for I: fractal.exe If you have I: fractal fractal.exe, you need the following: [autorun]
          Message 4 of 16 , Feb 5, 2010
            >
            > I can't get that to happen on Windows 7. There are three
            > parts to it I think. The first is to have a .exe on the stick
            > that runs when clicked. I do. The second is to have an
            > Autorun file in the root of the stick that points at the
            > .exe. In my case thats
            >
            > [autorun]
            > open=fractal.exe
            > icon=fractal.exe
            >
            > The .exe is held on the disc which is named I as
            > I:\fractal\fractal.exe
            >

            Rod,
            your autorun/autoplay file works only for I:\fractal.exe

            If you have I:\fractal\fractal.exe, you need the following:

            [autorun]
            open=fractal\fractal.exe
            icon=fractal\fractal.exe

            Use only relative paths, since you never know, which drive letter will be assigned to the removable media on a different system.

            ---
            Stefan Pendl

            Liberty BASIC Assist 4.03 ........ http://www.libertybasic.com/assist.html
            Liberty BASIC 4.04 public beta ... http://www.libertybasic.com/lb404b3setup.exe

            Books at http://www.lulu.com/
            APIs for Liberty BASIC ..................... by Alyce
            Beginning Programming with Liberty BASIC ... by Carl

            Windows Vista Home Premium 32-bit SP2
            AMD Turion X2 RM-70 2GHz, 4GB RAM
          • rod_bird001
            ... Thanks Stefan, I had tried that and did try again but no luck. I have Software and Games set to Install or run programs. I have since set Mixed Content to
            Message 5 of 16 , Feb 5, 2010
              > Rod,
              > your autorun/autoplay file works only for I:\fractal.exe
              >
              > If you have I:\fractal\fractal.exe, you need the following:
              >
              > [autorun]
              > open=fractal\fractal.exe
              > icon=fractal\fractal.exe
              >
              > Use only relative paths, since you never know, which drive letter will be assigned to the removable media on a different system.
              >
              > ---
              > Stefan Pendl
              >

              Thanks Stefan, I had tried that and did try again but no luck. I have Software and Games set to Install or run programs. I have since set Mixed Content to Open files and view with Explorer. That does open the stick in Explorer but again it isn't what Jon want's to happen.

              If success depends on how the system is set then Jon's never going to get the solution he want's.
            • rod_bird001
              I found this Blog which seems to suggest that autorun is now disabled for USB memeory sticks because of raising misuse. It keeps idiots like me from coming to
              Message 6 of 16 , Feb 5, 2010
                I found this Blog which seems to suggest that autorun is now disabled for USB memeory sticks because of raising misuse. It keeps idiots like me from coming to harm. However this idiot is a step ahead because I can still get to the "malware" by enabling Mixed Content/Open in Explorer and then navigating to the .exe. However this is far from what Jon set out to achieve.

                http://blogs.msdn.com/e7/archive/2009/04/27/improvements-to-autoplay.aspx

                I wonder Jon if you should change tack. After all all you want to do is present information the user has recorded. Why not consider an application that writes all the info as a picture say JPG and is saved to a microSD card. All systems ar far more lenient about JPG and most any computer , printer or even some phones would allow the data to be displayed.
              • Bill Lopez
                Rather than waiting for someone to reply... I would drop the extra space and see if they work, but that s just the way I am. [Non-text portions of this message
                Message 7 of 16 , Feb 5, 2010
                  Rather than waiting for someone to reply... I would drop the extra space and see if they work, but that's just the way I am.





                  [Non-text portions of this message have been removed]
                • rod_bird001
                  I didn t have such spaces in my paths.
                  Message 8 of 16 , Feb 5, 2010
                    I didn't have such spaces in my paths.

                    --- In libertybasic@yahoogroups.com, "green8819" <green8819@...> wrote:
                    >
                    > Could the two formats below be in error, because of the extra space:
                    >
                    > [autorun]
                    > open=fractal\ fractal.exe
                    > icon=fractal\ fractal.exe
                    >
                    > [autorun]
                    > open=fractal. exe
                    > icon=fractal. exe
                    >
                  • Eddie
                    It will only autorun if the user s system is set to autorun from usb drive. By default, it is not set to. Eddie ... [Non-text portions of this message have
                    Message 9 of 16 , Feb 5, 2010
                      It will only autorun if the user's system is set to autorun from usb drive.
                      By default, it is not set to.

                      Eddie

                      On 5 February 2010 23:43, rod_bird001 <rodbird@...> wrote:

                      >
                      >
                      > I found this Blog which seems to suggest that autorun is now disabled for
                      > USB memeory sticks because of raising misuse. It keeps idiots like me from
                      > coming to harm. However this idiot is a step ahead because I can still get
                      > to the "malware" by enabling Mixed Content/Open in Explorer and then
                      > navigating to the .exe. However this is far from what Jon set out to
                      > achieve.
                      >
                      > http://blogs.msdn.com/e7/archive/2009/04/27/improvements-to-autoplay.aspx
                      >
                      > I wonder Jon if you should change tack. After all all you want to do is
                      > present information the user has recorded. Why not consider an application
                      > that writes all the info as a picture say JPG and is saved to a microSD
                      > card. All systems ar far more lenient about JPG and most any computer ,
                      > printer or even some phones would allow the data to be displayed.
                      >
                      >
                      >


                      [Non-text portions of this message have been removed]
                    • Bill Lopez
                      Okay, we know how to create an auto run file, but we don t know if the user s computer is set to auto run. In previous decades, software vendors used to send
                      Message 10 of 16 , Feb 5, 2010
                        Okay, we know how to create an auto run file, but we don't know if the user's computer is set to auto run. In previous decades, software vendors used to send floppies with instructions to simply insert them into the floppy drive to run. Also with a small written notice, "If the program fails to start automatically, open myWhizBang folder and double click on Start, or Run, Install, or whatever. Some users do have the ability to follow simple instructions.



                        [Non-text portions of this message have been removed]
                      • rod_bird001
                        My point is that there appears to be no way in Win7 to enable AUTORUN for usb devices. Unless you can tell me how to set it up? I have tried all flavours of
                        Message 11 of 16 , Feb 6, 2010
                          My point is that there appears to be no way in Win7 to enable AUTORUN for usb devices. Unless you can tell me how to set it up? I have tried all flavours of AUTOPLAY.

                          --- In libertybasic@yahoogroups.com, Eddie <eddie9139@...> wrote:
                          >
                          > It will only autorun if the user's system is set to autorun from usb drive.
                          > By default, it is not set to.
                          >
                          > Eddie
                          >
                          > On 5 February 2010 23:43, rod_bird001 <rodbird@...> wrote:
                          >
                          > >
                          > >
                          > > I found this Blog which seems to suggest that autorun is now disabled for
                          > > USB memeory sticks because of raising misuse. It keeps idiots like me from
                          > > coming to harm. However this idiot is a step ahead because I can still get
                          > > to the "malware" by enabling Mixed Content/Open in Explorer and then
                          > > navigating to the .exe. However this is far from what Jon set out to
                          > > achieve.
                          > >
                          > > http://blogs.msdn.com/e7/archive/2009/04/27/improvements-to-autoplay.aspx
                          > >
                          > > I wonder Jon if you should change tack. After all all you want to do is
                          > > present information the user has recorded. Why not consider an application
                          > > that writes all the info as a picture say JPG and is saved to a microSD
                          > > card. All systems ar far more lenient about JPG and most any computer ,
                          > > printer or even some phones would allow the data to be displayed.
                          > >
                          > >
                          > >
                          >
                          >
                          > [Non-text portions of this message have been removed]
                          >
                        • Stefan Pendl
                          ... There will be no way to get AutoRun/-Play back for Win7 and later. See http://blogs.technet.com/srd/archive/2009/04/28/autorun-changes-in-windows-7.aspx
                          Message 12 of 16 , Feb 6, 2010
                            > > >
                            > > > I found this Blog which seems to suggest that autorun is
                            > now disabled for
                            > > > USB memeory sticks because of raising misuse. It keeps
                            > idiots like me from
                            > > > coming to harm. However this idiot is a step ahead
                            > because I can still get
                            > > > to the "malware" by enabling Mixed Content/Open in
                            > Explorer and then
                            > > > navigating to the .exe. However this is far from what Jon
                            > set out to
                            > > > achieve.
                            > > >
                            > >
                            > > It will only autorun if the user's system is set to autorun
                            > from usb drive.
                            > > By default, it is not set to.
                            > >
                            >
                            > My point is that there appears to be no way in Win7 to enable
                            > AUTORUN for usb devices. Unless you can tell me how to set it
                            > up? I have tried all flavours of AUTOPLAY.
                            >

                            There will be no way to get AutoRun/-Play back for Win7 and later.
                            See http://blogs.technet.com/srd/archive/2009/04/28/autorun-changes-in-windows-7.aspx

                            Sorry Rod, but the bad boys have won this fight >:-(

                            ---
                            Stefan Pendl

                            Liberty BASIC Assist 4.03 ........ http://www.libertybasic.com/assist.html
                            Liberty BASIC 4.04 public beta ... http://www.libertybasic.com/lb404b3setup.exe

                            Books at http://www.lulu.com/
                            APIs for Liberty BASIC ..................... by Alyce
                            Beginning Programming with Liberty BASIC ... by Carl

                            Windows Vista Home Premium 32-bit SP2
                            AMD Turion X2 RM-70 2GHz, 4GB RAM
                          Your message has been successfully submitted and would be delivered to recipients shortly.