Deployment Solution

 View Only
Expand all | Collapse all

Run Script Problem

  • 1.  Run Script Problem

    Posted Dec 19, 2008 09:24 AM
    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?

    Attachment(s)

    txt
    hii2script.txt   9 KB 1 version
    txt
    linuxhiiscript.txt   19 KB 1 version


  • 2.  RE: Run Script Problem

    Posted Dec 20, 2008 10:18 AM
    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.


  • 3.  RE: Run Script Problem

    Posted Dec 22, 2008 02:00 AM
    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?


  • 4.  RE: Run Script Problem

    Posted Jan 05, 2009 03:42 AM
    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


  • 5.  RE: Run Script Problem

    Posted Jan 05, 2009 04:02 AM
    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.


  • 6.  RE: Run Script Problem

    Posted Jan 05, 2009 04:03 AM
    Also, be sure your slashes are the correct ones (/ vs. \).


  • 7.  RE: Run Script Problem

    Posted Jan 05, 2009 05:31 AM
    Are you using REM Replacetokens in your batch file?


  • 8.  RE: Run Script Problem

    Posted Jan 05, 2009 06:15 AM
    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.


  • 9.  RE: Run Script Problem

    Posted Jan 05, 2009 08:37 AM
    If you don't mind I would like to take a look at the script


  • 10.  RE: Run Script Problem

    Posted Jan 05, 2009 08:44 AM
    It should be attached in TXT format. linuxhiiscript.txt is my linux script. hii2script.txt is my old DOS script.


  • 11.  RE: Run Script Problem

    Posted Aug 27, 2009 05:25 PM
    Was there ever a solution for this issue?


  • 12.  RE: Run Script Problem

    Posted Aug 27, 2009 05:25 PM
    Tagged


  • 13.  RE: Run Script Problem

    Posted Aug 28, 2009 08:13 AM
    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.