Make sure you rebuild the array into a new string that includes the new value you want Before using one of the Set's to set it. Dont want to set %PATH% to just your new value...that wouldnt be good.