From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search

ElsterFormular is a software provided by the German tax authorities for submitting tax declarations: www.elster.de

ElsterFormular 13.3

  <package id='elsterformular_13_3_0_9066'
    name='Elster Formular'
    priority='5' >

    <variable name="PKG_VERSION" value="" />

    <check type='uninstall' condition='versiongreaterorequal' path='ElsterFormular' value='%PKG_VERSION%'/>

    <install cmd='&quot;%SOFTWARE%\ElsterFormular %PKG_VERSION%\ElsterFormular.exe&quot; --mode unattended' timeout='300'>

    <remove cmd='cscript &quot;%SOFTWARE%\ElsterFormular %PKG_VERSION%\uninstall.js&quot;' timeout='300'>

The installer ("ElsterFormular.exe") should be placed in the directory "ElsterFormular" the following script file for the Windows Scripting Host should be placed in the same directory and named "uninstall.js".

var wshShell = WScript.CreateObject("WScript.Shell");
var fs = WScript.CreateObject("Scripting.FileSystemObject");
var allUserAppData = wshShell.RegRead("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\Common AppData");
var uninstall = allUserAppData + "\\elsterformular\\setup\\uninstall.exe";
var rc = 0;
if (fs.FileExists(uninstall)) {
  try {
    rc = wshShell.Run("\"" + uninstall + "\" --mode unattended", 0, true);
  } catch (e) {

This script is needed because the path of the uninstall program depends on the Windows version (and language) and there is no environment variable for determing the path. On Windows Vista and Windows 7 systems, the path is %PROGRAMDATA%, but this environment variable does not exist on Windows XP. The five seconds wait period after uninstallation is needed, because otherwise WPKG might still see the registry entry from the uninstaller although the uninstall process has been successful.


  • ELSTER ELSTER website (including download)