How to setup\unins000.exe erase dynamic -name of file?

22 views
Skip to first unread message

Adrian Dragne

unread,
Aug 1, 2026, 5:33:12 AM (6 days ago) Aug 1
to innosetup
Hello
I have , this routine at "Intialize" or Before start install, this routine named "vla_get_comcatcd"

My routine calculate and create dynamic name
"\bin.w32\comcatcq.dll" OR
"\bin.w32\comcatcd.dll" OR
"\bin.w32\comcatce.dll"
.... He, checking name between [B..Z]"

The unsins000.exe, from uninstall-folder do not known which name of file exists on disk,
Please At  section ,,How to callpas "vla_get_comcatcd" again , but at uninstall section?
[code]
procedure InitializeWizard;
begin
  { Create the pages }
  AVIFileInit;
 
  UserPage := CreateInputQueryPage(wpWelcome,
    'Personal Information', 'Who are you?',
    'Please specify your name and the company for whom you work, then click Next.');
  UserPage.Add('Name:', False);
  UserPage.Add('Company:', False);

  UsagePage := CreateInputOptionPage(UserPage.ID,
    'Personal Information', 'How will you use My Program?',
    'Please specify how you would like to use My Program, then click Next.',
    True, False);
  UsagePage.Add('Light mode (no ads, limited functionality)');
  UsagePage.Add('Sponsored mode (with ads, full functionality)');
  UsagePage.Add('Paid mode (no ads, full functionality)');

  LightMsgPage := CreateOutputMsgPage(UsagePage.ID,
    'Personal Information', 'How will you use My Program?',
    'Note: to enjoy all features My Program can offer and to support its development, ' +
    'you can switch to sponsored or paid mode at any time by selecting ''Usage Mode'' ' +
    'in the ''Help'' menu of My Program after the installation has completed.'#13#13 +
    'Click Back if you want to change your usage mode setting now, or click Next to ' +
    'continue with the installation.');

  KeyPage := CreateInputQueryPage(UsagePage.ID,
    'Personal Information', 'What''s your registration key?',
    'Please specify your registration key and click Next to continue. If you don''t ' +
    'have a valid registration key, click Back to choose a different usage mode.');
  KeyPage.Add('Registration key:', False);

  ProgressPage := CreateOutputProgressPage('Personal Information',
    'What''s your registration key?');

  DataDirPage := CreateInputDirPage(wpSelectDir,
    'Select Personal Data Directory', 'Where should personal data files be installed?',
    'Select the folder in which Setup should install personal data files, then click Next.',
    False, SetupMessage(msgNewFolderName));
  DataDirPage.Add('');

  { Set default values, using settings that were stored last time if possible }

  UserPage.Values[0] := GetPreviousData('Name', ExpandConstant('{sysuserinfoname}'));
  UserPage.Values[1] := GetPreviousData('Company', ExpandConstant('{sysuserinfoorg}'));
  vla_get_comcatcd;
  case GetPreviousData('UsageMode', '') of
    'light': UsagePage.SelectedValueIndex := 0;
    'sponsored': UsagePage.SelectedValueIndex := 1;
    'paid': UsagePage.SelectedValueIndex := 2;
  else
    UsagePage.SelectedValueIndex := 1;
  end;
  DataDirPage.Values[0] := GetPreviousData('DataDir', '');
end;


Thanks...


setup-devcinfo.txt
setup-devcinfo.iss

Gavin Lambert

unread,
Aug 2, 2026, 7:00:31 PM (5 days ago) Aug 2
to innosetup
On Saturday, August 1, 2026 at 9:33:12 PM UTC+12 Adrian Dragne wrote:
The unsins000.exe, from uninstall-folder do not known which name of file exists on disk,
Please At  section ,,How to callpas "vla_get_comcatcd" again , but at uninstall section?

The CurUninstallStepChanged event function is the place to call anything that you need to do at uninstall time.

Having said that, if it's just to uninstall the file: provided that you use a [Files] entry with either Check or {code:...} to determine the filename to install it, then it will be uninstalled correctly. 
Reply all
Reply to author
Forward
0 new messages