MSFN Forums: WPI via USB Stick installation - MSFN Forums

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

WPI via USB Stick installation Rate Topic: -----

#1 User is offline   bumjack 

  • Group: Members
  • Posts: 2
  • Joined: 22-April 04

Posted 14 October 2008 - 11:14 AM

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

Ad Bot #1 User is online   Sponsor Icon

  • Advert Bot
  • Group: Ad Bots
  • Posts: 0
  • Joined: --

Warn Status

Warning level: 0%

0
  • +
  • -

#2 User is offline   cworkman 

  • Newbie
  • Group: Members
  • Posts: 31
  • Joined: 07-October 05

Posted 02 January 2009 - 05:02 PM

View Postbumjack, on Oct 14 2008, 12:14 PM, said:

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

This post has been edited by cworkman: 02 January 2009 - 05:13 PM


#3 User is online   AlBundy33 

  • Member
  • PipPip
  • Group: Members
  • Posts: 202
  • Joined: 02-January 05

Posted 02 January 2009 - 10:18 PM

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

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users