Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2004
    Posts
    4

    Newbie (File.Run)

    X:\CDIMAGE.EXE –lLABEL –t31/01/2004,12:00:00 –h –n –m –o –x X:\FOLDER C:\CD.ISO
    (where X is the drive the CD is in)

    I'm experimenting with the Trial version of AutoPlay Media Studio 5.0.

    I'm trying to produce a button to run the above, but I can't get it to work. This is what I've got:

    File.Run("CDIMAGE.EXE", "–lOFFICE11 –t06/20/2003,12:00:00 –h –n –m –o –x %SrcDrv%\OFFICE C:\OFFICE2003.ISO", "", SW_MAXIMIZE, true);

    Can someone tell me what I'm doing wrong?

  2. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi. Glad to have you in the forum:

    1) You are using %SrcDrv% which is deprecated in AMS 5.0, for reference on 5.0's Global Variables check out this: Click Here

    2) You need to escape slashes inside quotes in 5.0, i.e. "Autoplay\Docs\" becomes "AutoPlay\\Docs\\" for more on this check out the escape sequences in the String section here: Click Here

    3) Here's a good link on File.Run() including examples: Click Here

    Hope that helps.

    Corey Milner
    Creative Director, Indigo Rose Software

  3. #3
    Join Date
    Jan 2004
    Posts
    4
    Thanks for the help, but I still can't get it to work.

    I've changed it to:

    File.Run("CDIMAGE.EXE", "-d -h -n -m {_SourceDrive}\\FOLDER C:\\CD.ISO", "", SW_MAXIMIZE, false);

    (At this rate it would be quicker to write something in vb!)

    This is what I'm trying to run:
    X:\CDIMAGE.EXE -d -h -n -m X:\FOLDER C:\CD.ISO
    (where X is the drive the CD is in)

    Am I using the _SourceDrive variable correctly.

  4. #4
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi. You can't embed variables in a string, they need to be concatenated, i.e.:

    "-d -h -n -m {_SourceDrive}\\FOLDER C:\\CD.ISO"

    Becomes:

    "-d -h -n -m ".._SourceDrive.."\\FOLDER C:\\CD.ISO"

    Hope that helps...

    Corey Milner
    Creative Director, Indigo Rose Software

  5. #5
    Join Date
    Jan 2004
    Posts
    4
    Thanks.

    Sorry to be a pain, but I still can't get this to work.

    Now trying:

    File.Run("CDIMAGE.EXE", "-d -h -n -m ".._SourceDrive.."\\FOLDER C:\\CD.ISO", "", SW_MAXIMIZE, false);

  6. #6
    Join Date
    Jan 2004
    Posts
    4
    Thanks for the help. I seem to have got it working now. Not sure what I changed though.

    Up until now I've been using Publish to test the menu by creating an ISO and mounting it on a virtual drive.

    However, I have just tried Preview and I noticed that it's not clever enough to cope with the _SourceDrive as if it were being used on a CD. (Instead of referring back to the CD_Root folder it refers back to C:\.)

  7. #7
    Join Date
    Jan 2000
    Posts
    2,002
    Use _SourceFolder instead of _SourceDrive if that is what you are trying to accomplish.

Posting Permissions

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