Allright, I managed to edit the autonetwork.cmd with the net use command and updated the Boot.wim. I copied the modified Boot.wim on my booting media. Unfortunately the network drive maps never occur while booting.
I have inserted the net use command as shown below:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@echo off
:AutoNetwork
call %ShellPath%\FindDrive.cmd ?:\VProRecovery\VProRecovery.net FoundDrive
net use z: \\server\share password /user:domain\user
if not "%FoundDrive%" == "" (
%SystemRoot%\System32\RunDll32.exe %ShellPath%\SreNet.dll,Execute -start -auto %FoundDrive%:\VProRecovery\VProRecovery.net -preferdhcp
exit 0
)
call %ShellPath%\FindDrive.cmd ?:\VProRecovery\AutoNetwork.xml FoundDrive
net use z: \\server\share password /user:domain\user
if not "%FoundDrive%" == "" (
%SystemRoot%\System32\RunDll32.exe %ShellPath%\SreNet.dll,Execute -start -auto %FoundDrive%:\VProRecovery\AutoNetwork.xml
exit 0
)
call %ShellPath%\FindDrive.cmd ?:\VProRecovery\AutoRestore.xml FoundDrive
net use z: \\server\share password /user:domain\user
if not "%FoundDrive%" == "" (
%SystemRoot%\System32\RunDll32.exe %ShellPath%\SreNet.dll,Execute -start -auto %FoundDrive%:\VProRecovery\AutoRestore.xml
exit 0
)
REM Look for AutoNetwork.xml file at Srd root
call FindDrive.cmd ?:\AutoNetwork.xml FoundDrive
net use z: \\server\share password /user:domain\user
if not "%FoundDrive%" == "" (
%SystemRoot%\System32\RunDll32.exe %ShellPath%\SreNet.dll,Execute -start -auto %FoundDrive%:\AutoNetwork.xml
exit 0
)
REM Look for AutoNetwork.xml file in Srd Shell location (where FindDrive.cmd is run)
call FindDrive.cmd ?:AutoNetwork.xml FoundDrive
net use z: \\server\share password /user:domain\user
if not "%FoundDrive%" == "" (
%SystemRoot%\System32\RunDll32.exe %ShellPath%\SreNet.dll,Execute -start -auto %FoundDrive%:AutoNetwork.xml
exit 0
)
REM If above files are not found in any of drives then look AutoNetwork.xml in Srd folder
call %ShellPath%\FindDrive.cmd ?:\Srd\AutoNetwork.xml FoundDrive
net use z: \\server\share password /user:domain\user
if not "%FoundDrive%" == "" (
%SystemRoot%\System32\RunDll32.exe %ShellPath%\SreNet.dll,Execute -start -auto %FoundDrive%:\Srd\AutoNetwork.xml
exit 0
)
net use z: \\server\share password /user:domain\user
exit 0
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Now maybe I do not understand how this script works, I've inserted my line everywhere the loop could possibly go to my understanding. Also I tryed the script in windows and the drive maps succesfully. But when I insert it into the WinPe environnment everything boots succesfully but the Network maps just never happens. I've tryed a separate script that runs the Net use command manually with the command line and the network drive maps succesfully. It appears that the script is somehow skipping the net use command I added...