I'm trying to make the setup of new PC's we get easier and started playing around with copying group policies. I put all the instructions (copying the folder and executing the files) in a .bat, but now I have the problem that it only works when the drive letter of the stick I'm using is E:\. Is there any way to dynamically adjust the drive letter and not hard code it?
It's just a few lines of code since most is happening inside the .exe
xcopy "E:\LGPO" "C:\LGPO\" /s/h/e/k/f/c
cd C:\LGPO
lgpo.exe /g C:\LGPO\backup