single line in runonce
Posted: 24 Nov 2019 01:34
I want to put a RunOnce entry in my autounattend.xml, that will detect the USB drive, and run a batch file located on the USB drive.
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
and this does not work
How can I make this work in a single line?
Thanks
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