troubleshooting Question

Determine CD/DVD or USB Stick Drive Letter in Windows PE

Avatar of merowinger
merowingerFlag for Germany asked on
Programming Languages-OtherWindows OSWindows Vista
2 Comments1 Solution1329 ViewsLast Modified:
I need some help.

I create a vista unattended, which works fine.
Now i want a menu in windows pe which asks to user to really reinstall vista!
For this i wrote a batch file which will be executed from a synchronous commands in my autounattend.xml.

The problem is that i need the drive letter of the usb- or cd/dvd drive where the batch file is located!

In Phase 4 and 7 this was no problem....i executed the below listed code and got a environmental varibale set to the drive where the appsroot.txt file is located! But this does not seem to work in windows pe!


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"
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros