Cleaning powershell script and timing

Common questions about using Actual Installer.
Post Reply
delo06260
Posts: 1
Joined: Tue Feb 28, 2023 10:02 am

Cleaning powershell script and timing

Post by delo06260 »

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.
Leo
Site Admin
Posts: 466
Joined: Fri Jan 22, 2010 12:40 pm

Re: Cleaning powershell script and timing

Post by Leo »

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).
Leo,
Actual Installer Team
https://www.actualinstaller.com
delo06260
Posts: 1
Joined: Tue Feb 28, 2023 10:02 am

Re: Cleaning powershell script and timing

Post by delo06260 »

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.
Last edited by delo06260 on Mon Mar 13, 2023 2:19 pm, edited 1 time in total.
Post Reply