Discussion:
[wpkg-users] Best way to deal with depends you want to keep installed?
Nils Thiele
2016-09-28 11:24:40 UTC
Permalink
Hey,

i was wondering what is the best way to deal packages that were
installed by another one using the depend tag but you want to keep them
installed when you remove the original one.

I have a program that depends on .Net 4.5.2, at the time i created the
package this version wasn't pushed through windows updates to all
clients yet. My .Net package has several registry checks to for all
kinds of updated .Net versions.

Now when i want to remove the original program it will try to remove
.Net as well as its not registered to that system anymore but i don't
want to do this of course, maybe even impossible on more modern Windows
versions.

I have no uninstall command for the .Net package but it will always
return with an error because wpkg detects it as still installed because
of the registry checks.

I could of course add .Net to all those systems as seperate package but
is there another solution? That would wpkg happily remove the package
and trick it so it thinks it is successfully removed without breaking
the package for others system that may not have .Net installed yet?

Thanks for any tips!

Best Regards,

Nils
--
IT-Support - Fachbereich 09 Kulturgeschichte und Kulturkunde
Universität Hamburg
Flügelbau West, R. 204
Edmund-Siemers-Allee 1
D-20146 Hamburg
Tel.: +49-40-42838-3024
Email: ***@uni-hamburg.de

---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Dafydd Jones (techneg.it)
2016-09-29 09:14:03 UTC
Permalink
On Wednesday, 28 September 2016, Nils Thiele <
Hey,
i was wondering what is the best way to deal packages that were installed
by another one using the depend tag but you want to keep them installed
when you remove the original one.
I have a program that depends on .Net 4.5.2, at the time i created the
package this version wasn't pushed through windows updates to all clients
yet. My .Net package has several registry checks to for all kinds of
updated .Net versions.
Now when i want to remove the original program it will try to remove .Net
as well as its not registered to that system anymore but i don't want to do
this of course, maybe even impossible on more modern Windows versions.
I have no uninstall command for the .Net package but it will always return
with an error because wpkg detects it as still installed because of the
registry checks.
I could of course add .Net to all those systems as seperate package but is
there another solution? That would wpkg happily remove the package and
trick it so it thinks it is successfully removed without breaking the
package for others system that may not have .Net installed yet?
Thanks for any tips!
Best Regards,
Nils
Hi Nils,

I just had to do something similar myself, but I don't know if this is the
best or only way.
What worked for me is to remove the package checks and add execute="once"
to the package declaration. You may also need to increment the package
version number.

Hope to help,
Dafydd
g***@daooze.de
2016-09-29 21:02:00 UTC
Permalink
Post by Nils Thiele
Hey,
i was wondering what is the best way to deal packages that were
installed by another one using the depend tag but you want to keep them
installed when you remove the original one.
I have a program that depends on .Net 4.5.2, at the time i created the
package this version wasn't pushed through windows updates to all
clients yet. My .Net package has several registry checks to for all
kinds of updated .Net versions.
Now when i want to remove the original program it will try to remove
.Net as well as its not registered to that system anymore but i don't
want to do this of course, maybe even impossible on more modern Windows
versions.
I have no uninstall command for the .Net package but it will always
return with an error because wpkg detects it as still installed because
of the registry checks.
I could of course add .Net to all those systems as seperate package but
is there another solution? That would wpkg happily remove the package
and trick it so it thinks it is successfully removed without breaking
the package for others system that may not have .Net installed yet?
Thanks for any tips!
Best Regards,
Nils
Hi.

I was thinking about that problem some time ago. My solution was to add
a new registry key per package I want to keep installed, and made this
registry key part of the package checks. The install command runs the
setup program if needed, but always sets the registry key. The remove
command just removes the registry key but keeps the software installed.
This makes the package checks fail after removal of the package, so WPKG
marks it as no longer installed.

Hope that helps.

Greetings from Hamburg Lokstedt.

Regards,
Malte
---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Loading...