Help - Search - Members - Calendar
Full Version: WPI via USB Stick installation
MSFN Forums > Member Contributed Projects > Windows Post-Install Wizard (WPI)

   
Google Internet Forums Unattended CD/DVD Guide
bumjack
im trying to run WPI via USB stick but the path to WPI could not be find..

i have tried to put a batch file before i start WPI, the same..
the WPI path does not exist in the USB Folder, the folder is c:\WPI\wpi.cmd. (%OEM% Folder)
wehn in try to put WPI in the USB path, i cant start it after installation, windows couldnt find the USB drive letter

how could i teach windows to find the drive letter???


the wpi code
CODE
For /F "Tokens=4" %%a in ('vol') do Set USB=%%a
@Echo Stick ist %USB%


that work, when the batch will be put in the USB Folder.
can anyone help me please
cworkman
QUOTE (bumjack @ Oct 14 2008, 12:14 PM) *
im trying to run WPI via USB stick but the path to WPI could not be find..

i have tried to put a batch file before i start WPI, the same..
the WPI path does not exist in the USB Folder, the folder is c:\WPI\wpi.cmd. (%OEM% Folder)
wehn in try to put WPI in the USB path, i cant start it after installation, windows couldnt find the USB drive letter

how could i teach windows to find the drive letter???


the wpi code
CODE
For /F "Tokens=4" %%a in ('vol') do Set USB=%%a
@Echo Stick ist %USB%


that work, when the batch will be put in the USB Folder.
can anyone help me please


This Is If The WPI.hta Is In The Root Of The USB Drive
for %%i in (C 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:\wpi.hta Start %%i:\wpi.hta

This Is If WPI.hta Is In A Folder Called WPI
for %%i in (C 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:\WPI\wpi.hta Start %%i:\WPI\wpi.hta

AlBundy33
If your batch-file is also on the stick you can get the drive with %~d0
CODE
drive: %~d0
path to script %~f0 (= %~dpnx0)
path to script-dir %~dp0


have a look at the help for "for".
CODE
Zusätzlich wurde die Ersetzung von Verweisen auf FOR-Variablen erweitert.
Sie können jetzt folgende Syntax verwenden:

    %~I         - Expandiert %I und entfernt alle umschließenden
                  Anführungszeichen (").
    %~fI        - Expandiert %I zu einem vollständigen Dateinamen.
    %~dI        - Erzeugt nur den Laufwerkbuchstaben von %I.
    %~pI        - Erzeugt nur den Pfad von %I.
    %~nI        - Erzeugt nur den Dateinamen von %I.
    %~xI        - Erzeugt nur die Dateierweiterung von %I.
    %~sI        - Erzeugter Pfad enthält nur kurze Dateinamen.
    %~aI        - Erzeugt die Dateiattribute von %I.
    %~tI        - Erzeugt Datum und Zeit von %I.
    %~zI        - Erzeugt die Dateigröße von %I.
    %~$PATH:I   - Durchsucht die in der PATH-Umgebungsvariablen
                  angegebenen Verzeichnisse und expandiert die erste
                  gefundene Datei %I zu dem vollständigen Dateinamen.
                  Wenn der Name der Umgebungsvariablen nicht definiert
                  ist oder diese Datei bei der Suche nicht gefunden wurde,
                  wird dieser Parameter zu einer leeren Zeichenkette
                  expandiert.


Al
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.