AlBundy33 Posted May 23, 2007 Author Share Posted May 23, 2007 Could you please try this script (but don't forget to change the FINDSTR-command).@ECHO OFFSETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSIONSET SHARE=SET USERNAME=SET PASSWORD=IF NOT "%~1"=="" SET SHARE=%~1IF "%SHARE%"=="" ( TITLE Running local WPI... PUSHD "%~dp0" CALL :RUN POPD) ELSE ( TITLE Running WPI from "!SHARE!"... IF NOT "!PASSWORD!"=="" SET ARGUMENTS=!ARGUMENTS! "!PASSWORD!" IF NOT "!USERNAME!"=="" SET ARGUMENTS=!ARGUMENTS! /USER:"!USERNAME!" FOR /F "tokens=2" %%D IN ('NET USE * "!SHARE!" !ARGUMENTS!^|FINDSTR /I Laufwerk') DO SET DRIVELETTER=%%D IF "!DRIVELETTER!"=="" ( PUSHD "!SHARE!" ) ELSE ( PUSHD "!DRIVELETTER!" ) ECHO.Mounting "!SHARE!" to "!CD!"... CALL :RUN ECHO.Unmounting network-drive... POPD IF NOT "!DRIVELETTER!"=="" ( NET USE "!DRIVELETTER!" /DELETE ))GOTO :END:RUN PUSHD WPI ECHO.Starting WPI... START /wait "%WINDIR%\mshta.exe" wpi.hta PAUSE POPD GOTO :END:END Link to comment Share on other sites More sharing options...
JuMz Posted May 23, 2007 Share Posted May 23, 2007 It worked perfectly! To the T! Nice work buddy! Link to comment Share on other sites More sharing options...
AlBundy33 Posted May 23, 2007 Author Share Posted May 23, 2007 Thanks. Link to comment Share on other sites More sharing options...
AlBundy33 Posted June 13, 2007 Author Share Posted June 13, 2007 New Version:@ECHO OFFSETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSIONSET SHARE=SET USERNAME=SET PASSWORD=SET HIDEWINDOW=noIF NOT "%~1"=="" SET SHARE=%~1IF "%SHARE%"=="" ( TITLE Running local WPI... PUSHD "%~dp0" CALL :RUN POPD) ELSE ( TITLE Running WPI from "!SHARE!"... IF NOT "!USERNAME!"=="" IF "!PASSWORD!"=="" SET /P PASSWORD=Passwort fuer !USERNAME! @ !SHARE!: IF NOT "!PASSWORD!"=="" SET ARGUMENTS=!ARGUMENTS! "!PASSWORD!" IF NOT "!USERNAME!"=="" SET ARGUMENTS=!ARGUMENTS! /USER:"!USERNAME!" SET ARGUMENTS=!ARGUMENTS! /PERSISTENT:YES FOR /F "tokens=2" %%D IN ('NET USE * "!SHARE!" !ARGUMENTS!^|FINDSTR /I Laufwerk') DO SET DRIVELETTER=%%D IF "!DRIVELETTER!"=="" ( PUSHD "!SHARE!" ) ELSE ( PUSHD "!DRIVELETTER!" ) ECHO.Mounting "!SHARE!" to "!CD!"... CALL :RUN ECHO.Unmounting network-drive... POPD IF NOT "!DRIVELETTER!"=="" ( NET USE "!DRIVELETTER!" /DELETE ))GOTO :END:RUN PUSHD WPI ECHO.Starting WPI... IF /I "%HIDEWINDOW%"=="yes" IF EXIST Tools\cmdow.exe Tools\cmdow.exe @ /HID START /wait "%WINDIR%\mshta.exe" wpi.hta POPD GOTO :END:ENDChanges:1. now it's possible to hide the command-window if cmdow.exe exists in WPI\Tools2. share is mounted persistent (for restart-reasons)3. username and password can set for password-protected shares4. if only username is set the script will ask for passwordusers with a non-german Windows have to replace FINDSTR /I Laufwerk with FINDSTR /I ?????.????? is the first word in the first line of the output of the net-user-command with your share.This is my command with output:net use * \\home\systemLaufwerk Z: ist jetzt mit \\home\system verbunden.Der Befehl wurde erfolgreich ausgeführt.GreetingsAl Link to comment Share on other sites More sharing options...
9h0s7 Posted September 12, 2007 Share Posted September 12, 2007 I think you guys are making this more difficult then it is lol. Or maybe I just like my way better. Here's my two cents. Set WPI to use UNC (i.e. \\pcname\nero\install.exe or w/e). Use batch file to copy all files under wpi directory to local disk. use AutoIt to start the batch file and start wpi when done copying. after wpi has finished have it run another batch to delete wpi folder (if so desired) and then delete itself. Link to comment Share on other sites More sharing options...
Jbenke Posted September 12, 2007 Share Posted September 12, 2007 I didn't know it was really that hard to run it from the network. I have the exact same versions on cd and the network. I just copyied it up there with the directory strucure, Unattended, which contains the wpi.ico and autorun, (truthfully this directory name doesn't matter) then wpi\all the normal stuff. Then when I want to use it I just map a local drive letter to \\server\unattended and the autorun in the unattended directory kicks off and the wpi behaves as if it were on a cd. If the autorun doesn't kick I just go hit the wpi.hta and it goes. Have yet to notice any issues. Link to comment Share on other sites More sharing options...
mrtyler Posted September 13, 2007 Share Posted September 13, 2007 I think you guys are making this more difficult then it is lol. Or maybe I just like my way better. Here's my two cents. Set WPI to use UNC (i.e. \\pcname\nero\install.exe or w/e). Use batch file to copy all files under wpi directory to local disk. use AutoIt to start the batch file and start wpi when done copying. after wpi has finished have it run another batch to delete wpi folder (if so desired) and then delete itself.I think the point was not to have to downlaod 2gigs of install files over the network. I am using the unc path example above to map a drive to my corp. install server where we keep all the apps we have to install. I dont want to have to download all the apps I install over the network just to install them.With the unc path version I am able to add a shortcut to my Image and any machine that is imaged has a shortcut to WPI on our server, The desktop guys run the cmd to kick off the WPI and select thier programs and start. Way to fast and easy and I really wanted to thank everyone for all thier help.Ben Link to comment Share on other sites More sharing options...
thefastone Posted October 4, 2007 Share Posted October 4, 2007 After a couple of years im saying hello again! I must say the WPI community and special the developer have done a great job..!!! Im trying to run WPI from Winpe 2 wich is freeware if used from WAIK...1. Winpe2 its running in Ram after deployment from PXE-Linux Server... 2. WPI is working fine if i run it from Ramdrive...also all aplications are running fine...if they also stay in RAMMy biggest problem is i dont have enough RAM.... (Its also easier to update all thinks in the network share!!!)So im trying to run WPI and al the other stuff from network...and because its not working im now here..... I cant make run WPI from network share: Because the Winpe2 User "System" dont knows Driveletters like z:at other side i cant use the method running wpi from %share% because i must (beacuse of security settings in Winpe2???) start wpi.hta with x:\windows\system32\mshta.exe %share%\wpi.hta ...but this works only partially i get the errors shown in attached files: ..after the last error i see only a blank "mshta" window.I think there is (in my case) some problem with the wpipath variable... maybe the variable is not interpreted correctly in Winpe2??My Question: Is there somebody out there who has running the combination WINPE2 and WPI with apllications from Network share? a lot of thanks for any answer! Link to comment Share on other sites More sharing options...
JuMz Posted October 5, 2007 Share Posted October 5, 2007 A Side Question:Why are you running WPI in a Preinstallation Environment (PE)? What could you possibly install in an environment that is meant to install an operating system? Link to comment Share on other sites More sharing options...
zorphnog Posted October 5, 2007 Share Posted October 5, 2007 I believe he is installing tools/apps that cannot be integrated into the PE image. Link to comment Share on other sites More sharing options...
thefastone Posted October 6, 2007 Share Posted October 6, 2007 OK! You are making the right question!!! Why use WPI in preinstalation environment???This same question i have made about 3 years before....well my question was: Why i cant select in an GUI in the first 5 minutes of contact with a n new PC all the components i want have installed onto the computer..????WPI for me is more than Windows (why not Linux)Post (why not Pre...)Instalation (why not other thinks like Virus Scan or Bios Update or Imaging with Imagex?? )If i create some new scripts (like now unattend Application installs) i can make WPI most powerfull than ever!!!Running from WInpe2 its possible to make in the first minuterescue and antivirus operations on existent Installation of a PCdefining of wich operating system and applications will be installed (unattended WIndows script /unattended apllication scripts applied with imagex)and and and...ok all what in the year 2004 only was in my mind in this moment exists: File-based Imaging Solution!! and a powerfull GUI so that everbody can use it once configured... the end-user has only to know where to put the aplication and OS "source files"!!!Ok ...the only problem is: How to make it work from a Network Ressource after booting also the Winpe2 from Network.... i hope the developers will take my comments as an suggestion for improvements Oh, and i have made some improvements regarding slimming down Winpe2.. at this moment im using an only 80MB "small" WinPE2 winpe.wim wich is working fine (if wpi is installed in this file)... Link to comment Share on other sites More sharing options...
thefastone Posted October 9, 2007 Share Posted October 9, 2007 ok fine...no replies... well another question: Im getting "error on line102" (see my picture above) when i delete wbem folder... i think there is an unique WMI comannd elsewhere in scripts... who knows about it... i can close the error windows and everthing else works fine...Please i need shortly some constructive feedback Link to comment Share on other sites More sharing options...
thefastone Posted October 10, 2007 Share Posted October 10, 2007 ok..i found the place in the sourcecode...in core.js line 102 is detected the OSLanguage...i comment out some lines and hardcoded my language // var OSProps = GetObject("winmgmts:").InstancesOf("Win32_OperatingSystem"); // Language ID in Dec // sLang = new Enumerator(OSProps).item(); // Enum = sLang.OSLanguage; // DtoH = DecToHex(Enum); // while (DtoH.length<4) DtoH = "300a"; Link to comment Share on other sites More sharing options...
zorphnog Posted October 10, 2007 Share Posted October 10, 2007 You know you can add WMI support to WinPE 2.0 and you won't get these errors. I haven't tried using WPI in PE, but I do use several other hta's and just as a rule of thumb I always add scripting and wmi support. You can add them to your PE image by using the peimg tool.i.e.peimg /install=*scripting* <pathtoPEmount>\Windowspeimg /install=*wmi* <pathtoPEmount>\Windows Link to comment Share on other sites More sharing options...
eickst Posted October 10, 2007 Share Posted October 10, 2007 I simply have a runonce line to map my WPI share to the T:\, and then run T:\wpi.htaAll of my install paths have T:\ in them instead of %cdrom%, I haven't felt the need to go back and change them.Hundreds of installs, no problems. (At least no problems when the file server is linux based). Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now