Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2003
    Posts
    69

    Can someone please help with problem passing command line arguments

    I am usually able to figure things out on my own but I really need some help on this one.

    I have have tried numerous times, combinations and spent days and hours now trying to figure this out and I just can't. I am sure it is something stupid like a slash somewhere I have missed.

    I have a project that I need to upgrade from AMS 4 to AMS 6 my previous code worked fine in AMS 4 but now I can't get this to work in AMS 6

    In AMS 4 I used:

    File Execute

    With the following:

    FileNames C:\Program Files\Microsoft Office\ART\Office\MSACCESS.EXE

    Args "C:\Program Files\MY Software\system\ini.mdb" /runtime /WRKGRP "C:\Program Files\MY Software\system\key.mdw" /user My Name /pwd 1234

    Working Folder C:\Program Files\MY Software\system\

    The only thing I can get to work using Action File.Run in AM6 is:

    FileNames "C:\\Program Files\\Microsoft Office\\ART\\Office\\MSACCESS.EXE"

    Whenever I add any variation of The command line arguments to pass to the executable such as:

    Args "C:\Program Files\MY Software\system\ini.mdb" /runtime /WRKGRP "C:\Program Files\MY Software\system\key.mdw" /user My Name /pwd 1234

    Working Folder C:\Program Files\MY Software\system\

    I get errors in AMS or errors starting MS Access that it is not a valid MS Access Command.

    I have tried \\ and /\ & \/ and you name it and I cant get the argument to pass properly.

    Please Help!

  2. #2
    Join Date
    Feb 2005
    Location
    Mn
    Posts
    770
    Just use file.open to open the file and MSACCESS will open the file.
    It will give warnings about it but can be open that way.

  3. #3
    Join Date
    Sep 2003
    Posts
    69
    Thanks but that won't work. The command line arguments are required.

  4. #4
    Join Date
    Jan 2000
    Posts
    2,002
    What is the exact script code that you are using? Please supply it as that will make debugging easier.

  5. #5
    Join Date
    Aug 2004
    Location
    Somewhere in Texas, USA
    Posts
    417
    Maybe this will help.

    Code:
    -- TRY THIS
    
    varApp = "C:\\Program Files\\Microsoft Office\\ART\\Office\\MSACCESS.EXE"
    varArgs = "\"C:\\Program Files\\MY Software\\system\\ini.mdb\" /runtime /WRKGRP \"C:\\Program Files\\MY Software\\system\\key.mdw\" /user My Name /pwd 1234\""
    File.Run(varApp, varArgs, "", SW_SHOWNORMAL, true);
    
    -- OR THIS
    
    varApp = "C:\\Program Files\\Microsoft Office\\ART\\Office\\MSACCESS.EXE"
    varArgs = "C:\\Program Files\\MY Software\\system\\ini.mdb\" /runtime /WRKGRP \"C:\\Program Files\\MY Software\\system\\key.mdw\" /user My Name /pwd 1234"
    File.Run(varApp, varArgs, "", SW_SHOWNORMAL, true);

  6. #6
    Join Date
    Sep 2003
    Posts
    69
    Thanks! I am almost there....

    I can now get this to work:

    "\"C:\\Program Files\\\\MY Software\\system\\ini.mdb\" /runtime /WRKGRP \"C:\\Program Files\\MY Software\\system\\key.mdw\" /user My Name /pwd 1234\""

    but it chokes on the Password. MS Access pops up a window with the correct User Name and that the password is invalid. I then type in the same password manually and then it opens the database.

    I need this to be transparent so the User does not have to enter the password everytime.

    Does anyone else have any sugestions?

    Thanks in advance!

  7. #7
    Join Date
    Sep 2003
    Posts
    69
    Hi Bret!

    Here is a stripped down project of what I am trying to do.

    It obviously won't work since you do not have ms access runtime installed, but you can see what I am trying to accomplish and hopefully tell me where I am going wrong.
    Attached Files

  8. #8
    Join Date
    Sep 2003
    Posts
    69
    Ok!

    I finally got it to work.

    Special thanks to mwreyf1 for pointing me in the right direction, Thanks!

    This is what I was using:

    "\"C:\\Program Files\\\\MY Software\\system\\ini.mdb\" /runtime /WRKGRP \"C:\\Program Files\\MY Software\\system\\key.mdw\" /user My Name /pwd 1234\""

    This is what worked:
    "\"C:\\Program Files\\\\MY Software\\system\\ini.mdb\" /runtime /WRKGRP \"C:\\Program Files\\MY Software\\system\\key.mdw\" /user My Name /pwd 1234"

    The difference so it is easy to see:
    "\"C:\\Program Files\\\\MY Software\\system\\ini.mdb\" /runtime /WRKGRP \"C:\\Program Files\\MY Software\\system\\key.mdw\" /user My Name /pwd 1234\""

    This should now work for all of the MS Access Commands such as Compact Repair, etc...

    Thanks again everyone!

  9. #9
    Join Date
    Aug 2004
    Location
    Somewhere in Texas, USA
    Posts
    417
    Glad I could be of assistance

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 with HTML passing variables to AMS
    By Squirrel22 in forum AutoPlay Media Studio 5.0
    Replies: 12
    Last Post: 06-15-2005, 11:30 PM
  3. problem passing arguments to a batch file
    By Martin_SBT in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 02-06-2004, 06:15 AM
  4. 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
  5. Passing command line arguments
    By JAT in forum Setup Factory 5.0
    Replies: 3
    Last Post: 08-04-2000, 01:16 PM

Posting Permissions

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