Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Run a bat file from the ghost console

Created: 16 Feb 2010 | 4 comments

Hey everyone,

I need to run a bat file that is located locally from the ghost console. It is located in the ghost\incoming folder

I have made a task with execute command, and written the path of the bat file c:\program files\symantec\ghost\incoming\start.bat , but it only opens a small cmd prompt very quickly and closes again. If i open it manually from the client everything works.

anyone know how to solve this ?
 

Discussion Filed Under:

Comments 4 CommentsJump to latest comment

gis-cbeattie's picture

What I usually do is make a file share available to the client PCs, and then put the batch file there.  Then, if I update the batch file, all the task members will automatically run the new batch file without having to redistribute it to all the clients.

In your case, you might try enclosing your path in double quotes like so:

"c:\program files\symantec\ghost\incoming\start.bat"

"Program Files" contains a space and that'll throw things off if it's not enclosed.  That space won't affect you if you are already in the directory when you run the batch file by hand.

nicwic's picture

 funny thing is .. i've tried both its a pretty simple script.. but it jsut doesn't run the bat file.

@ECHO OFF
 
REM Sætter pub burger til at logge automatisk på
regedit /S "C:\Programmer\Symantec\Ghost\incoming\autologin.reg"
 
ECHO Installerer SteadyState
 
REM Silent installation af Steadystate
MSIEXEC /I C:\programmer\symantec\ghost\incoming\SteadyState.msi /qb
 
 
REM Starter rettigsheds opsætning for pub bruger med steadystate.
c:
cd "C:\Programmer\Symantec\Ghost\INCOMING\"
xcacls.exe "c:\programmer\windows steadystate\*.*" /G administrator:F /D pub /y
 
REM Renser SteadyState Installationen og alle filer som
REM indeholder sensitive konto informationer (Som passwords).
:DEL /Q C:\programmer\symantec\ghost\incoming\*.MSI 
:DEL /Q C:\programmer\symantec\ghost\incoming\autologin.reg
:DEL /Q C:\programmer\symantec\ghost\incoming\Xcalcs.exe
 
ECHO Starter Windows Disk Protection
 
REM Windows disk protection installationen starter
"C:\Programmer\Windows SteadyState\SCTUI.exe" /EnableWDPAndReboot
when i run it nothing happens .. task just says its completed..  right now the bat file is in the c:\programmer\symantec\ghost\incoming\ folder... tried to execute it with and without quotes.
 
nicwic's picture

as a side note... All the files are copied to the client perfectly after the clone.

stormtrooper77's picture

I have a join script that I need to run after the imaging process.