How to get standard and error output for a command executed in Ghost start.bat
| Article:HOWTO31342 | | | Created: 2010-09-20 | | | Updated: 2010-10-07 | | | Article URL http://www.symantec.com/docs/HOWTO31342 |
Question/Issue:
Basically, any standard and error outputs regarding Ghost start.bat are not displayed during WinPE boots because "echo off" is set on top of startnet.cmd, which is executed automatically and executes the start.bat during WinPE boots. How do you get logs standard and error outputs if you have additional commands(e.g. "net use") in Ghost start.bat?
Answer:
- Click "Start editing" button
on the page titled "Symantec Ghost Boot Wizard - Review" in the Ghost Boot Wizard
- To get standard and error output for a command,
add ">> x:\ghost\startlog.txt 2>&1" or ">> <a file path> 2>&1" in the start.bat as follows.
NOTE: The file should be a writable file.
--- start.bat ---
set path=%path%;x:\ghost
net use G: //<machinename>/<sharename >/user:<domain\user name> < user password> >> x:\ghost\startlog.txt 2>&1
x:
cd \ghost
rem --- This will create primary OS drive configuration ---
ghost32.exe /setosdrives /blind >> x:\ghost\startlog.txt
start ghost32.exe
---
- Finish the creation of the Ghost boot disk containing the start.bat.
- Start Ghost executable with the Ghost boot disk.
- Quit Ghost executable.
- To check standard and error output, open the file at step 2 on command prompt.
e.g.
x:\ghost> notepad startlog.txt
- Backup the file to persistent storage before WinPE is shutting down,
if it's non-persistent storage file like startlog.txt on RAM disk and if the backup is needed.
|
|
|
|
Article URL http://www.symantec.com/docs/HOWTO31342
Terms of use for this information are found in Legal Notices









Thank you.