Ok so this works but looking for thoughts if this the best approach..
First I need to give some history on why I am looking at doing it this way. We were on CMS 6.0 R13 a few years back. When we went to 7.1 I ran a similar wisescript that ran aexagentutil /clean from the default folder. This left the Altiris folder behind which I thought was ok but in actuallity it left the Software Delivery folder in the root of the Agent folder. In 7.1 that was moved under \Agents\SoftwareManagement\Software Delivery. I found out later that I should of copied out the aexagentutil to a temp folder then ran.
Anyway moving to today We went to 7.5 and now going to 7.6.
I realize now running AexNSAgent.exe /uninstall totally removes the Altiris Agent folder and this is what I want to do and this works but there is a slight delema. During the uninstall of the agent and the subagent, I am unable to have the script wait for all to finish to then install so I had to use the Pause command in WiseScript. While this works it just makes it longer for the install.
so my script is easy and curious if anyone sees any possible better approaches? (note I am moving the pause up into the If statement so the pause wont happen if altiris is not present. Testing that right now...)
.