Sign in to follow this  
Followers 0
MrEd

Using run with an application and parameters

6 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Glad you could solve the problem :D


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0