View Full Version : Deleting Vista Shortcuts
NewsArchive
05-27-2008, 01:32 AM
After Uninstalling the desktop icons created by SB can't be deleted.
I get a message that the item in C:\users\public\public desktop couldn't be
found.
But wait!
Aha! the desktop must be refreshed. Shouldn't SB do this on uninstall?
--
Lynn Howard
www.linkedsoftware.com
NewsArchive
05-27-2008, 01:33 AM
Hi Lynn,
>Aha! the desktop must be refreshed. Shouldn't SB do this on uninstall?
I just ran into this as I was uninstalling. It leaves the desktop
icon until you right click on the desktop and select "Refresh Desktop"
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
05-27-2008, 01:33 AM
Hi Arnor,
Today was the first time I noticed this.
You don't suppose this is another Vista "enhancement" do you? <G>
Lynn
NewsArchive
05-27-2008, 01:34 AM
Confirmed.
--
Russell B. Eggen
www.radfusion.com
Skype Clarion chat: http://tinyurl.com/2273lm
NewsArchive
05-27-2008, 01:35 AM
Lynn,
You now have in SB a function to refresh the desktop .....
--
Thank you
Cordialement - Best regards
Jean-Pierre GUTSATZ
CGF
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
05-27-2008, 01:35 AM
Hi Jean-Pierre,
Didn't realize that.
Does it work on uninstall/
Lynn
NewsArchive
05-27-2008, 01:36 AM
JB,
I may be missing something, is there a way to add this to the uninstall?
--
Russell B. Eggen
www.radfusion.com
Skype Clarion chat: http://tinyurl.com/2273lm
NewsArchive
05-27-2008, 01:36 AM
Hi Russ,
>I may be missing something, is there a way to add this to the uninstall?
You'd have to create a custom uninstall. I think this function should
be in the uninstall by default...
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
05-27-2008, 01:37 AM
I second that.
--
Jorge Alejandro Lavera, Huenuleufu Development SRL
www.ClarionTemplates.com
www.InBack.com
NewsArchive
05-27-2008, 01:37 AM
>> You'd have to create a custom uninstall. I think this function should
>> be in the uninstall by default...
>
> I second that.
Two years ago we discussed this with Microsoft and they recommended that the
un-/installer should NOT do this automatically!
But we introduced the "Refresh Desktop" function so you can do it
programmatically if you want.
--
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
05-27-2008, 01:38 AM
Why would they recommend you don't refresh a desktop after an uninstall?
--
Russell B. Eggen
www.radfusion.com
Skype Clarion chat: http://tinyurl.com/2273lm
NewsArchive
05-27-2008, 01:38 AM
Hi Russ,
>
> Why would they recommend you don't refresh a desktop after an uninstall?
>
Because Windows should handle it automatically. They told us:
---
You should only use SHCNE_ASSOCCHANGED if a file type association has
changed. The Shell tracks file system changes so the Desktop icons
appear/disappear automatically. Windows automatically handles file
notification object (FNO) notifications to refresh its user interface. It
is advised not to call SHChangeNotify from your installer to force a Desktop
refresh.
---
Friedrich
NewsArchive
05-27-2008, 01:39 AM
>>> You'd have to create a custom uninstall. I think this function should
>>> be in the uninstall by default...
>>
>> I second that.
>
> Two years ago we discussed this with Microsoft and they recommended that
> the un-/installer should NOT do this automatically!
Why would that can bew a problem?
Also, was the discussion about Vista?
> But we introduced the "Refresh Desktop" function so you can do it
> programmatically if you want.
We can do almost everything with SB, but as with many things, it is what
comes "out of the box" what gives it more value. If several users asks for
this, why don't do it? Or at least making a switch to generate the
behaviour, or an alternative script that we can put as default, or a step-
by-step guide on how to do this (I think you get my point <g>).
--
Jorge Alejandro Lavera, Huenuleufu Development SRL
www.ClarionTemplates.com
www.InBack.com
NewsArchive
05-27-2008, 01:40 AM
I don't think I've explored that.
I will soon <g>.
> You'd have to create a custom uninstall. I think this function should
> be in the uninstall by default...
--
Russell B. Eggen
www.radfusion.com
Skype Clarion chat: http://tinyurl.com/2273lm
NewsArchive
05-27-2008, 01:41 AM
How about a Check Box on the uninstall dialog to refresh the desktop?
Lynn
NewsArchive
05-27-2008, 01:45 AM
Jorge,
>> Two years ago we discussed this with Microsoft and they recommended that
>> the un-/installer should NOT do this automatically!
>
> Why would that can bew a problem?
> Also, was the discussion about Vista?
Yes, and "Longhorn".
>> But we introduced the "Refresh Desktop" function so you can do it
>> programmatically if you want.
>
> We can do almost everything with SB, but as with many things, it is what
> comes "out of the box" what gives it more value. If several users asks for
> this, why don't do it? Or at least making a switch to generate the
> behaviour, or an alternative script that we can put as default, or a step-
> by-step guide on how to do this (I think you get my point <g>).
Well, because several users asked for it, we already added a built-in
"Refresh Desktop" function in SetupBuilder 6.6 Build 2016 (October 12,
2007). So SetupBuilder already provides this "out of the box". In all
other installation systems (e.g. InstallShield, SetupFactory, etc.), you
have to call the SHChangeNotify API from the installer.
For example, in InstallShield:
// ----- DLL function prototypes -----
prototype shell32.SHChangeNotify(LONG, INT, INT, INT);
UseDLL(WINSYSDIR ^ "shell32.dll");
SHChangeNotify(134217728, 0, NULL, NULL);
UnUseDLL(WINSYSDIR ^ "shell32.dll");
In SetupBuilder, it's only on line:
Refresh Desktop
If you think that your install needs a "Desktop" refresh, then just add the
"Refresh Desktop" to your script.
If you think your uninstall needs a "Desktop" refresh, then add it to your
uninstall.
1. Create a new uninstall include script by pressing the New button or
choosing New from the File menu. Select Uninstall Include Script and the New
dialog box appears. Enter MyUninstall.sbi as the uninstall include script
name, and then press Save. Your new uninstall include script is now open.
2. Add a "Refresh Desktop" function to the script (see attached refresh.gif
screenshot) and save the include script.
4. In your main installation, use this custom uninstall (see attached
uninstall.gif screenshot).
You can use this MyUninstall.sbi in all of your projects now. That means,
you have done it with one "#include script" line. Please note that this
custom uninstall solution does *not* add any overhead to your installation.
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
05-28-2008, 02:25 AM
Friedrich,
OK. Let me add some data here. This seems to happen only on Vista and they
do NOT refresh the desktop themselves. After doing an uninstall, the
shortcut was still visible and I tried to delete it manually. Obviously I
got an error <g>. Then I pressed F5 (refresh) and the shortcut vanished.
Seems this may be a bug with Vista. Can you confirm on your machines?
--
Russell B. Eggen
www.radfusion.com
Skype Clarion chat: http://tinyurl.com/2273lm
NewsArchive
05-28-2008, 02:25 AM
Hi Russ,
Confirmed. <G>
I'm not sure that this is not a new "fix" for Vista.
Lynn
NewsArchive
05-28-2008, 02:26 AM
I was basing my post that Friedrich's data seemed a bit older than Vista.
If the data is still applicable, then it would see a bug in Vista. Or Vista
is correct and Friedrich's data is now archaic. Either way, MS has some
'splaining to do, not Friedrich! <g>
--
Russell B. Eggen
www.radfusion.com
Skype Clarion chat: http://tinyurl.com/2273lm
NewsArchive
05-28-2008, 02:27 AM
Hi Russ,
> OK. Let me add some data here. This seems to happen only on Vista and
> they do NOT refresh the desktop themselves. After doing an uninstall, the
> shortcut was still visible and I tried to delete it manually. Obviously I
> got an error <g>. Then I pressed F5 (refresh) and the shortcut vanished.
>
> Seems this may be a bug with Vista. Can you confirm on your machines?
No, this can happen on all machines ;-) and goes back to Windows 95. It's
not Vista specific. It's possible that your ShellIconCache is corrupted!?
BTW, I can't confirm this on our machines. We have seven different
Vista/Vista SP1 machines (32- and 64-bit) and two Windows 2008 machines
(32-bit) here. All machines are running the latest available security
patches.
Friedrich
NewsArchive
05-28-2008, 02:28 AM
Happens on my Vista Home Premium, Aero and UAC is on.
This is on a relatively virgin (if there is such a quality) Dell laptop.
Lynn
NewsArchive
05-28-2008, 02:28 AM
> Happens on my Vista Home Premium, Aero and UAC is on.
>
> This is on a relatively virgin (if there is such a quality) Dell laptop.
Of course, I am not saying that it is not possible. The Internet is full of
"desktop refreshing problem" messages (go back to Win95) and in most cases
it's caused by a corrupted ShellIconCache. But it seems to be very machine
specific. I have never seen this on Vista, but saw it on XP SP2. I have
"desktop refresh" support messages in our database that go back to
SetupBuilder 3.0 on a Windows 98 (no SP!) machine. So I think it's not a
"new" Vista bug <g>.
Friedrich
NewsArchive
05-28-2008, 02:29 AM
Friedrich,
That is possible. I've got a tweak somewhere around here to reset it.
Thanks for the info.
--
Russell B. Eggen
www.radfusion.com
Skype Clarion chat: http://tinyurl.com/2273lm
NewsArchive
05-28-2008, 02:30 AM
Hi Friedrich,
Would it be possible for you to add a check box to refresh desktop on
uninstall?
Lynn
NewsArchive
05-28-2008, 02:31 AM
Hi Lynn,
> Would it be possible for you to add a check box to refresh desktop on
> uninstall?
From the technical point of view, it is possible. IMO, this "Refresh
Desktop" checkbox option should really not be built-in. But SetupBuilder is
your (the customers) program and if you think it is a good idea to have it
available as a checkbox option then we'll add it.
The most flexible solution is "MyUninstall.sbi". Unzip the attached
MyUninstall.zip into your \Include folder under your main SetupBuilder
Program Files folder and add MyUninstall.sbi to your project. Then it will
refresh your desktop after the uninstall.
Your main script looks like this:
! --- Define commonly used constants ---
#include script "Common Definitions.sbi"
! The following is my custom uninstall script
#include script "MyUninstall.sbi"
And the advantage is that it gives you complete control over the process.
Instead of a "Refresh Desktop after Uninstall" checkbox, you only add one
#include script "MyUninstall.sbi" line to your script.
Okay, I have added the "Refresh Desktop after Install" and "Refresh Desktop
after Uninstall" checkbox options to the whishlist.
--
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
05-28-2008, 02:31 AM
Thank for your comments and help!
So what do others think?
I've read all your comments and still cannot understand MS's position.
While we are talking about uninstalls how about an option to delete folders
and all their contents created by the install during the uninstall? Too
dangerous?
Thanks for you consideration.
Lynn
NewsArchive
05-28-2008, 02:32 AM
Hi Lynn,
> While we are talking about uninstalls how about an option to delete
> folders and all their contents created by the install during the
> uninstall? Too dangerous?
It's already possible ;-) See "Delete Directories Not Created With my
installation" (Uninstall->Creating a Custom Uninstall).
Please note that you can use all (except the "Install File" function) in
your uninstall. For example, delete Shortcuts not created by the install,
call DLLs, run external cleanup tools, connect to your web site to send
information, remove INI files, file extensions, ODBC Drivers, stop services,
etc. not installed by the install. Virtually everything. And that's why I
think we do not need a "Refresh Desktop after Un-/Install" checkbox option
because it's a step back <g>.
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
05-28-2008, 02:33 AM
> SetupBuilder is your (the customers) program and if you think it is a
> good idea to have it available as a checkbox option then we'll add it.
Friedrich, I love the power of SB scripts - the same I love the power and
flexibility of Clarion language. But the same I prefer to use templates
instead of hand coding when possible, I'd prefer to be able to handle
everything by checkboxes instead of touch the scripts. In fact, I'd be more
than happy if I never have to deal with the scripts directly <g>.
--
Jorge Alejandro Lavera, Huenuleufu Development SRL
www.ClarionTemplates.com
www.InBack.com
NewsArchive
05-28-2008, 02:33 AM
Jorge,
> Friedrich, I love the power of SB scripts - the same I love the power and
> flexibility of Clarion language. But the same I prefer to use templates
> instead of hand coding when possible, I'd prefer to be able to handle
> everything by checkboxes instead of touch the scripts. In fact, I'd be
> more
> than happy if I never have to deal with the scripts directly <g>.
Yes, I understand ;-) But we have to find the balance between simplicity
and complexity. That's why I don't like the idea of the new "Refresh
Desktop after Install" and "Refresh Desktop after Uninstall" checkbox
options. One checkbox handles something that can be done with one script
line. And the script line even provides more flexibility because I can
decide when and where I do a refresh.
There are more than 500 script functions in SetupBuilder now. It's possible
to combine functions to handle quite a few thousand different tasks. It is
impossible to provide all this functionality with checkboxes.
We'll add it to the next build.
Friedrich
NewsArchive
05-28-2008, 02:34 AM
Do you have a function like:
PressKey(F5)
That would force a refresh as if a user did it. Seems safe then <g>.
--
Russell B. Eggen
www.radfusion.com
Skype Clarion chat: http://tinyurl.com/2273lm
NewsArchive
05-28-2008, 02:34 AM
> Do you have a function like:
>
> PressKey(F5)
>
> That would force a refresh as if a user did it. Seems safe then <g>.
In fact, the "Refresh Desktop" function does exactely what the F5 key does
<g>.
Friedrich
NewsArchive
05-28-2008, 02:34 AM
Cool! ;-)
--
Russell B. Eggen
www.radfusion.com
Skype Clarion chat: http://tinyurl.com/2273lm
NewsArchive
05-28-2008, 02:35 AM
Friedrich,
>impossible to provide all this functionality with checkboxes.
What??? Is there some kind of global shortage of check boxes? :)
Just kidding,
Kelly E Major
NewsArchive
05-28-2008, 02:36 AM
>>impossible to provide all this functionality with checkboxes.
>
> What??? Is there some kind of global shortage of check boxes? :)
<G> :)
Friedrich
NewsArchive
05-28-2008, 02:36 AM
Friedrich,
The proper response to questions like that is:
"Nope, check boxes are too expensive. Here's your sign!"
<bg>
--
Russell B. Eggen
www.radfusion.com
Skype Clarion chat: http://tinyurl.com/2273lm
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.