Removable or fixed installation disk?

28 views
Skip to first unread message

Otomatic

unread,
Oct 14, 2023, 10:12:09 AM10/14/23
to innosetup
Is it possible to know whether the disk on which the application will be installed is a removable disk (USB, SD Card, etc.) or a fixed disk (HDD, SSD, M.2, etc.)?
For example, in the function NextButtonClick(PageId: Integer): Boolean;
with PageId = wpSelectDir
Thank you.

Wilenty do ut des

unread,
Oct 15, 2023, 7:18:31 PM10/15/23
to innosetup
Hello Otomatic.
Short answer: yes and no.
Yes: you can create your own DLL with external function to check the Drive Type.
And no: probably you already know that InnoSetup is very limited and don't have this possibility by default.

InnoSetup is a good program to create simple installers without much knowledge, but a bit complicated if, for example, you need to know more info about user computer than the installer offers.

I already "translated" a lot of Windows API functions to use it in pure [code] of the InnoSetup.
For example, answering to question in the title: https://github.com/Wilenty/Plug-ins-for-InnoSetup/tree/main/GetBusType%20-%2025%20(XP%2B)
If you afraid to execute unknown and unsigned InnoSetup installers (examples), you can always execute it in the VM (virtual machine).

And if you want know more info about user hardware, then check this repository: https://github.com/Wilenty/TSMBIOS-For-InnoSetup

BTW, currently I'm outside the home, so I less active in the internet.

Greetings,
Wilenty
Reply all
Reply to author
Forward
0 new messages