Acion bahaves ubnormally

Hello all.
I am trying to create a task to install an application that uses some additional files for configuration.
I created a task, using the wizard and provided the folder to be installed.
The app did get installed but without the config.
to see what was going on, I changed the relevance to extract the files to C:\ install the app , and then delete the folder.

Here is what I created :
prefetch …
folder create "C:\setup"
extract … "C:\setup"
wait C:\setup\setup.exe /S /v/qn
folder delete “C:\setup”

when I remove the last line : folder delete “C:\setup”, the installation ends correctly
I tried to create another task to run this command , and run both as baseline
didn’t help.

Can anyone assist me with this pls?
Thanks in advance

Try below, some time folder delete doesn’t work the way it should be hence we are using actual local commands to achieve the same, however if anything is still open from that folder somewhere on the system both option will never gonna work.

waithidden cmd.exe /C rmdir /S /Q "C:\setup"

Hello Vk
Thank you for your fast response.
the folder delete command works perfectly as it is, the problem is, that it runs before the end of installation
and it causes the application to be installed without proper config
I’m looking for a way to delay the execution of this command.

This is very strange but I am 100% sure folder delete command cant be executed without completion of previous command because of wait

Check your above command locally & also check the client logs for your earlier initiated action to see the results of previous wait command, wait command must be completing than only folder delete is being executed.

Thank you, I checked this
It looks like the setup command finishes its run and then the app itself looks for the files in the folder
at the same time, folder is deleted by the next command "folder delete"
Is it possible somehow to create a delay of 1 minute before running next command?

Yes, just put below command in between your execution & deletion.

waithidden timeout 60

60 above is seconds, you can increase decrease as per your need.

1 Like