APCAPC Posted February 3, 2016 Share Posted February 3, 2016 I have created working AutoUnattend file for windows 10 which has the following command working cmd /c FOR %i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) DO IF EXIST %i:\AppsRoot.txt SETX AppsRoot %i:\ -m However i want to run this command manually though a .bat file on machines which have not been installed though my autounattend file. However if i put this command into a .bat it will not execute. (the brackets on the command dont seem to work)However if i put this command into command prompt directly it will work. Exact same command one is just manually put into command prompt and one is in a bat file... Help?Command Running via Bat Command running though CMD Link to comment Share on other sites More sharing options...
Yzöwl Posted February 5, 2016 Share Posted February 5, 2016 Running from a batch file you would need this:FOR %%i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) DO IF EXIST %%i:\AppsRoot.txt SETX AppsRoot %%i:\ -mNote the double percent characters Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now