habz99 Posted July 20, 2017 Posted July 20, 2017 can some one have a look at this and tell me what is wrong with it, as it comes up with the following message "ictpc.txt was unexpected at this time" FOR /F %s IN ictpc.txt DO delprof2.exe /Q /I /ed default /ed Admin /c:\\%s i am running cmd as admin, all the files are located in the same directory (c:\)
sted Posted July 20, 2017 Posted July 20, 2017 looking at a similar script i think you may be missing a % sign and some brackets for /f %%u in (listofcomputers.txt) do (start shutdown.exe -s -m \\%%u -f -t 60 -c "daily shutdown") 1
habz99 Posted July 20, 2017 Author Posted July 20, 2017 thanks, was missing the brackets here is the working script: FOR /F %s IN (ictpc.txt) DO delprof2.exe /i /u /ed default /ed Admin /c:\\%s
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