My problem is that a RunOnce entry is a single line, I can't have 2 lines.
in my testing this works, but it's 2 lines
Code: Select all
for %%i in (A:,B:,D:,E:,F:,G:,H:,I:,J:,K:,L:,M:,N:,O:,P:,Q:,R:,S:,T:,U:,V:,W:,X:,Y:,Z:,) do (if exist %%i\autounattend.xml set usb=%%i)
echo the usb drive is %usb%
Code: Select all
for %%i in (A:,B:,D:,E:,F:,G:,H:,I:,J:,K:,L:,M:,N:,O:,P:,Q:,R:,S:,T:,U:,V:,W:,X:,Y:,Z:,) do (if exist %%i\autounattend.xml set usb=%%i) & echo the usb drive is %usb%
Thanks