Jump to content

WPI via USB Stick installation


Recommended Posts

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

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

Link to comment
Share on other sites

  • 2 months later...

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

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

Edited by cworkman
Link to comment
Share on other sites

If your batch-file is also on the stick you can get the drive with %~d0

drive: %~d0
path to script %~f0 (= %~dpnx0)
path to script-dir %~dp0

have a look at the help for "for".

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...