07-28-2015 02:32 PM
I am trying to figure out how to mount a sharing while the automatically network configuration process is happening during the boot-up process into the SRD recovery environment. I have tried putting net use j: \\server\shareName password /User:domain\user within each if block, and the disc continues to skip the share mounting process. Below is the AutoNetwork.cmd script (found in the BOOT.WIM file, in Windows\Shell\AutoNetwork.cmd), and the changes that I have made (the net use command snippet):
@echo off
:AutoNetwork
call %ShellPath%\FindDrive.cmd ?:\VProRecovery\VProRecovery.net FoundDrive
if not "%FoundDrive%" == "" (
%SystemRoot%\System32\RunDll32.exe %ShellPath%\SreNet.dll,Execute -start -auto %FoundDrive%:\VProRecovery\VProRecovery.net -preferdhcp
net use j: \\server\shareName password /User:domain\user
exit 0
)
call %ShellPath%\FindDrive.cmd ?:\VProRecovery\AutoNetwork.xml FoundDrive
if not "%FoundDrive%" == "" (
%SystemRoot%\System32\RunDll32.exe %ShellPath%\SreNet.dll,Execute -start -auto %FoundDrive%:\VProRecovery\AutoNetwork.xml
net use j: \\server\shareName password /User:domain\user
exit 0
)
call %ShellPath%\FindDrive.cmd ?:\VProRecovery\AutoRestore.xml FoundDrive
if not "%FoundDrive%" == "" (
%SystemRoot%\System32\RunDll32.exe %ShellPath%\SreNet.dll,Execute -start -auto %FoundDrive%:\VProRecovery\AutoRestore.xml
net use j: \\server\shareName password /User:domain\user
exit 0
)
REM Look for AutoNetwork.xml file at Srd root
call FindDrive.cmd ?:\AutoNetwork.xml FoundDrive
if not "%FoundDrive%" == "" (
%SystemRoot%\System32\RunDll32.exe %ShellPath%\SreNet.dll,Execute -start -auto %FoundDrive%:\AutoNetwork.xml
net use j: \\server\shareName password /User:domain\user
exit 0
)
REM Look for AutoNetwork.xml file in Srd Shell location (where FindDrive.cmd is run)
call FindDrive.cmd ?:AutoNetwork.xml FoundDrive
if not "%FoundDrive%" == "" (
%SystemRoot%\System32\RunDll32.exe %ShellPath%\SreNet.dll,Execute -start -auto %FoundDrive%:AutoNetwork.xml
net use j: \\server\shareName password /User:domain\user
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
if not "%FoundDrive%" == "" (
%SystemRoot%\System32\RunDll32.exe %ShellPath%\SreNet.dll,Execute -start -auto %FoundDrive%:\Srd\AutoNetwork.xml
net use j: \\server\shareName password /User:domain\user
exit 0
)
net use j: \\server\shareName password /User:domain\user
exit 0
-----------------------------------------------------------------------------------------------------------------------------
But this does not work. I still have to manually connect to the share each time. Where is the best place to put the net use command within the file AutoNetwork.cmd? Or, is there a way to process custom commands to run after SRD has fully loaded up the GUI?
In addition, how can I tell SRD to automatically accept the EULA?
07-31-2015 03:31 AM
hello,
this is very simple, but not to do over the gui.
You must rename the file C:\Program Files\Symantec\Symantec System Recovery\RecoveryDisk\SreModules\SreNetwork\common\Files\AutoNetwork.xml.disable to AutoNetwork.xml.
Now you edit this file, see screenshot. save this file and create a new recovery boot disk.
regards,
blacksun