davidwillian
Posts: 2
Joined: Wed Sep 22, 2021 11:13 am

how to create a random install folder and send the install files to this randomly created folder?

Wed Sep 22, 2021 11:23 am

how to create a random install folder and send the install files to this randomly created folder.

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: how to create a random install folder and send the install files to this randomly created folder?

Wed Sep 22, 2021 11:33 am

Hello and welcome to our forums,

I am not quite sure I understand your request here.

Could you please give me some more details about why you would like to install the files into a "random" folder?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

davidwillian
Posts: 2
Joined: Wed Sep 22, 2021 11:13 am

Re: how to create a random install folder and send the install files to this randomly created folder?

Wed Sep 22, 2021 12:28 pm

Every time I install my application on the computer I would like to install it in a random folder, for example:
C:\ProgramData\Ajiuery
C:\ProgramData\osUieo
C:\ProgramData\mSpoeu
C:\ProgramData\gquUs

I would like to create this random folder and then put the installation files in that folder.

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: how to create a random install folder and send the install files to this randomly created folder?

Thu Sep 23, 2021 12:01 pm

Hello David,

In order to achieve that, you can proceed as it follows:

- add your files to the "Files and Folders" page

- go to "Install Parameters" page and set the "Application Folder" to: [CommonAppDataFolder]

Now, it depends how you want to generate the "random" folder. Most likely, you will need a custom action for this.

This custom action should generate the random folder and then save it in an installer property.

After doing so, we will need to go to "Dialogs" page, select the "FolderDlg" dialog and add an two "Published Events":

- one that executes the custom action

- one "Set property" event that will set APPDIR to the new value, e.g.: [APPDIR][THE_PROP_YOU_SET_IN_CUSTOM_ACTION]

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”