Running all files from Cd-rom

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • RoadRash
    Forum Member
    • Jun 2003
    • 7

    Running all files from Cd-rom

    I have a question. I read through the users guide section "Leaving all files on CD-rom" but I did not understand it. I am making a cdrom that will have a bunch of pdfs on it and also acrobat reader. I want setup to just install a shortcut to the users desktop that will run reader and open the pdf from the cdrom. I know how to get reader to run the pdf (/Reader/AcroRd32.exe nameof.pdf) but I have not figured out how to get setup to work like I want.

    Any help would be greatly appreciated.
  • Darryl
    Indigo Rose Staff Member
    • Jul 2001
    • 1908

    #2
    Re: Running all files from Cd-rom

    Just to make sure I understand your question, all you want the installation to do is create a shortcut on the user's system and you don't need any of the files on the CD-ROM installed on the user's system?

    The CD-ROM tab in Setup Factory is used to both install files on the user's system and allow them to exist on the CD-ROM so they can be accessed. The ARCHIVE tab is used to compress all of the files into the installation executable.

    In this case what you want to do is create a Create Shortcut action. You can find it in the main actions list and you can create it anywhere in Design->Actions.

    Your Create Shortcut action should look something like the following:

    Folder: %DesktopNT%
    (This is the path to the user's Desktop. You could alternatively use %Desktop%. Look in the built-in variables section for a description of both)

    My Shortcut Description: My PDF shortcut

    Target File: %SrcDir%\Reader\AcroRd32.exe
    (This is the path to the reader on the CD-ROM)

    Command Line Arguments: "%SrcDir%\myfile.pdf"
    (This is the full path to the PDF file on the CD-ROM to open in the reader, enclosed in quotes)

    So what this will do is create a shortcut on the user's desktop that will open Acrobat reader on the CD-ROM and pass it your PDF file.

    Hope that helps.

    Comment

    • RoadRash
      Forum Member
      • Jun 2003
      • 7

      #3
      Re: Running all files from Cd-rom

      Thank you for the help. I will try out what you suggested. You were correct about what I am trying to accomplish.

      thanks

      Comment

      • RoadRash
        Forum Member
        • Jun 2003
        • 7

        #4
        Re: Running all files from Cd-rom

        That process worked great.

        But there are a couple of things that puzzle me.

        1. When I do an uninstall everything gets deleted except the shortcut on the desktop

        2. After I have installed the shortcut and remove the cd and put it back in, the cd trys to install itself again even though it is already installed. Does that have to to do with setup factory or would that be my autorun? I am currently using cdeverywhere to make my autorun.

        Comment

        • Darryl
          Indigo Rose Staff Member
          • Jul 2001
          • 1908

          #5
          Re: Running all files from Cd-rom

          1) In Setup Factory everything that you create in your install with an action, must also be removed with an action. For example, if you created a Registry entry, you would also need to remove it with an action. Therefore in your case, what you will need to do is create a Remove Shortcut action on the After Uninstalling tab of the Uninstall.

          2) CD's with the autorun feature will always autorun and launch the .exe. One option is to create a Registry entry in your install that will write a value to the user's Registry after the install. Then, the first thing you will do in your install is check to see if that Registry entry exists. If it does, you could perform an Abort action, otherwise continue with the install.

          Hope that helps.

          Comment

          • RoadRash
            Forum Member
            • Jun 2003
            • 7

            #6
            Re: Running all files from Cd-rom

            ok, I am attempting to do the actions to add a reg entry and also check for one. And I am running into problems. I think I have figured out how to add a reg entry (set value?) , and I think I figured out how to check for an entry but how do I set it to abort if it finds the entry?

            Comment

            • Darryl
              Indigo Rose Staff Member
              • Jul 2001
              • 1908

              #7
              Re: Running all files from Cd-rom

              In the Control Structures category of the actions list, you will find an "Abort" action which will abort the installation process. Therefore you will want to conditionally launch that action based on the result of your Registry Read. To do that you would use an IF control structure with a condition such as:

              %MyRegistryVar% = "TRUE"

              So the code would look something like:

              IF (%MyRegistryVar% = "TRUE")
              Abort Setup
              END IF

              Hope that helps.

              Comment

              • tfair
                Indigo Rose Customer
                • Aug 2005
                • 9

                #8
                Shortcut does not work

                Not in reply to the above queries but along the same lines... I have exactly the same setup -- but I want the shortuct icon to have a message along the lines of "Please insert the disk 'nameofdisk'..." when the disk does not happen to be inserted. This is because right now, the shortcut icon simply highlights and does nothing if the CD is not in -- no indication to the user that he/she should insert the CD.

                Thinking I had the code wrong, I have tried using both %SrcDir% and %SrcDrv% as my path in the System Editors > Shortcut Icons > Shortcut Command Properties > Target File field, but both produced the same result.

                Any help appreciated.

                Comment

                Working...
                X