Jump to content

Using run with an application and parameters


MrEd
 Share

Recommended Posts

Intro

I bought a book in PDF format that requires a password. I am trying to make a quick AutoIT script to run foxitreaderportable pass the name of the book and password.

I must have tried every combination but the right one. I did ask on the Fox IT Reader support site but received no replies. It is either too stupid of a question, too hard a question or no one there uses AutoIT (can't believe that any more than I can believe people here don't use portable apps)

What is the correct syntax for using Run() to pass command line parameters?

Thanks!

Mr Ed

Link to comment
Share on other sites

Does Foxit Reader allow to pass the password as a command line parameter?

According to the support forum:

"Where can I view the command line usages?

  • Open Foxit Reader, go to Help>Command line Help.
  • In the start Run line, input “C:Program FilesFoxit SoftwareFoxit ReaderFoxit Reader.exe" –help"
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

It is a little vague. I tried all of the different combinations I could come up with. I think I am having problems sending the command line:

foxitreaderportable /pwd 123456abc book.pdf

via the run() function

foxitreaderportable.exe /?

Just opens up the reader with no document.

Going to the help - Command Line shows

(I give up trying to make it pretty, It looked great in the editor)

[font=courier new,courier,monospace]Here are some command lines that can be used with Foxit Reader using the following syntax:

<Reader Path> [/register]| [PDF Path] [/pwd] [/A] [...] [...] [...] | [/pwd] [/p | /t <PDFPath>[Printer]]
Command                  Description
/register                Set Foxit Reader as the default reader
/pwd <password>          Input the password of the protected PDF
/p <PDF Path>               Print the document with default printer
/t <PDF Path> [Printer]  Print the document with the designated printer
<PDF Path> /A [...] [...] .. Open a PDF document with a command to
                             exactly specify what to display and how to
                             display[/font]
Edited by MrEd
Link to comment
Share on other sites

Can you run

foxitreaderportable c:tempbook.pdf /pwd 123456abc
Specifying the full path to the PDF. Does the password really start with a backslash?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Got it! Having to type in the help screen made the light bulb go off. For anyone who comes looking for the same information

Run(".PortableAppsFoxitReaderPortableFoxitReaderPortable.exe ""bookTitle.pdf"" /pwd 123456abc")

Were the book is in the root of the same drive as portable apps. The quotes were the key. You have to have quotes even if there are no spaces in the pathtitle.

Edited by MrEd
Link to comment
Share on other sites

Glad you could solve the problem :D

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...