Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Display Modes
  #1  
Old 24-04-2017, 09:28
Sebazz Sebazz is offline
Registered User
 
Join Date: Mar 2016
Location: Terra
Posts: 58
Thanks: 21
Thanked 7 Times in 6 Posts
Sebazz is on a distinguished road
Problem with Wpi script

i have a problem. Actually i use wpi installer by razor, but in the instalation during extraction files, when i click to cancel the program closes but not delete the extracted files (only when appear some error). Also, when i use pzlib v3, the setup not closes the program, it keep running in task manager and the instalation not be canceled. How to fix this ?. I need to add some code to my scrip ? Thanks

Last edited by Sebazz; 24-04-2017 at 09:49.
Reply With Quote
Sponsored Links
  #2  
Old 26-04-2017, 08:20
ffmla ffmla is offline
Registered User
 
Join Date: Nov 2014
Location: Digital world
Posts: 109
Thanks: 464
Thanked 59 Times in 40 Posts
ffmla is on a distinguished road
Smile You may try this

Quote:
Originally Posted by Sebazz View Post
i have a problem. Actually i use wpi installer by razor, but in the instalation during extraction files, when i click to cancel the program closes but not delete the extracted files (only when appear some error). Also, when i use pzlib v3, the setup not closes the program, it keep running in task manager and the instalation not be canceled. How to fix this ?. I need to add some code to my scrip ? Thanks
Hi,
I didn't use WPI.
But You may try this code.! It may be helpfull.

Under cancelbutton click section You need to add this.
Quote:
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
var
ResultCode: Integer;
begin
SuspendProc;
Confirm:=False;
if ShowCancelBox = mrYes then
Cancel:=True
else
Cancel:=False;
if Cancel then
InstallLabel4.Caption:='Rolling back changes...';
if CurPageID=wpInstalling then
begin
if Cancel then
begin
ISDoneError:=True;
ISDoneCancel:=1;
WizardForm.CancelButton.Enabled:=False;
ButtonSetEnabled(NextBtn,False);
Exec(ExpandConstant('{sys}\taskkill.exe'), ' /F /IM pZLib.exe', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
DelTree(ExpandConstant('{app}'), True, True, True);

end;
end;
ResumeProc;
end;
Reply With Quote
The Following 2 Users Say Thank You to ffmla For This Useful Post:
pakrat2k2 (26-04-2017), Sebazz (26-04-2017)
  #3  
Old 26-04-2017, 15:48
Sebazz Sebazz is offline
Registered User
 
Join Date: Mar 2016
Location: Terra
Posts: 58
Thanks: 21
Thanked 7 Times in 6 Posts
Sebazz is on a distinguished road
Quote:
Originally Posted by ffmla View Post
Hi,
I didn't use WPI.
But You may try this code.! It may be helpfull.

Under cancelbutton click section You need to add this.
Thanks for your reply. Appear this error and the other option not work . Help


Last edited by Sebazz; 26-04-2017 at 15:53.
Reply With Quote
  #4  
Old 26-04-2017, 18:36
pakrat2k2's Avatar
pakrat2k2 pakrat2k2 is offline
Moderator
 
Join Date: Apr 2005
Location: Canada
Posts: 7,209
Thanks: 3,024
Thanked 8,957 Times in 3,081 Posts
pakrat2k2 is on a distinguished road
try reading the script portion ffmla posted? answer is right there lines 2 & 3
you need those 2 lines before your line 2 section.
Reply With Quote
The Following 2 Users Say Thank You to pakrat2k2 For This Useful Post:
Epic Titan 69 (01-03-2021), Sebazz (26-04-2017)
  #5  
Old 26-04-2017, 19:49
Sebazz Sebazz is offline
Registered User
 
Join Date: Mar 2016
Location: Terra
Posts: 58
Thanks: 21
Thanked 7 Times in 6 Posts
Sebazz is on a distinguished road
Quote:
Originally Posted by pakrat2k2 View Post
try reading the script portion ffmla posted? answer is right there lines 2 & 3
you need those 2 lines before your line 2 section.
Yes, i add this lines.

var
ResultCode: Integer;

pzlib problem worked but the script dont deleted the extracted files after cancel

Last edited by Sebazz; 26-04-2017 at 20:00.
Reply With Quote
  #6  
Old 27-04-2017, 00:59
Simorq's Avatar
Simorq Simorq is offline
Registered User
 
Join Date: Mar 2014
Location: Iran
Posts: 642
Thanks: 3,602
Thanked 1,280 Times in 463 Posts
Simorq is on a distinguished road
Code:
Exec(ExpandConstant('{sys}\taskkill.exe'), ' /F /IM pZLib.exe', '', SW_HIDE, ewNoWait, ISDoneCancel);
Reply With Quote
The Following User Says Thank You to Simorq For This Useful Post:
Sebazz (27-04-2017)
  #7  
Old 27-04-2017, 06:04
Sebazz Sebazz is offline
Registered User
 
Join Date: Mar 2016
Location: Terra
Posts: 58
Thanks: 21
Thanked 7 Times in 6 Posts
Sebazz is on a distinguished road
This code not worked

DelTree(ExpandConstant('{app}'), True, True, True);
Reply With Quote
  #8  
Old 27-04-2017, 06:40
Simorq's Avatar
Simorq Simorq is offline
Registered User
 
Join Date: Mar 2014
Location: Iran
Posts: 642
Thanks: 3,602
Thanked 1,280 Times in 463 Posts
Simorq is on a distinguished road
Quote:
Originally Posted by Sebazz View Post
This code not worked

DelTree(ExpandConstant('{app}'), True, True, True);
Script Upload
Reply With Quote
  #9  
Old 27-04-2017, 06:43
Sebazz Sebazz is offline
Registered User
 
Join Date: Mar 2016
Location: Terra
Posts: 58
Thanks: 21
Thanked 7 Times in 6 Posts
Sebazz is on a distinguished road
Quote:
Originally Posted by Simorq View Post
Script Upload
Ok.
Attached Files
File Type: rar Repack.rar (17.3 KB, 12 views)
Reply With Quote
  #10  
Old 27-04-2017, 10:26
Simorq's Avatar
Simorq Simorq is offline
Registered User
 
Join Date: Mar 2014
Location: Iran
Posts: 642
Thanks: 3,602
Thanked 1,280 Times in 463 Posts
Simorq is on a distinguished road
Quote:
Originally Posted by Sebazz View Post
Ok.
Full Script Upload

Last edited by Simorq; 12-10-2018 at 22:33.
Reply With Quote
The Following User Says Thank You to Simorq For This Useful Post:
Sebazz (27-04-2017)
  #11  
Old 27-04-2017, 17:59
Sebazz Sebazz is offline
Registered User
 
Join Date: Mar 2016
Location: Terra
Posts: 58
Thanks: 21
Thanked 7 Times in 6 Posts
Sebazz is on a distinguished road
- No, any code dont work for delete folder with all extracted files from Program Files when i cancel during instalation.
I tried this and any worked.

Code:
Exec(ExpandConstant('{uninstallexe}'),'/verysilent','',SW_HIDE, ewWaitUntilTerminated, ResultCode);

or/and

DelTree(ExpandConstant('{app}'), True, True, True);
- Searching in the web i found this code, but i dont know how implement this in the CancelButtonClick Code or if can work

Code:
function deleteDir(): Boolean;
var
ResultCode: Integer;
begin
//allow to delete completely installation folder
Exec('cmd', ExpandConstant('/c RMDIR /S /Q "{app}"'), '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
Result := True;
end;

Last edited by Sebazz; 27-04-2017 at 18:11.
Reply With Quote
  #12  
Old 28-04-2017, 11:48
-XCX-'s Avatar
-XCX- -XCX- is offline
Registered User
 
Join Date: Nov 2016
Location: In Any Planet
Posts: 60
Thanks: 121
Thanked 85 Times in 23 Posts
-XCX- is on a distinguished road
~~~~~~~~~~~~~~~

Solved
Attached Files
File Type: rar Repack.rar (17.3 KB, 45 views)
Reply With Quote
The Following User Says Thank You to -XCX- For This Useful Post:
Sebazz (28-04-2017)
  #13  
Old 28-04-2017, 12:39
Sebazz Sebazz is offline
Registered User
 
Join Date: Mar 2016
Location: Terra
Posts: 58
Thanks: 21
Thanked 7 Times in 6 Posts
Sebazz is on a distinguished road
Quote:
Originally Posted by -XCX- View Post
Solved
Oh Man Thanks, Now Works.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with script inno - cancel select language nizcoz Conversion Tutorials 5 19-10-2016 00:10
problem Unistall with CIU v2 alucard1973 Conversion Tutorials 2 15-12-2015 02:43
Bat script installer problem -help? - DarkSoul19 Conversion Tutorials 0 11-10-2015 20:43
dvd playing problem... themis_t CD/DVD Software & Utilities 6 20-10-2004 13:44



All times are GMT -7. The time now is 08:00.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com