Jump to content

foxit pdf reader


wickerwolf

Recommended Posts


You only need the EXE. I rename it to PDFread.exe and put it in %SystemRoot%\PDFread.exe then apply this reg file.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Local AppWizard-Generated Applications\Foxit PDF Reader\MainFrame]
"ShowTollBar"="1"
"ShowStatusBar"="1"
"ShowMenu"="1"
"MainShowCmd"="3"
"ShowFullScreen"="0"
"CheckRegister"="0"

[HKEY_USERS\.DEFAULT\Software\Local AppWizard-Generated Applications\Foxit PDF Reader\MainFrame]
"ShowTollBar"="1"
"ShowStatusBar"="1"
"ShowMenu"="1"
"MainShowCmd"="3"
"ShowFullScreen"="0"
"CheckRegister"="0"

[HKEY_CLASSES_ROOT\.pdf]
@="AcroExch.Document"

[HKEY_CLASSES_ROOT\AcroExch.Document]
"EditFlags"=dword:00000000
"BrowserFlags"=dword:00000008
@=""

[HKEY_CLASSES_ROOT\AcroExch.Document\shell]
@="Open_With_PDF-Reader"

[HKEY_CLASSES_ROOT\AcroExch.Document\shell\Open_With_PDF-Reader]
@="Open With PDF-Reader"

[HKEY_CLASSES_ROOT\AcroExch.Document\shell\Open_With_PDF-Reader\command]
@="PDFread.exe \"%1\""

Link to comment
Share on other sites

I do the same as mazin does, I drop the exe (which I rename to foxit.exe) into a directory and then run an AutoIt script to handle all the dirty work. The bulk of it is registry changes, here is the script:

RegWrite("HKCR\.pdf","","REG_SZ","FoxitReader.Document")
RegWrite("HKCR\.pdf","Content Type","REG_SZ","application/pdf")
RegWrite("HKCR\CLSID\{14E8BBD8-1D1C-4D56-A4DA-D20B75EB814E}","","REG_SZ","PDF Document")
RegWrite("HKCR\CLSID\{14E8BBD8-1D1C-4D56-A4DA-D20B75EB814E}\AuxUserType\2")
RegWrite("HKCR\CLSID\{14E8BBD8-1D1C-4D56-A4DA-D20B75EB814E}\AuxUserType\3","","REG_SZ","Foxit Reader")
RegWrite("HKCR\CLSID\{14E8BBD8-1D1C-4D56-A4DA-D20B75EB814E}\DefaultExtension","","REG_SZ",".pdf, PDF Files(*.pdf)")
RegWrite("HKCR\CLSID\{14E8BBD8-1D1C-4D56-A4DA-D20B75EB814E}\DefaultIcon","","REG_SZ",$AFI_BASE&"\usr\"&$AFI_XXX&"\Foxit.exe,1")
RegWrite("HKCR\CLSID\{14E8BBD8-1D1C-4D56-A4DA-D20B75EB814E}\InprocHandler32","","REG_SZ","ole32.dll")
RegWrite("HKCR\CLSID\{14E8BBD8-1D1C-4D56-A4DA-D20B75EB814E}\LocalServer32")
RegWrite("HKCR\CLSID\{14E8BBD8-1D1C-4D56-A4DA-D20B75EB814E}\ProgID","","REG_SZ","FoxitReader.Document")
RegWrite("HKCR\FoxitReader.Document","","REG_SZ","PDF Document")
RegWrite("HKCR\FoxitReader.Document","BrowseInPlace","REG_SZ",1)
RegWrite("HKCR\FoxitReader.Document\CLSID")
RegWrite("HKCR\FoxitReader.Document\DefaultIcon","","REG_SZ",$AFI_BASE&"\usr\"&$AFI_XXX&"\Foxit.exe,1")
RegWrite("HKCR\FoxitReader.Document\protocol\StdFileEditing\server")
RegWrite("HKCR\FoxitReader.Document\protocol\StdFileEditing\server")
RegWrite("HKCR\FoxitReader.Document\shell\open\command","","REG_SZ",'"'&$AFI_BASE&'\usr\'&$AFI_XXX&'\Foxit.exe" "%1"')
RegWrite("HKCR\MIME\Database\Content Type\application/pdf","CLSID","REG_SZ","{14E8BBD8-1D1C-4D56-A4DA-D20B75EB814E}")
RegWrite("HKCR\MIME\Database\Content Type\application/pdf","Extension","REG_SZ",".pdf")
RegWrite("HKU\.Default\Software\Foxit Software\Foxit Reader\MainFrame","ShowEditorAd_908","REG_SZ",0)
RegWrite("HKU\.Default\Software\Foxit Software\Foxit Reader\MainFrame","ShowReaderAd_908","REG_SZ",0)
RegWrite("HKU\.Default\Software\Foxit Software\Foxit Reader\MainFrame","ShowTypewriterAd_908","REG_SZ",0)
RegWrite("HKU\.Default\Software\Foxit Software\Foxit Reader\MainFrame","ShowPOAd_908","REG_SZ",0)
RegWrite("HKU\.Default\Software\Foxit Software\Foxit Reader\MainFrame","ShowSDKAd_908","REG_SZ",0)
RegWrite("HKCU\Software\Foxit Software\Foxit Reader\MainFrame","ShowEditorAd_908","REG_SZ",0)
RegWrite("HKCU\Software\Foxit Software\Foxit Reader\MainFrame","ShowReaderAd_908","REG_SZ",0)
RegWrite("HKCU\Software\Foxit Software\Foxit Reader\MainFrame","ShowTypewriterAd_908","REG_SZ",0)
RegWrite("HKCU\Software\Foxit Software\Foxit Reader\MainFrame","ShowPOAd_908","REG_SZ",0)
RegWrite("HKCU\Software\Foxit Software\Foxit Reader\MainFrame","ShowSDKAd_908","REG_SZ",0)

You can't just use this one since I have my custom network paths, but you should be able to hack it.

Oh, and there are some extra settings in there that disable the little pink ad bar. Since it's not changing anything I think it would be okay, but if a mod doesn't think it's cool I'll change it if they want me to.

And yes, there are duplicates in there...some apply to the current user, and others to the default user profile. I do this because I don't run these installs during the unattended, but under a 'special' user I make for these tasks. Because of that the 'special' users profile is already created so it won't pull the reg settings from the default profile.

Good luck!

Link to comment
Share on other sites

  • 1 month later...

Mazin, I was wondering how would I put that in the RunOnceEx.cmd file?

Is it like this?

REG ADD %KEY%\005 /VE /D "FoxIt Reader" /f

REG ADD %KEY%\005 /V 1 /D "%SystemDrive%\foxit.exe" /GROUP="1-Applications" /f

REG ADD %KEY%\050 /V 2 /D "REGEDIT /S %systemdrive%\Foxit.reg" /f

Foxit.reg, being the code you provided for the application, stored in the %SystemDrive%? :huh:

Oh and one more thing, what the h3ck, is the /f switch stand for?

Edited by gyrene2083
Link to comment
Share on other sites

Foxit Reader 2.0 for Windows is out (Sep 12, 2006).

Check their site at www.foxitsoftware.com!

I suggest you download the ZIP Package (zip) not the Installer (exe).

Unzip the downloaded archive (foxitreader.zip) and put the

extracted "FoxitReader.exe" in: $OEM$\$$\ in your UACD!

When you set up Windows, the directory is translated to

X:\Windows, where X is your System Drive.

Hence, the path to your app will be X:\Windows\FoxitReader.exe!

Being in Windows directory, your system KNOWS where to find it.

And since your Install directory will be deleted in the end,

I'd suggest you put "Foxit.reg" in $OEM$\$1\Install\; this will be

translated to X:\Install.

Hence, the path to your reg file will be X:\Install\Foxit.reg!

Be careful: if file name in X:\Windows is FoxitReader.exe,

you must keep the same name in your Foxit.reg.

In my reg file, I name it PDFread.exe because I renamed

my file in $OEM$\$$ to PDFread.exe!

Now that everything is supposed to be done well, add these lines to

your RunOnceEx.cmd:

REG ADD %KEY%\050 /VE /D "FoxIt Reader 2.0 - Tweaking and Registering" /f

REG ADD %KEY%\050 /V 1 /D "REGEDIT /S %SystemDrive%\Install\Foxit.reg" /f

That's it!

Ah, the /f switch?

Being used with REG ADD, it's actually useless!

Sometimes, it's harmful, too.

I said that long ago.

It's function is to force overwriting strings in the Registry, if any.

However, I'm always using it with REG DELETE.

OFF TOPIC: /GROUP switch is used with INNO installers ONLY!

Edited by mazin
Link to comment
Share on other sites

I'm not familiar on how to make the script run, as I'm not familiar with AUTOIT. How can I implement that in the RunOnceEx.cmd file?

Also, I had two off topic questions.

First question, I have a few programs that are NULLSOFT packaged. I found this out using the Installer Tools. When I right clicked the executible this is what I got.

Nullsoft ® Installer

setup.exe /Option

(All switches MUST be upper case. No double quotes)

Install Options

/D=x:\dirname

Install program to path.

/NCRC

Skip CRC check.

Display Options

/S

Silent mode.

CMenu Options

AutoIt Usage

Create the Au3 template script.

Edit any variables at the start of the script, and add shortcuts, that require deletion.

Refer to the CMenu Help Guide. It displays sample highlighted items, to edit.

Compile the script, into an exe, and keep it with the installer.

Run the compiled exe, to install.

Command line Usage

To silently install, use the switch:

Setup.exe /S

I tried it with the /S switch, and I still had to interact with the prog to install it. I also, tired the /D=x:\dirname, and that didn't work at all. Then I saw the CMenu options for AutoIt. How can I make the script to make this prog run? (I did read the help me file, but it wasn't helpful to me).

Second question, I also checked the TweakUI and this is what I got back;

InstallShield 2003 ® Installer

setup.exe /Option

Install Options

/a

Add following parameters to the archived msi.

/v

Parameters used after this, are passed to the *.msi inside a package.

Display Options

/s

Silent install *.exe packaged.

/qn

Silent install *.msi.

/qb

Silent install *.msi with progress window.

User Options

AutoIt Usage

Create the Au3 template script.

Edit any variables at the start of the script, and add shortcuts, that require deletion.

Refer to the CMenu Help Guide. It displays sample highlighted items, to edit.

Compile the script, into an exe, and keep it with the installer.

Run the compiled exe, to install.

;

If extraction chosen, then run Identity Installer again, when complete.

Command line Usage

To silently install, use:

setup.exe /s /v"/qn"

To silently install, if installer extracted, then use:

setup.msi /qn

I tried all the switches in there and I still didn't get it to install, any ideas on how I can make this work? I would greatly appreciate any help.

Link to comment
Share on other sites

Check out AutoIt here.

Its's very usefull when installers don't have silent switches (and more).

I'd suggest anyone seriously into unattended installations to get used to using it, your gonna need it sooner or later.

Anyway this is what you need to do:

- Install AutoIt

- Redownload my Foxit.au3 from this post

- Download foxitreader_setup.exe.

- Put my Foxit.au3 and foxitreader_setup.exe in the same dir

- Right click Foxit.au3 and click "Compile"

Your done. Now you have an AutoIt wrapped installer.

Edited by kof94
Link to comment
Share on other sites

SWEET, and I went to that AutoIt site and it suggested "Windows Admin Scripting Little Black Book". They posted the second edition. But, I looked through my own library, because the black book part rang a bell, and viola I have the first edition. Don't remember why I got it, but I have it.

So, that should be a good place to start, right? I also, have a couple of VB books too. Come, to think of it, how the h3ll did I get these books? Sorry, thinking aloud!lol

Link to comment
Share on other sites

You geek :P .

I just messed with other peoples scripts and read the manual!

Oh, and I do cheat abit by using a script generator first and then tidy it up and add features.

I think you'll be the one dishing out the advice soon.

Happy scripting.

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
  • Recently Browsing   0 members

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