myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


Adding a custom step to Task Sequence

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> System Center Products >> Microsoft Deployment (BDD) >> Adding a custom step to Task Sequence Page: [1]
Login
Message << Older Topic   Newer Topic >>
Adding a custom step to Task Sequence - 6/2/2008 10:51:15 AM   
old_chicago

 

Posts: 65
Score: 0
Joined: 2/21/2008
Status: offline
I have created a step in Task Sequencer to perofrm a scripted McAfee AV installation.  I'm executing a .cmd file that runs a script located c:\scripts\McAfee-VirusScan.vbs.  I've tested this with a custom task sequence that I am running from within the local O.S.  Only to see the Task Sequence window appears and disappears immediately.

If I run the script manually from within the O.S., it works w/o any issues. 

For the command line in Task Sequencer, I am using the following:

CMD.EXE /C %SCRIPTROOT%\Z-AVinstall_Image.cmd

I've also tried executing the step by using the install script:

cscript.exe %SCRIPTROOT%\Z-McAfee-VirusScan-8-5i-R1.vbs

Again, the Task Sequence window appears for a slight moment, then disappears. 

At this point, I can't even get the script to run.  Any ideas?

OC


Post #: 1
RE: Adding a custom step to Task Sequence - 6/2/2008 1:01:44 PM   
jagustin

 

Posts: 26
Score: 0
Joined: 5/7/2008
Status: offline
Have you had a chance to take a look at the logs to see if it says anything there? I don't think it's a syntax error as it all looks good from what you've posted.

Can you post what's inside the your .cmd file? Also, how come you're using cmd instead of bat?

You've also updated your deployment points right?

Joel

(in reply to old_chicago)
Post #: 2
RE: Adding a custom step to Task Sequence - 6/2/2008 1:53:13 PM   
old_chicago

 

Posts: 65
Score: 0
Joined: 2/21/2008
Status: offline
The cmd file is pretty simple - c:\scripts\McAfee-VirusScan-8-5i-R1.vbs
Which executes the above script to perform a silent/unattended installation of McAfee.  I copy the entire McAfee source directory to the c:\scripts directory on my image.  It has all the required files to perform this operation. 

I guess, I've never thought about your question regarding using .cmd instead of .bat.  Yes, deployment points are updated.

O.C.

(in reply to jagustin)
Post #: 3
RE: Adding a custom step to Task Sequence - 6/2/2008 2:16:43 PM   
jagustin

 

Posts: 26
Score: 0
Joined: 5/7/2008
Status: offline
the vbs scripts points the necessary setup files also located in the C:\Scripts directory right? (sorry for asking basic questions, just getting a better idea of the environment)
ie: in the vbs script:
C:\scripts\mcafee\setup.exe
before it deletes the scripts folder (after the sequence is run) check to see if the McAfee set up files located there? (C:\scripts)

on another side note, I have all my applications added as applications to the workbench and I just add an "install application" step into the TS.

For example, for installing VNC, I run a bat file that points to the exe to installs everything with the necessary switches
so the properties of the VNC application the "Quiet install command:" is RealVNC4.bat
then I add the RealVNC applition as a step in the TS.
Doing it this way, I have all the necessary setup files in the Applications directory.

See if that goes.

(in reply to old_chicago)
Post #: 4
RE: Adding a custom step to Task Sequence - 6/3/2008 10:16:18 AM   
old_chicago

 

Posts: 65
Score: 0
Joined: 2/21/2008
Status: offline
I'm still not having any luck.  Let's say I change my script from a .cmd to a .bat file.  What is the command line I need to use to call the script?  Will cscript.exe work?

OC

(in reply to jagustin)
Post #: 5
RE: Adding a custom step to Task Sequence - 6/3/2008 10:40:32 AM   
old_chicago

 

Posts: 65
Score: 0
Joined: 2/21/2008
Status: offline
Ok, I'm a step closer.  I have my .cmd file working from within the local O.S., but it only works when I execute it from c:\scripts directory.  Any ideas on how to get this to work via task sequencer?

(in reply to old_chicago)
Post #: 6
RE: Adding a custom step to Task Sequence - 6/3/2008 1:15:29 PM   
jagustin

 

Posts: 26
Score: 0
Joined: 5/7/2008
Status: offline
Here's what I do/did with my McAfee install:
1) from within BDD, add a new application and point it to your McAfee source files
2) Copy your custom bat/cmd script to the newly created McAfee folder in your Applications directory (Build$\Applications\McAfee...)
3) When prompted for "Quiet install command line parameters" put in the name of your custom bat/cmd script
4) Now add the application to your Task sequence in the Sate Restore phase

Let me know how that goes.

note, when calling a bat/cmd script do not use cscript.exe -- that's only for calling vbs/wsf scripts from the command line. simply just use the name of the bat/cmd script to run. ie:
when running a VBS script, command line is:  cscript.exe "C:\temp\test.vbs"
when running a BAT script, command line is: C:\temp\test.bat

(in reply to old_chicago)
Post #: 7
RE: Adding a custom step to Task Sequence - 6/5/2008 5:05:49 PM   
old_chicago

 

Posts: 65
Score: 0
Joined: 2/21/2008
Status: offline
I tried this and it is yet not working. 

I created a custom task to run the following command:

C:\scripts\AVInstall.bat  The .bat file is simple: c:\scripts\mcafee-virusscan-8-5i.R1.vbs
The script runs a silent install for McAfee.  All of the source files are located on the master image @ c:\scripts. 


Avinstall.bat

(in reply to jagustin)
Post #: 8
RE: Adding a custom step to Task Sequence - 6/5/2008 6:08:33 PM   
jagustin

 

Posts: 26
Score: 0
Joined: 5/7/2008
Status: offline
What do your logs say at the step? I'm curious to why you have the source files on the image itself instead of on the server as an application?

In the custom task don't run anything from C:\scripts, run it from %SCRIPTROOT% instead.
Also, the source files should be in the Applications directory in your network share, not locally.

IE: TS calls the McAfee install step which runs:  "%SCRIPTROOT%\Avinstall.BAT"   <-- this points to the script directory on the network share
inside the Avinstall.bat is:  "\\<Servername>\<Share>\Applications\McAfeeAV\setup.exe" /passive

The problem I think you're having is it's not finding all the necessary files when it looks at C:\scripts. All your scripts and source files should be on stored on the share.


(in reply to old_chicago)
Post #: 9
Page:   [1]
All Forums >> [Management Products] >> System Center Products >> Microsoft Deployment (BDD) >> Adding a custom step to Task Sequence Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.782