Click here to get back home

How to Uninstall application created files

 HomeNewsGroups | Search

microsoft.public.smartphone.developer - Developing software for MS Smartphone? This is your group! 

get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
How to Uninstall application created files Swapnil Mahankal 02-14-2007
Posted by Swapnil Mahankal on February 14, 2007, 5:20 am
Please log in for more thread options
Hi All

I've written an application for the Compact Framework, and used
CabWizSP
(with the necessary .inf modifications) to create a CAB file. The
application
installs three files (.exe, a shortcut, and a settings file) and two
directories (one in Program Files, the other in Application Data) and
runs
correctly.

When I uninstall the application using Settings | Remove Program, two
of the
files (the .exe and shortcut) are removed, along with application
directory.
The third file appears to be removed (if I browse the file system
immediately
after the uninstall completes, the directory under Application Data is
gone).
I get a prompt that some files could not be removed, and these files
will be
removed when the system restarts. After I restart the system, the
settings
file and directory are back again!

The settings file is the only one that is modified by the application,
so it
doesn't have the same size or timestamp as when the application was
installed, and I'm guessing that this is why it isn't removed
automatically.
But I want it to be!

I've read the .inf file documentation, which I find pretty
cryptic...there's
nothing on uninstallation! I've looked at the _setup.xml file created
in the
cab, and this has no information about what to do when the application
is
uninstalled. I've searched and found no information either. So I'm
kind of
stuck.

I'm looking to put this application through designed for Windows
Mobile, and
one of the requirements is that the application shouldn't leave any
files
behind. And my app does...

Help please!! To state the problem succinctly: I want to know how to
unconditionaly remove a directory (and contents) created when my
application
was installed as part of the uninstall procedure.

Thanks in advance.

swapnil mahankal


Posted by Mike Harris [MS] on February 20, 2007, 9:07 pm
Please log in for more thread options
Are you sure there's nothing you're leaving out here? A reboot is mostly
likely getting triggered on uninstall because your settings file is still
locked open. In that case, the uninstaller will move the file and directory
to \windows\tobedeleted (I may have that name slightly wrong...). You'll
likely find your settings file there before you reboot. Upon reboot,
everything in that directory is deleted, so I'm guessing something else is
recreating your directory and settings file upon reboot.

There is nothing that you need to do for normal uninstalls - that is handled
by the installer on the device. File timestamps/size will not affect
whether a file is uninstalled or not.

--
---
Mike Harris
Microsoft Corp.
This posting is provided "AS IS" with no warranties, and confers no rights.

show/hide quoted text

Posted by Bart A on March 15, 2007, 2:19 pm
Please log in for more thread options
You can write a setup.dll that is used by the uninstaller to delete your
file.

Since you arent installing that file the uninstaller doesnt know about it
to remove it, so you can either add a dummy or default version of it to your
installer to be installed, or do the dll thing.




show/hide quoted text



Similar ThreadsPosted
delete files during cab uninstall??? March 12, 2009, 6:17 am
Can't run WM5 application created with Visual Studio 5 on a WM5 device! July 14, 2008, 7:32 pm
Displaying created subfolders November 25, 2008, 9:43 am
ERROR: connection was not created March 15, 2005, 11:31 am
Dynamically created edit box doesn't get symbol chars on Smartphon August 4, 2006, 3:48 pm
Setting the MessageClass property of a Pocket Outlook Task created on the smartphone September 6, 2006, 2:16 pm
problem in loading dll when C files are replaced by .asm files August 11, 2007, 3:59 pm
How to uninstall project June 20, 2005, 12:53 am
How to uninstall project June 20, 2005, 1:25 am
problem about app UNINSTALL. September 28, 2005, 6:26 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Driving a better car - Fuelzilla.com

Cabling site for homeowners and pros alike - Cabling-Design.com

Friends:

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap
Privacy Policy