[wpkg-users] truecrypt

Brian May brian at vpac.org
Fri Dec 19 04:00:41 CET 2008


Brian May wrote:
> Just realized I forgot to add the check to see if the software is 
> already installed or not. Will do this tomorrow.

Ok, my latest version is:


<packages>
<package id="truecrypt"
          name="Truecrypt 6.1a"
          revision="1"
          reboot="false"
          priority="0">
        <check type="file" condition="versiongreaterorequal" 
path="%WINDIR%\System32\Drivers\truecrypt.sys" value="6.1.1.0"/>
        <install cmd='%SOFTWARE%\truecrypt\install.cmd 6.1a' />
        <upgrade cmd='%SOFTWARE%\truecrypt\install.cmd 6.1a' />
        <remove cmd='%SOFTWARE%\truecrypt\remove.cmd 6.1a' />
</package>
</packages>


=== %SOFTWARE%\truecrypt\install.cmd ===
"%WINDIR%\System32\sc.exe" stop truecrypt
copy "%SOFTWARE%\truecrypt\%1\truecrypt.sys" "%WINDIR%\System32\Drivers"
"%WINDIR%\System32\sc.exe" create truecrypt type= kernel start= auto 
error= normal binPath= "%WINDIR%\System32\Drivers\truecrypt.sys" 
DisplayName= truecrypt
"%WINDIR%\System32\sc.exe" start truecrypt
xcopy /E /I /Y "%SOFTWARE%\truecrypt\%1" "%ProgramFiles%\truecrypt"
"%SOFTWARE%\unattended\shortcut.pl" --description "Truecrypt encryption" 
"%ProgramFiles%\truecrypt\TrueCrypt.exe" 
special:AllUsersStartMenu\Programs\TrueCrypt



=== %SOFTWARE%\truecrypt\remove.cmd ===
del "%ALLUSERSPROFILE%\Start Menu\Programs\TrueCrypt.lnk"
"%WINDIR%\System32\sc.exe" delete truecrypt
del "%WINDIR%\System32\Drivers\truecrypt.sys"
rmdir /S /Q "%ProgramFiles%\truecrypt"



The one issue I have noticed is the sc delete command sometimes fails to 
delete the service without a reboot, which means the remainder commands 
will fail because the truecrypt.sys file is still in use. At least wpkg 
should still detect it as being installed and do the right thing on the 
next run.

I haven't tried to make sure that Perl is installed, you could argue 
this is required, because it calls shortcut.pl (copied from unattended).


Brian May




More information about the wpkg-users mailing list