Hello,
I'm a beginner with Actual Installer, I want to clean old installDir folder before installation (without uninstaller) and I want save some file before (only if user doesn't abort installation) so I have a powershell script.
Here is my command:
File: <SystemDir>\cmd.exe
Parameters: /C powershell.exe <SetupTempDir>\cleaningl.ps1 <InstallDir>
<InstallDir> is a parameter to clean the folder before installation.
This does not work, as it only opens the command window.
Does anyone have any idea what the problem is?
Also I have another question: we can't choose as timing, "before installation" "after installation" "at folder select dialog" but I would like to run the command just at the start of the installation (when we know the final installation folder) because it allows to clean up possible files/folder already present if the folder exists. Is this possible ?
Thanks in advance.
Cleaning powershell script and timing
Re: Cleaning powershell script and timing
Hi,
here are some recommendations:
1. make sure that the executing PowerShell scripts is not restricted on your computer
2. Try to launch the command as administrator
3. Try to put quotes to the paths:
Parameters: /C powershell.exe "<SetupTempDir>\cleaningl.ps1" "<InstallDir>"
Regarding your 2nd question, it is not possible with Timings, or just disable the folder changing (page Installation / Advanced).
here are some recommendations:
1. make sure that the executing PowerShell scripts is not restricted on your computer
2. Try to launch the command as administrator
3. Try to put quotes to the paths:
Parameters: /C powershell.exe "<SetupTempDir>\cleaningl.ps1" "<InstallDir>"
Regarding your 2nd question, it is not possible with Timings, or just disable the folder changing (page Installation / Advanced).
Re: Cleaning powershell script and timing
Hi Leo,
thank you for the answer.
I regret the absence of a timing before installation, it would have been very useful in many situations.
thank you for the answer.
I regret the absence of a timing before installation, it would have been very useful in many situations.
Last edited by delo06260 on Mon Mar 13, 2023 2:19 pm, edited 1 time in total.