Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2005
    Posts
    51

    File.run problem

    I use the following Code:

    Code:
    Productkey_result = File.Run(_TempLaunchFolder.."\\add-on.bat", "", "", SW_SHOWNORMAL, true);
    When this code is ran I get the following as the batch file runs:

    D:\>Productkey AIS xxxxxxxxxxxxxxx /q

    'Productkey' is not recognized as an internal or ....."

    D: in this case is the CD rom. Three files, hasp.exe, add-on.bat and productkey.exe are all installed a primer files. Hasp.exe runs without a problem. Add-on.bat wants to run from the CD rather then the (_TempLaunchFolder .

    This is what the actual command looks like in the batch file:

    Code:
    ProductKey AIS t1nvtpj1ttivvjci /q
    Any clues?

  2. #2
    Join Date
    May 2000
    Location
    Indigo Rose Software
    Posts
    2,150
    I would add this to the code:

    Code:
    FileHome = File.DoesExist(_TempLaunchFolder.."\\add-on.bat");
    if FileHome then
    Dialog.Message("","The file exists in the proper location");
    else
    Dialog.Message("","The file exists in the proper location");
    end
    This will let you know if Setup Factory is recognizing the file or not. Also check out the temp folder manually and see if that file makes and appearance.

    Adam Kapilik

  3. #3
    Join Date
    Aug 2005
    Posts
    51
    Add-on.bat was there and found. Turns out the problem is with the help files.

    From the help file:
    WorkingFolder
    (string) The working folder to set for the executable file.
    Note: This sets the current directory for the operation to something other than the folder that the file is in (em added) . Normally, you can just leave it blank.
    This suggests that the working or current directory is, in my case, the temp install folder and that WorkingFolder does not need to be set. However, the working folder remains the CD drive which is why productkey was not found when add-on.bat was ran. File.Run just uses the path given to run the file. If another file is also needed File.run must be specificly told where that file is or it assumes the file is in the _SourceFolder.



    The problem was solved by adding "SessionVar.Expand("%TempLaunchFolder%")" as the working folder. Oddly enough, "_TempLaunchFolder.." returns an error if you try to use it in the WorkingFolder position.

Similar Threads

  1. Problem installing fonts
    By ByronFS in forum Setup Factory 7.0
    Replies: 5
    Last Post: 05-08-2006, 12:23 PM
  2. Problem running File.Run
    By casman in forum Setup Factory 7.0
    Replies: 11
    Last Post: 03-28-2006, 10:23 AM
  3. File.Run script problem
    By naruto in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 02-13-2006, 07:07 PM
  4. File.run _sourcefolder problem
    By SpudGunMan in forum AutoPlay Media Studio 5.0
    Replies: 26
    Last Post: 09-07-2004, 06:32 PM
  5. INFO: Tips for Debugging Action Lists in AutoPlay Media Studio 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 08:38 AM

Posting Permissions

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