Difference between revisions of "SumatraPDF"
Line 58: | Line 58: | ||
move "%ALLUSERSPROFILE%\Start Menu\Programs\SumatraPDF" "%ALLUSERSPROFILE%\..\Default User\Start Menu\Programs\" | move "%ALLUSERSPROFILE%\Start Menu\Programs\SumatraPDF" "%ALLUSERSPROFILE%\..\Default User\Start Menu\Programs\" | ||
</source> | </source> | ||
+ | |||
+ | == Change the default background color == | ||
+ | |||
+ | If you don't want to keep yellow background color, proceed as follows : | ||
+ | |||
+ | First install SumatraPDF on you workstation. Then, edit the default shortcut in ''C:\ProgramData\Microsoft\Windows\Start Menu\Programs\SumatraPDF.lnk'' by right click -> Properties and add ''-bg-color 0xffffff'' (0xffffff is hexadecimal code for white color, but you can put what you want) at the end of the target. Press OK for validate. | ||
+ | Next, copy the specified shortcut on your ''%SOFTWARE%'' directory, and add this line on your WPKG package : | ||
+ | |||
+ | <source lang="xml"> | ||
+ | <install cmd='%COMSPEC% /C XCOPY /R /Y "%SOFTWARE%\SumatraPDF.lnk" "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\"' /> | ||
+ | </source> | ||
+ | |||
+ | This trick is for windows 7, but should work on Windows XP, just by changing the location of the shortcut. | ||
[[Category:Silent Installers]] | [[Category:Silent Installers]] |
Revision as of 16:35, 2 January 2012
Sumatra PDF is a lightweight Open Source PDF Viewer.
Sumatra PDF home: http://blog.kowalczyk.info/software/sumatrapdf/
Version 1.0.1 - 1.9
<?xml version="1.0" encoding="UTF-8"?>
<packages>
<package
id="sumatrapdf"
name="Sumatra PDF Reader"
revision="1"
priority="0"
reboot="false">
<check type="uninstall" condition="exists" path="SumatraPDF" />
<install cmd='"%SOFTWARE%\sumatra\SumatraPDF-1.0.1-install.exe" /S' />
<upgrade cmd='"%SOFTWARE%\sumatra\SumatraPDF-1.0.1-install.exe" /S' />
<remove cmd='"%PROGRAMFILES%\SumatraPDF\Uninstall.exe" /S' />
</package>
</packages>
Version 0.9.3
<?xml version="1.0" encoding="UTF-8"?>
<packages>
<package
id="sumatrapdf"
name="Sumatra PDF Reader"
revision="1"
priority="0"
reboot="false">
<check type="uninstall" condition="exists" path="Sumatra PDF reader" />
<install cmd='"%SOFTWARE%\sumatra\SumatraPDF-0.9.3-install.exe" /S' />
<install cmd='"%SOFTWARE%\sumatra\sumatra_postinstall.bat"' />
<upgrade cmd='"%SOFTWARE%\sumatra\SumatraPDF-0.9.3-install.exe" /S' />
<upgrade cmd='"%SOFTWARE%\sumatra\sumatra_postinstall.bat"' />
<remove cmd='"%SOFTWARE%\sumatra\sumatra_prerm.bat"' />
<remove cmd='"%PROGRAMFILES%\SumatraPDF\Uninstall.exe" /S' />
</package>
</packages>
The installer places shortcuts under the default user profile when installed via WPKG. The following script moves the shortcuts to the All Users profile.
REM sumatra_postinstall.bat
move "%ALLUSERSPROFILE%\..\Default User\Start Menu\Programs\SumatraPDF" "%ALLUSERSPROFILE%\Start Menu\Programs\"
The following script moves the shortcuts back to their original location.
REM sumatra_prerm.bat
move "%ALLUSERSPROFILE%\Start Menu\Programs\SumatraPDF" "%ALLUSERSPROFILE%\..\Default User\Start Menu\Programs\"
Change the default background color
If you don't want to keep yellow background color, proceed as follows :
First install SumatraPDF on you workstation. Then, edit the default shortcut in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\SumatraPDF.lnk by right click -> Properties and add -bg-color 0xffffff (0xffffff is hexadecimal code for white color, but you can put what you want) at the end of the target. Press OK for validate. Next, copy the specified shortcut on your %SOFTWARE% directory, and add this line on your WPKG package :
<install cmd='%COMSPEC% /C XCOPY /R /Y "%SOFTWARE%\SumatraPDF.lnk" "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\"' />
This trick is for windows 7, but should work on Windows XP, just by changing the location of the shortcut.