Video Screencast Help
Protect Your POS Environment Against Retail Data Breaches. Learn More.

Delete the file yes/no.

Created: 29 Oct 2012 • Updated: 03 Nov 2012 | 9 comments
This issue has been solved. See solution.

How to add the window when you uninstall the squeeze so that it deletes some files and if not it's not?

 

 

Very THANKS.

Discussion Filed Under:

Comments 9 CommentsJump to latest comment

EdT's picture

I assume this is still a Wisescript project.

One solution to your requirement is to use the "Add text to install.log" command. Here is an extract from the documentation:

 

Non-System File:
You can add a line to the Install.log that pauses the uninstall, executes an application
until it finishes, then resumes the uninstall. To do this, type the following as Log Text,
substituting your own path to the .EXE (case-sensitive):
Execute path: %MAINDIR%\Remove.exe
 
If you want the uninstall to remove not only files that were installed, but also files that
were added later, you can remove all the files and sub-directories within a specified
directory. Use this option with caution because end users might have stored their own
files in the directory. You can use Windows standard wildcard notation (example: *.* for
all files). Type the following as Log Text, substituting your own directory path (casesensitive):
File Tree: %MAINDIR%\Data\Temp\*.*
 
So you could write a simple Wisescript project that just asks whether the user wants to "Do you wish to keep your saved games"  (note the correction to your English), and then deletes the saved game files if the user chooses the "No" option. You would then add this file to your installation files, and insert the line to run this file into the installation log at the beginning of your install.  What should then happen is that the uninstall will read this extra line in the installation logfile and run your small EXE, then user then responds, and the EXE removes the files if required and then exits, allowing the rest of the uninstall to complete.
 
There are other ways I can think of, of achieving this, but they are somewhat more complex, so try this one first and see how you get on.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

VBScab's picture

>then deletes the saved game files if the user chooses the "Yes" option

Oops! One would hope that the code would delete the files if the user answered "No"! :-)

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

EdT's picture

<one quick edit later>

I don't know what you mean.....??

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

BloodManXD's picture

I have one more question. What you need to do to when you install programs to create the file uninstall.exe + UNWISE.exe not just UNWISE.exe?

 

pl: Mam jeszcze jedno pytanie. Co trzeba zrobić aby po zainstalowaniu programy się tworzył plik uninstall.exe + UNWISE.exe a nie tylko UNWISE.exe?

EdT's picture

UnWise.exe is not created when you install a Wisescript application, it is a standard file that is part of any EXE you compile. If you look in the compilation options, there is a checkbox for "ZIP compatible". If you check this box, and then compile your EXE, you can open it in WinZip and see all the files in the EXE, including Unwise.exe and the original source WSI file. This is a good way of ensuring you can access the original source in case it every gets lost, but also allows anyone familiar with Wise technology to extract your source code.

There is no mechanism for creating an Uninstall.exe automatically. You would need to create this EXE as a separate project.

Hope this makes sense.

Ed

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

BloodManXD's picture

I think I found a solution. But, however, I was not at all familiar with English. Could anyone write me a script?

 

Article: http://www.symantec.com/business/support/index?page=content&id=HOWTO4342

 

BIG THX.

VBScab's picture

Good, glad to hear that. The thing is, the way that forums generally work is that users share their knowledge so please post the solution you found for the benefit of those who come seeking the same.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

BloodManXD's picture

Actually, I did not create the script but using Resource Hacker to Polonized
uninstaller.