Izpack Uninstaller Asks for required privileges although it is provided.

64 views
Skip to first unread message

Ahmet Eroglu

unread,
Jul 6, 2020, 8:59:10 AM7/6/20
to izpack-user
Hi everyone, I've an application and used IZPACK installer creator to create an installer. Now, everything works fine but, it is not the case with the uninstaller.

When I run the uninstaller, everything goes smooth and actually much of the files are uninstalled but at the end of the un-installation, a pop up window appears on the screen showing bunch of files where the software is installed and says that

"Directories cannot be removed if it is not empty. administrative privileges may be required to remove files".


However in my install.xml I already give it the required privileges.



<info>
   
<appname>@{info.appName}</appname>
   
<appversion>@{info.version}</appversion>
   
<appsubpath>MySoftware/@{info.appName}</appsubpath>
   
<javaversion>1.8</javaversion>
   
<readinstallationinformation>false</readinstallationinformation>
   
<writeinstallationinformation>false</writeinstallationinformation>
   
<!-- -->
   
<run-privileged uninstaller="true"/>
   
<uninstaller path="$USER_HOME/.$APP_NAME/Uninstaller" name="uninstaller.jar"  write="true">true</uninstaller>

</info>  


<listeners>
   
<listener classname="RegistryInstallerListener"
       
stage="install">
       
<os family="windows" />
   
</listener>
   
<listener classname="RegistryUninstallerListener"
       
stage="uninstall">
       
<os family="windows" />
   
</listener>
</listeners>



  <native type="izpack" name="ShellLink.dll" />
   
<native type="izpack" name="ShellLink_x64.dll" />
   
<native type="izpack" name="WinSetupAPI.dll" />
   
<native type="izpack" name="WinSetupAPI_x64.dll" />

   
<native type="3rdparty" name="COIOSHelper.dll" stage="both">
       
<os family="windows" />
   
</native>
   
<native type="3rdparty" name="COIOSHelper_x64.dll" stage="both">
       
<os family="windows" />
   
</native>
</natives>


Thanks in advance..

Andreas Kuhtz

unread,
Jul 6, 2020, 9:12:27 AM7/6/20
to izpack-user
Hello,

I guess you are running on Windows.
Did you uninstall via Settings > Apps & features > Uninstall or via a desktop shortcut?

Cheers Andreas

--
You received this message because you are subscribed to the Google Groups "izpack-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to izpack-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/izpack-user/f8a40597-5918-45d7-b949-5a8b3f34eecbo%40googlegroups.com.

Ahmet Eroglu

unread,
Jul 6, 2020, 9:15:55 AM7/6/20
to izpack-user
Hi Andreas

Thank you for taking your time to troubleshoot my problem a lot. I'm running it on System Settings -> Add and remove programs.

Thing what I don't understand it, sometimes maybe %5 of the time, it doesn't say this and uninstalls the software wihtout anyproblem. I opened the command line with "administrator privilieges" and even run the uninstall jar but still gives me the same error. I am thinking that somehow in the install.xml privileges should be given, but this is already done as I showed in my install.xml above. If you could help me, I'd be more than happy.
To unsubscribe from this group and stop receiving emails from it, send an email to izpac...@googlegroups.com.

Andreas Kuhtz

unread,
Jul 6, 2020, 9:26:05 AM7/6/20
to izpack-user
Hi Ahmet,

I'm not sure why this happens but if you uninstall from command line it extracts the content of the uninstall.jar to a temporary directory, then runs the uninstaller code from there. If the directory is still "locked" by the command prompt window (because you are in the directory) then I have seen this in the past, too.
In my case it works if I install and later uninstall via System Settings > Add and remove programs, but I think it has issues if you install multiple times and then uninstall.

Cheers Andreas
Reply all
Reply to author
Forward
0 new messages