Delete Files "%DATAPATH%\*.*"
Hi Friedrich
Got this script line Delete Files "%DATAPATH%\*.*" but it doesnt delete
anything.
Its in an uninstall script ie a script called when someone uninstalls the
app, the regkeys are deleted fine, the service and runnings app close down
fine which is all called before the above line but the files are not being
deleted.
Any ideas?
I'm wondering if the service and app havent closed down before the delete
files line is called perhaps or does the StopService wait for the service to
close before going onto the next line.
Cheers
Richard
Re: Delete Files "%DATAPATH%\*.*"
> Got this script line Delete Files "%DATAPATH%\*.*" but it doesnt delete
> anything.
If it is a per user CSIDL path, then the most likely thing is that the
installer ( running elevated ) would be looking at one location in the
drive and the application ( which normally runs non-elevated ) would be
putting the data in another.
So as a result, there are no data files in the location where the installer
is looking to delete them from.
JAT...
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.clarionproseries.com - ProScan, ProImage, ProPath and other Clarion
developer tools!
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms - Now with PNG support!
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
Re: Delete Files "%DATAPATH%\*.*"
No its in %_CSIDL_COMMON_APPDATA% but the user can change the location and
that is stored.... Might be worth checking if the %DataPath has a value
first. *rollseyes*
..
Richard Rose
Re: Delete Files "%DATAPATH%\*.*"
%DataPath% didnt have the value, I had assumed it would have remembered or
picked up the values from when it was installed. Fixed now.
Thanks!
Richard Rose
Re: Delete Files "%DATAPATH%\*.*"
> No its in %_CSIDL_COMMON_APPDATA% but the user can change the location and
> that is stored.... Might be worth checking if the %DataPath has a value
> first. *rollseyes*
LOL - been there, done that<g>.
:-)
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.clarionproseries.com - ProScan, ProImage, ProPath and other Clarion
developer tools!
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms - Now with PNG support!
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
Re: Delete Files "%DATAPATH%\*.*"
Hi Richard,
> Got this script line Delete Files "%DATAPATH%\*.*" but it doesnt delete
> anything.
>
> Its in an uninstall script ie a script called when someone uninstalls the
> app, the regkeys are deleted fine, the service and runnings app close down
> fine which is all called before the above line but the files are not being
> deleted.
>
> Any ideas?
>
> I'm wondering if the service and app havent closed down before the delete
> files line is called perhaps or does the StopService wait for the service
> to close before going onto the next line.
First of all, I would make sure that Stop Service really stopped it. You
can check this in a LOOP (perhaps the service needs some time to
close-down). What we do in script writing cosulting projects is, we stop a
service, then check the service again (LOOP 5 times with a 4 seconds delay,
break LOOP if service is not running) to give some time.
Then, what you can do is to see if the files are still "in-use". You can
use the "Check In-use File..." and/or "Check In-use Folder Tree..." script
functions to handle this. "Check In-use Folder Tree..." can even return a
list of filename(s) in use.
Friedrich
Re: Delete Files "%DATAPATH%\*.*"
Hi Friedrich
> Then, what you can do is to see if the files are still "in-use". You can
> use the "Check In-use File..." and/or "Check In-use Folder Tree..." script
> functions to handle this. "Check In-use Folder Tree..." can even return a
> list of filename(s) in use.
DeleteTree is what I needed instead of Delete *.*, despite having checks
already in place and I mistakenly thought I hadnt populated the %Datapath%
it was populated right at the very beginning of the script I just hadnt seen
it.
One other problem I have have is the uninstaller window doesnt appear on
screen until after the uninstall script has finished. The taskbar shows the
window button and the popup messages appear on screen from the uninstall
script asking if I want to delete the data files but the main uninstaller
just doesnt show.
Any ideas how I can get the uninstaller window to appear properly before the
uninstall script is started?
Cheers
Richard
Re: Delete Files "%DATAPATH%\*.*"
Hi Richard,
> DeleteTree is what I needed instead of Delete *.*, despite having checks
> already in place and I mistakenly thought I hadnt populated the %Datapath%
> it was populated right at the very beginning of the script I just hadnt
> seen it.
>
> One other problem I have have is the uninstaller window doesnt appear on
> screen until after the uninstall script has finished. The taskbar shows
> the window button and the popup messages appear on screen from the
> uninstall script asking if I want to delete the data files but the main
> uninstaller just doesnt show.
>
> Any ideas how I can get the uninstaller window to appear properly before
> the uninstall script is started?
The "Process Uninstall Queue" script function displays the uninstall dialog.
Add your own functions after that function. And of course, make sure you
are using the latest SB75 uninstall!
Friedrich
Re: Delete Files "%DATAPATH%\*.*"
I cant move the Process Uninstall Queue becuase its shutting down programs
before it can uninstall them. A catch 22.
Richard Rose
Re: Delete Files "%DATAPATH%\*.*"
> I cant move the Process Uninstall Queue becuase its shutting down programs
> before it can uninstall them. A catch 22.
Aha, okay. Then display your own Wait dialog before that standard uninstall
screen. You can use all available functions in the uninstall script
(including wizards, but excluding Install File(s) actions).
Friedrich