Video Screencast Help
Search Video Help Close Back
to help
Not able to make it to Vision this year? Get a sampling in the Best of Vision on Demand group.

Executing batch file.

Created: 13 Jul 2010 | 7 comments
tagyii's picture
0 0 Votes
Login to vote

I am having a problem executing a batch file using DS 6.9 SP3.

What I have is a batch file that is in the c:\temp\cleanwipe\cleanwipe.bat directory.

I am trying to send a script that will cause this to run.

I had this working after about 12 hours of researching the web and someone deleted the job.

I am unable to find out the command that actually worked.

I am running this with administrator creds on the workstations.

I know the command was something like
**************
ECHO OFF
c:
cd\temp
cd\cleanwipe
cleanwipe.bat
Echo batch file completed.
***************
This is not working.

Can anyone tell me what they use to execute a batch file that they have placed on the clients local drive?

Comments

dfrancis's picture
13
Jul
2010
0 Votes 0
Login to vote

cd command

Your second cd command has the backslash in it, so it's trying to get you to C:\cleanwipe.

You can either use:
cd\temp
cd cleanwipe
cleanwipe.bat

or:
cd\temp\cleanwipe
cleanwipe.bat

or, depending on how your batch file is constructed:
C:\temp\cleanwipe\cleanwipe.bat

--Dave

If a forum post solves your problem, please flag it as a solution. If you like an article, blog post or download vote it up.

tagyii's picture
13
Jul
2010
0 Votes 0
Login to vote

That does not work

That does not work either.

even if the batch file is a simple as

dir
pause:

It does not display the command window.

I am logged on to the machine with the same creds that I am pushing it with.

Are you able to create a batch file in this directory and get it to pull up the window on the client machine?

Phyrant's picture
13
Jul
2010
0 Votes 0
Login to vote

Do you have the script set to

Do you have the script set to run minimized or hidden?

tagyii's picture
13
Jul
2010
0 Votes 0
Login to vote

minimized

minimized

Phyrant's picture
13
Jul
2010
0 Votes 0
Login to vote

If its minimized then you

If its minimized then you won't see a window. The window will be minimized to the taskbar. Try setting it to normal.

tagyii's picture
14
Jul
2010
0 Votes 0
Login to vote

Its not minimizing it to the

Its not minimizing it to the task bar. Setting at normal does not pop it up either.

dfrancis's picture
14
Jul
2010
0 Votes 0
Login to vote

Check the other settings

Does your batch file require any sort of user intervention?  If so, why not run it as the local system account?

Verify that the "Choose the script operating system" is set to Windows on the first screen, script run location is On the client computer, Client run environment is Production.  What if you run it in the default security context (local system account)?  Also, what status do you get when you try to run the script?

I have a Silverlight 4 install job that does something very similar.

The job consists of three tasks:  Run Script, Copy File To, and Run Script

The first Run Script task is running and msiexec uninstall for the previous version of Silverlight as local system account.  The Copy File To task is copying the necessary install files to the Windows\Temp folder using our Altiris service account credentials, and the last Run Script task is running msiexec to install Silverlight as the local system account.  No problems over here doing that.

--Dave

If a forum post solves your problem, please flag it as a solution. If you like an article, blog post or download vote it up.