Published a download on an internal website that contains some updated tools for our PC support teams.
The files are in a self-extracting .exe that will extract to whatever folder you run it from.
What I’d like to do is, delete the existing subfolder structure, download the self-extracting .exe, copy the .exe to the proper parent folder on the target PC, run the .exe, then delete the .exe when completed.
exapmle:
Target PC:
agent deletes existing c:\windows\pctools*.*
downloads self extracting .exe from internal website
looks good. You could shorten it by a line if you use prefetch instead of download and continue if. You could also just wait for cache management to clear the downloaded tools.exe, but I presume you have a good reason for wanting it deleted ASAP.