Jump to content

Can't connect to network drive via PE2.0


dkreifus

Recommended Posts

For some reason, I can't get an IP and connect to a network drive.

Here is my batch file while makes the boot disk, and then my startnet.cmd

@echo off
setlocal
TITLE Making BootDisk 2.0
set winpe=C:\BootDisk\PE2.0\winpe2.0
set Petools=C:\Program Files\Windows AIK\Tools\PETools
set BootDisk=C:\BootDisk\PE2.0

echo Updating path to include peimg, oscdimg, imagex
echo.
echo %petools%
echo %petools%..\%PROCESSOR_ARCHITECTURE%
echo.

set PATH=%PATH%;%petools%;%petools%..\%PROCESSOR_ARCHITECTURE%

CALL copype.cmd x86 "%winpe%"

imagex /mountrw %winpe%\winpe.wim 1 %winpe%\mount

ECHO deleting unneeded directories
rd /s /q %winpe%\mount\Windows\System32\ar-SA
rd /s /q %winpe%\mount\Windows\System32\bg-BG
rd /s /q %winpe%\mount\Windows\System32\cs-CZ
rd /s /q %winpe%\mount\Windows\System32\da-DK
rd /s /q %winpe%\mount\Windows\System32\de-DE
rd /s /q %winpe%\mount\Windows\System32\el-GR
rd /s /q %winpe%\mount\Windows\System32\es-ES
rd /s /q %winpe%\mount\Windows\System32\et-EE
rd /s /q %winpe%\mount\Windows\System32\fi-FI
rd /s /q %winpe%\mount\Windows\System32\fr-FR
rd /s /q %winpe%\mount\Windows\System32\he-IL
rd /s /q %winpe%\mount\Windows\System32\hr-HR
rd /s /q %winpe%\mount\Windows\System32\hu-HU
rd /s /q %winpe%\mount\Windows\System32\it-IT
rd /s /q %winpe%\mount\Windows\System32\ja-JP
rd /s /q %winpe%\mount\Windows\System32\ko-KR
rd /s /q %winpe%\mount\Windows\System32\lt-LT
rd /s /q %winpe%\mount\Windows\System32\lv-LV
rd /s /q %winpe%\mount\Windows\System32\nb-NO
rd /s /q %winpe%\mount\Windows\System32\nl-NL
rd /s /q %winpe%\mount\Windows\System32\pl-PL
rd /s /q %winpe%\mount\Windows\System32\pt-BR
rd /s /q %winpe%\mount\Windows\System32\pt-PT
rd /s /q %winpe%\mount\Windows\System32\ro-RO
rd /s /q %winpe%\mount\Windows\System32\ru-RU
rd /s /q %winpe%\mount\Windows\System32\sk-SK
rd /s /q %winpe%\mount\Windows\System32\sl-SI
rd /s /q %winpe%\mount\Windows\System32\sv-SE
rd /s /q %winpe%\mount\Windows\System32\th-TH
rd /s /q %winpe%\mount\Windows\System32\tr-TR
rd /s /q %winpe%\mount\Windows\System32\uk-UA
rd /s /q %winpe%\mount\Windows\System32\zh-CN
rd /s /q %winpe%\mount\Windows\System32\zh-TW
rd /s /q %winpe%\mount\Windows\System32\zh-HK
rd /s /q %winpe%\mount\Windows\System32\sr-Latn-CS
rd /s /q %winpe%\ISO\boot\fonts
rd /s /q %winpe%\ISO\EFI\microsoft\boot\fonts
del /s /q %winpe%\mount\Windows\System32\diskraid.exe
del /s /q %winpe%\mount\Windows\System32\dpapimig.exe
del /s /q %winpe%\mount\Windows\System32\doskey.exe
del /s /q %winpe%\mount\Windows\System32\esentutl.exe
del /s /q %winpe%\mount\Windows\System32\esent.dll
del /s /q %winpe%\mount\Windows\System32\ftp.exe
del /s /q %winpe%\mount\Windows\System32\notepad.exe
del /s /q %winpe%\mount\Windows\System32\ntprint.exe
del /s /q %winpe%\mount\Windows\System32\ntprint.dll
del /s /q %winpe%\mount\Windows\System32\print.exe
del /s /q %winpe%\mount\Windows\System32\printui.dll
del /s /q %winpe%\mount\Windows\System32\robocopy.exe
del /s /q %winpe%\mount\Windows\System32\taskmgr.exe
del /s /q %winpe%\mount\Windows\System32\wbengine.exe
del /s /q %winpe%\mount\Windows\System32\wbadmin.exe
del /s /q %winpe%\mount\Windows\System32\wdscapture.exe
del /s /q %winpe%\mount\Windows\System32\wdscapture.inf
ECHO Copying add on files
copy /y %bootdisk%\addon\*.* %winpe%\mount\Windows\System32
imagex /unmount %winpe%\mount /commit
copy %winpe%\winpe.wim %winpe%\ISO\sources\boot.wim
oscdimg -n -b%winpe%\etfsboot.com %winpe%\ISO "%bootdisk%\Boot CD 2.0.iso"
endlocal
exit

StartNet.CMD

@echo off
TITLE Boot CD v 2.1
wpeinit
regsvr32 /s netcfgx.dll
netcfg -v -winpe
net start dhcp
net start nla

:Menu
CLS
ipconfig

ECHO.
ECHO Please choose your action:
Echo A)Image Computer
Echo B)Run Ghost
Echo C)Ghost w/ net drive
Echo D)Format C: drive
ECHO E)Go back a step
ECHO F)Exit


choice /c:ABCDEFG /N

if errorlevel 7 GOTO makeimage
if errorlevel 6 GOTO exit
if errorlevel 5 GOTO menu
if errorlevel 4 GOTO wipe
if errorlevel 3 GOTO netghost
if errorlevel 2 GOTO tool
if errorlevel 1 GOTO comp

:comp
ECHO.
ECHO.
ECHO Please choose your model:
ECHO.
Echo A)DX2000,DC5000,DC5100,DC5700
Echo B)T43,T60,500(M)
Echo C)T40,T41,T42,
ECHO D)510 (EVO 51)
Echo E)A30,A31,R40
Echo F)D5pM,X40
ECHO G)HP NC4400
ECHO H)Go back to beginning

choice /c:ABCDEFGH /N

if errorlevel 8 GOTO menu
if errorlevel 7 set model=nc4400
if errorlevel 6 set model=T42
if errorlevel 5 set model=T42
if errorlevel 4 set model=T60
if errorlevel 3 set model=T42
if errorlevel 2 set model=T60
if errorlevel 1 set model=T60
GOTO ghost

:tool
ghost32.exe
GOTO exit

:netghost
ECHO.
ECHO Please enter your domain:
Set /P domain=
ECHO.
ECHO Please enter your username:
set /p username=
net use T: \\server\currentimage\temp * /USER:%domain%\%username%
if errorlevel 1 GOTO netghostfail
if errorlevel 0 GOTO netghostpass

:netghostpass
ghost32.exe
GOTO exit

:netghostfail
ECHO.
ECHO Your login failed. Please try again
Pause
goto netghost


:wipe
net start dmserver
net start dmadmin
DISKPART /s diskpart.txt
format c: /q /fs:ntfs /v:"" y
GOTO exit

:ghost
ECHO.
ECHO.
ECHO Please confirm your choice
Echo A)Exit
Echo B)Image Drive
ECHO --=====--
ECHO C)Go back to beginning

choice /c:ABC /N

if errorlevel 3 GOTO menu
if errorlevel 2 GOTO image
if errorlevel 1 GOTO exit

:image
ECHO.
ECHO Please enter your domain:
Set /P domain=
ECHO.
ECHO Please enter your username:
set /p username=
ECHO.
ECHO.
REM ECHO Please disregard the foldername below. It is internal use only.
ECHO.
net use S: \\server\currentimage\%model% * /USER:%domain%\%username%
if errorlevel 1 GOTO imagefail
if errorlevel 0 GOTO imagepass
ECHO.

:imagefail
ECHO.
ECHO Your login failed. Please try again
Pause
goto image

:imagepass
ECHO You will now be imaging a computer. Any data on that computer will be destroyed. When you are ready,
PAUSE
ghost32.exe -clone,mode=load,src=S:\CSIimage.gho,dst=1 -sure -quiet -auto -fx
GOTO exit

:makeimage
ECHO Please enter your domain:
Set /P domain=
ECHO.
ECHO Please enter your username:
set /p username=
net use T: \\server\currentimage * /USER:%domain%\%username%
if errorlevel 1 GOTO makeimagefail
if errorlevel 0 GOTO makeimagepass

:makeimagepass
ghost32.exe
GOTO exit

:makeimagefail
ECHO.
ECHO Your login failed. Please try again
Pause
goto makeimage

:exit
exit

Link to comment
Share on other sites

  • 1 month later...

Hi There,

I don't know about your script but I was having the same Workstation service error on my build and have found the culprit. I was loading WinPE 2.0 through VMWare and only had 256mbs of RAM allocated to the session. Once I bumped that up 512mbs, ipso facto presto chango, it worked!

Hope this helps,

Fodder

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...