PDA

View Full Version : OT: Uninstalling on Vista



NewsArchive
06-21-2008, 12:36 PM
Hi Friedrich,

This is not really SB question, but related.

I'm installing files into the COMMON_APPDATA and in my application I
copy files to LOCAL_APPDATA. When uninstalling, I don't have access
to those files from the uninstaller since a) they weren't installed b)
they are not accessible from it under vista/w2008.

I also use registry keys under HKCU which again can't be uninstalled
via normal channels.

What options are there to remove those files (if wanted)
before/during/after the uninstall process under Vista/W2008?

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
06-21-2008, 12:37 PM
Hi Arnór,

Good question. You don't have any option to access "current user" files and
registry settings from an elevated application.

But I think Charles had to do something similar for his PageSnip project.
But I can't remember how he did it. Charles, are you here...<g>? Was it a
SetupBuilder "asInvoker" application that did the "final cleanup" for
current user stuff?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
06-21-2008, 12:38 PM
Arnor,

maybe a stupid idea for the files at least : open the SB log file from a
small special SB 'uninstaller' and ADD the corresponding lines to the files
your app added....

Like this when the regular SB unisntaller comes up afterwards it will think
it installed all those also......

offhand idea ....

--
Thank you

Cordialement - Best regards
Jean-Pierre GUTSATZ

CGF

DMC - Data Management Center - A tool to let you Migrate Import Export
Transfer all your Data very easily
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" & "Works with Windows Server
2008"

NewsArchive
06-21-2008, 12:38 PM
Hi Jean-Pierre,

>maybe a stupid idea for the files at least : open the SB log file from a
>small special SB 'uninstaller' and ADD the corresponding lines to the files
>your app added....
>
>Like this when the regular SB unisntaller comes up afterwards it will think
>it installed all those also......

The problem with that is that then the information would first need to
be written down by my software, then a secondary software would need
to run elevated to write to the uninstall log (which is in a subfolder
in the Program Files folder) since a non-elevated program can't write
to files there.

Maybe the uninstaller could do that before it starts processing the
uninstall log!

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
06-21-2008, 12:39 PM
If you want to delete a folder and know the folder name (as your app
installed it and if it wrote to an ini file for example if different xases
can happen) simply use in uninstaller the delete dir function.....

reg is another thing.....

--
Thank you

Cordialement - Best regards
Jean-Pierre GUTSATZ

CGF

DMC - Data Management Center - A tool to let you Migrate Import Export
Transfer all your Data very easily
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" & "Works with Windows Server
2008"

NewsArchive
06-21-2008, 12:40 PM
Hi Jean-Pierre,

>Like this when the regular SB unisntaller comes up afterwards it will think
>it installed all those also......

That would also not work with the registry.

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
06-21-2008, 12:41 PM
>>maybe a stupid idea for the files at least : open the SB log file from a
>>small special SB 'uninstaller' and ADD the corresponding lines to the
>>files your app added....
>>
>>Like this when the regular SB unisntaller comes up afterwards it will
>>think it installed all those also......
>
> The problem with that is that then the information would first need to
> be written down by my software, then a secondary software would need
> to run elevated to write to the uninstall log (which is in a subfolder
> in the Program Files folder) since a non-elevated program can't write
> to files there.
>
> Maybe the uninstaller could do that before it starts processing the
> uninstall log!

You can do whatever you want with a "custom" uninstall. Delete folders,
files, registry entries, INI settings, ODBC stuff, etc. that were not
created by the installer. *All* functions (except "Install File") are
available in a "custom" uninstall.

But an uninstall will always run elevated, so you can't do any "current
user" modifications.

Friedrich

NewsArchive
06-21-2008, 01:33 PM
> Good question. You don't have any option to access "current user" files and
> registry settings from an elevated application.

Right.

> But I think Charles had to do something similar for his PageSnip project.
> But I can't remember how he did it. Charles, are you here...<g>? Was it a
> SetupBuilder "asInvoker" application that did the "final cleanup" for
> current user stuff?

As some may remember, I have a small SB project that is used to configure
PageSnip with the user preferences.

When PageSnip is first ran, this SB config program runs and walks the user
through a config wizard. Since it is built by SetupBuilder, it has the
same look and feel as the main installer.

Note: I also call this again with different command line parameters so
that I can use it to allow the user to reconfigure PageSnip later on.
Again the same look and feel and I did NOT have to duplicate efforts in
Clarion for a setup screen!


Anyway the same SB config program has an option to remove the Registry
entries.

It is set to run AsInvoker - so it knows where to find things (the CSIDL
stuff matches) and it does have access to them.


However there is still no way for a one-step full cleanup.

The user has to select a program option to remove the data (which runs the
wizard in cleanup mode) and then they would have to run the regular
installer afterwards.


The only other idea (haven't tried this) would be to "chain" the two
uninstallers (if possible).

Set the normal uninstaller to run asInvolker, remove the Registry entries
and then have that one RUN the elevated one to remove the app (without
waiting).

I have a feeling this would not work smoothly since at a minimum the user
would be prompted to run the elevated uninstaller on Vista/W2008.


Does that make sense?


Charles



--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
06-21-2008, 01:33 PM
Hi Charles,

> I have a feeling this would not work smoothly since at a minimum the user
> would be prompted to run the elevated uninstaller on Vista/W2008.

Yes, you are right. The main problem is, that an uninstall invoked by the
"Add/Remove Progams" Panel in Vista/2008 (aka "Programs and Features")
always runs elevated (even if it "only" requests asInvoker execution level).

Friedrich

NewsArchive
06-22-2008, 12:03 PM
>> I have a feeling this would not work smoothly since at a minimum the user
>> would be prompted to run the elevated uninstaller on Vista/W2008.
>
> Yes, you are right. The main problem is, that an uninstall invoked by the
> "Add/Remove Progams" Panel in Vista/2008 (aka "Programs and Features")
> always runs elevated (even if it "only" requests asInvoker execution level).

Hi Friedrich,

Thanks for the confirmation (and explanation).

;-)

Charles



--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
06-22-2008, 12:04 PM
Hi Friedrich,

>But an uninstall will always run elevated, so you can't do any "current
>user" modifications.

Well, lets say that I write to a file from my program and lets say
that I place this file where any program can read and write to it.

Lets say that I write the full path to a file in say My Documents,
using the full path qualification:

C:\Documents And Settings\Regular User\My Documents\Whatever.txt

The uninstaller runs elevated and the Username is now "Arnor" intead
of "Regular User" (very innovative naming<g>). But since the full
path is specified in the file, can the uninstaller delete it?

I know it won't be able to figure out the HKCU in the registry.

I would like to be able to clean up completely when the user
uninstalls, but right now I can't. I'll be investigating this stuff
in the coming weeks and I have a few ideas that might work out:)

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
06-22-2008, 12:04 PM
Hi Arnór,

I am working on a test script...

Friedrich

NewsArchive
06-22-2008, 12:05 PM
I think the test scripts are working fine. The uninstall can remove files
and folders created by your "asInvoker" application even when created on a
different Standard User account.

I'll test it a bit more and post further information and the scripts and
binaries later today.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
06-22-2008, 12:05 PM
WAIT A MINUTE......

I am completely thrilled at the moment. I have to cool down...

I think I found a solution to do a complete cleanup for files, folders and
registry entries created at different Standard User accounts. And not only
for one user account, for all accounts on that machine. My SetupBuilder
test uninstall can remove all that stuff.

I need a cool shower and then check it on other Vista machines. If it
really works, then I'll contact the patent office <g>

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
06-22-2008, 12:06 PM
Hi Friedrich,

>I need a cool shower and then check it on other Vista machines. If it
>really works, then I'll contact the patent office <g>

I have every confidence that you'll figure it out. It just takes a
stubborn SOB like me to throw you off the cliff<bg>

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
06-24-2008, 01:28 AM
>It just takes a stubborn SOB like me to throw you off the cliff<bg>

Hey Arnor! Isn't that what friends are for? <BG>

Lynn Howard

NewsArchive
06-24-2008, 01:29 AM
Hi Arnór,

> I have every confidence that you'll figure it out. It just takes a
> stubborn SOB like me to throw you off the cliff<bg>

<BG>

I already digged into this for PageSnip, but did not find a solution.
Yesterday I found the magic puzzle piece.

A new set for SetupBuilder functions is on the drawing board now to handle
the "current user" scenario. The following should be possible:

1. Uninstall "MyFile.txt" and "My Folder" items from the "Regular User"
accounts.

C:\Documents And Settings\Regular User\My Documents\My Folder\MyFile.txt

2. Uninstall Registry items from the "Regular User" accounts

3. Find out if a "Regular User" is logged on/off (to make sure the
SetupBuilder application can "process" it)

It should even be possible to add "MyFile.txt", "My Folder" and registry
items to the "Regular User" accounts. But I am still researching this area.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
06-24-2008, 01:29 AM
Should read "A new set of SetupBuilder functions..."

Friedrich

NewsArchive
06-24-2008, 01:31 AM
> Hi Arnór,
>
>> I have every confidence that you'll figure it out. It just takes a
>> stubborn SOB like me to throw you off the cliff<bg>
>
> <BG>
>
> I already digged into this for PageSnip,

OK, somehow, I KNEW we would get around to blaming Charles Edmonds of
LANSARD for stirring up the original hornets genius nest! :-D

> but did not find a solution.
> Yesterday I found the magic puzzle piece.

OK, we are ALL very excited about this amazing technological breakthrough

BUT

don't let it rob a single hour or minute from your vacation time!

Otherwise, we'll all buy plane tickets to Tennessee, USA, and storm
Charles's new place AND Cry With A Loud Voice! "Just because YOU don't take
vacations - don't rob Friedrich's turn !!! !!! !!!!!! !!! !!! !!! !!! !!!!
!!! !!!!!!! !! !!! !!! !!!!! !!

David

--
From David Troxell - Product Scope 7 - Encourager Software
Clarion Third Party Profile Exchange Online
http://encouragersoftware.com/profile/clarlinks.html
http://www.encouragersoftware.com/
http://www.profileexchanges.com/blog/

NewsArchive
06-24-2008, 01:32 AM
Hi Friedrich,

>It should even be possible to add "MyFile.txt", "My Folder" and registry
>items to the "Regular User" accounts. But I am still researching this area.

Awsome:) Would any of this help with the task of running an
application at the end of an install or will that still be off limits?


That's the only thing that kind of bugs me about Vista installs is not
being able to run the installed program at the end of the install.

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
06-24-2008, 01:33 AM
Hi Arnór,

>>It should even be possible to add "MyFile.txt", "My Folder" and registry
>>items to the "Regular User" accounts. But I am still researching this
>>area.
>
> Awsome:) Would any of this help with the task of running an
> application at the end of an install or will that still be off limits?
>
> That's the only thing that kind of bugs me about Vista installs is not
> being able to run the installed program at the end of the install.

Unfortunately, this does not help with the task of running unelevated from
an elevated (the installer) application. But we have something in
development for SetupBuilder 7 to handle exactly this. There are still a
few unanswered (run unelevated) questions because it does not work reliable
on Windows 2008 and Windows 7.

Friedrich

NewsArchive
06-24-2008, 01:33 AM
Hi Friedrich,

>Unfortunately, this does not help with the task of running unelevated from
>an elevated (the installer) application. But we have something in
>development for SetupBuilder 7 to handle exactly this. There are still a
>few unanswered (run unelevated) questions because it does not work reliable
>on Windows 2008 and Windows 7.

Ok, no problem:) If you can figure out the install/uninstall, that
would be pretty darn cool!:):)

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php