Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Run Script Problem

Updated: 22 May 2010 | 12 comments
jefff's picture
0 0 Votes
Login to vote

I now have a problem where the 'Run Script' has a character limitation. The script determines what kind of computer it is and downloads the correct drivers and copies the correct sysprep folder.







The script works fine except that I can't add any more computers to the script. Here is what I have in the script.











EXAMPLE







if "%#!computer@prod_name%" =="optiplex 745" goto O745



if "%#!computer@prod_name%" =="latitude d430" goto D430



if "%#!computer@prod_name%" =="optiplex gx620" goto O620



if "%#!computer@prod_name%" =="optiplex gx280" goto O280



if "%#!computer@prod_name%" =="latitude d620" goto D620



if "%#!computer@prod_name%" =="latitude d630" goto d630



if "%#!computer@prod_name%" =="latitude d820" goto D820



if "%#!computer@prod_name%" =="latitude d810" goto D810



if "%#!computer@prod_name%" =="latitude d610" goto D610



if "%#!computer@prod_name%" =="latitude e6400" goto E6400



if "%#!computer@prod_name%" =="latitude e6500" goto E6500



if "%#!computer@prod_name%" =="latitude e4300" goto E4300



if "%#!computer@prod_name%" =="optiplex gx760" goto O760







goto Exit







745



firmwin -recurse copy .\drivers\O745 prod:\drivers



rem replacetokens .\drivers\O745\sysprep.inf .\temp\o745\%ID%.inf



firmwin -recurse copy .\temp\o745\%ID%.inf PROD:sysprep\sysprep.inf



goto Exit



430



firmwin -recurse copy .\drivers\D430 prod:\drivers



rem replacetokens .\drivers\D430\sysprep.inf .\temp\d430\%ID%.inf



firmwin -recurse copy .\temp\d430\%ID%.inf PROD:sysprep\sysprep.inf



goto Exit







etc.







I copied the script into a batch file but the rem replacetokens does not work properly. I get an error message saying "The file could not be found". I spoke with Altiris and they think it is a bug.







Does anybody have suggestions?

Comments

bhawver's picture
20
Dec
2008
1 Vote +1
Login to vote

If by character limitation, you are talking about the size of the script, you are better off pointing the "Run Script" to a file in the express share folder structure.

Brian Hawver
Systems Engineer
Yaskawa America, Inc.

Connect Etiquette: "Mark as Solution" those posts which resolve your problem, and give a thumbs up to useful comments, articles and downloads.

jharings's picture
21
Dec
2008
1 Vote +1
Login to vote

I'm not sure how they came to the determination that is was a bug. If you remove the last computer type the issue doesn't return? I see you have listed firmwin, does that mean you are using WinPE?

Jim Harings
HP Enterprise Services
1st Rule of Connect Club: Mark the post that helped you the most as a 'solution'. 2nd Rule of Connect Club:You must talk about Connect club.

jefff's picture
05
Jan
2009
1 Vote +1
Login to vote

Hi jharings



According to Altiris there is a character limitation in the 'Run Script'. Right now I'm trying to figure out another way to add more computers to the script. Copying the script into a batch file under the express share does not work properly using the 'REM Replacetokens'.



I am using WinPe

bhawver's picture
05
Jan
2009
1 Vote +1
Login to vote

Jeff, see my earlier post. That is what I have had to do to get past the same problem. Just make sure the file is saved as a BAT or CMD file for WinPE. Instead of "Run this script", select "run the script from file" and point it to your BAT or CMD file.

Brian Hawver
Systems Engineer
Yaskawa America, Inc.

Connect Etiquette: "Mark as Solution" those posts which resolve your problem, and give a thumbs up to useful comments, articles and downloads.

bhawver's picture
05
Jan
2009
1 Vote +1
Login to vote

Also, be sure your slashes are the correct ones (/ vs. \).

Brian Hawver
Systems Engineer
Yaskawa America, Inc.

Connect Etiquette: "Mark as Solution" those posts which resolve your problem, and give a thumbs up to useful comments, articles and downloads.

jefff's picture
05
Jan
2009
1 Vote +1
Login to vote

Are you using REM Replacetokens in your batch file?

bhawver's picture
05
Jan
2009
1 Vote +1
Login to vote

I don't use DOS or WinPE (too slow either during boot process or imaging process), have found that Linux is my preferred way of doing this. I'd be more than happy to share this script with you if you would like. I haven't had to really use the tokens feature very much as the script seems to handle everything that I need. As a default, we have the machines renamed after imaging to the service tag (serial number) and the technician will then rename it to the appropriate name afterwards.

Brian Hawver
Systems Engineer
Yaskawa America, Inc.

Connect Etiquette: "Mark as Solution" those posts which resolve your problem, and give a thumbs up to useful comments, articles and downloads.

jefff's picture
05
Jan
2009
1 Vote +1
Login to vote

If you don't mind I would like to take a look at the script

bhawver's picture
05
Jan
2009
1 Vote +1
Login to vote

It should be attached in TXT format. linuxhiiscript.txt is my linux script. hii2script.txt is my old DOS script.

Brian Hawver
Systems Engineer
Yaskawa America, Inc.

Connect Etiquette: "Mark as Solution" those posts which resolve your problem, and give a thumbs up to useful comments, articles and downloads.

Timanator's picture
27
Aug
2009
1 Vote +1
Login to vote

Was there ever a solution for

Was there ever a solution for this issue?

Timanator's picture
27
Aug
2009
1 Vote -1
Login to vote

Tagged

Tagged

bhawver's picture
28
Aug
2009
1 Vote +1
Login to vote

Increased Problems

The more new equipment I add to my scripts, I am seeing this more and more.  The way I worked around it was to shorten the scripts by using conditions.  So now, instead of having every possible piece of equipment in one script, I have broken down the full HII script into conditioned jobs.

Unfortunately, this means more administration if I ever need to change my imaging process, I now have to modify each of the conditioned jobs.

Brian Hawver
Systems Engineer
Yaskawa America, Inc.

Connect Etiquette: "Mark as Solution" those posts which resolve your problem, and give a thumbs up to useful comments, articles and downloads.