I am relatively new to creating batch files.
Would someone be able to assist me with me with the following:
I have a piece of software called “ABCSoftware”, it installs on every user profile.
When new versions of the software are installed, it makes new folders ex:
ABCSoftware20190102
ABCSoftware20190505
ABCSoftware20200221
Each profile folder has an uninstall.exe that cleans things up nicely.
I am trying to put together a batch file that will go through every subfolder after the ABCSoftware and uninstall using the uninstall.exe
I have succeeded on getting the batch to work but it only seems to uninstall on the profile I’m running the batch on.
See below:
echo uninstalling same software on every profile…
for /d %%D in (“C:UsersAceForSaleAppDataLocalABCSoftware*”) do (
“%%Duninstall.exe” /uninstall /silent
)
This coding above works and successfully goes through my AceForSale Windows Profile and uninstalls each version but only for my profile. But there are multiple users on this machine so I can’t seem to get a working wild card. I have tried “%UserProfile% and other wild cards but haven’t been too successful.
Is it possible to do another for/do statement inside this one?
Thank you