Registered member login:
Register Now
Altirigos » Deployment Solution » Imaging - Bootworks/Rdeploy » OK I give up: Altiris Tokens

» Current Poll
Do you leave the Aclient enabled?
YES - 82.50%
66 Votes
NO - 17.50%
14 Votes
Total Votes: 80
You may not vote on this poll.
» Stats
Members: 9,299
Threads: 11,612
Posts: 54,716
Top Poster: Nick (4,977)
Welcome our newest member, Daruis Fok
» Online Users: 37
0 members and 37 guests
No Members online
Most users online at once 294, 06-30-2007 at 01:24 PM.
» February 2010
S M T W T F S
31 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 123456
Reply
Old 02-06-2008, 04:59 PM   #1 (permalink)
 
Status: Altiris Admin
Join Date: 02-05-2008
Location: Indiana
Posts: 33


OK I give up: Altiris Tokens

Alright I have been struggling like crazy to get tokens to work correctly for my hardware independent image. I have the feeling I am simply missing something very easy here.

Running DS 6.8, booting into a windows pe pre-boot environment. I am trying to use this script (I condensed it):


echo Hardware Model number is %#!computer@model_num%
if "%#!computer@model_num%" =="0G5611" goto GX280

REM If we didn't find a match, just exit
goto Exit

:GX280
firm -recurse copy .\drivers\GX280 prod:\drivers
goto Exit

:Exit
exit


It is not working however. echo Hardware Model number is %#!computer@model_num% returns %#!computer@model_num%. I have already spent a few days pouring over this site, google, and any documentation from altiris I can find but in everyone's examples %#!computer@model_num% just works. What am I doing wrong?
Durrok is offline   Reply With Quote
Old 02-06-2008, 05:18 PM   #2 (permalink)
 
jdean's Avatar
 
Status: Super Altiris Admin
Join Date: 02-24-2005
Location: Orange County, California, USA
Posts: 585


Here is a snippet of what we use at my work.

echo %#!computer@prod_name% >> .\Models\%ID%.txt
for /f "tokens=1-5" %%A in (.\Models\%ID%.txt) do (Set Model=%%C)

If %Model% == dc7100 goto dc7100
If %Model% == nc2400(#ABA) goto nc2400
If %Model% == nc6400 goto nc6400
If %Model% == dc7600 goto dc7600
If %Model% == nc6220 goto nc6220
If %Model% == dc7700p goto dc7700p
If %Model% == nc6220 goto nc6220
If %Model% == dc7700 goto dc7700

Hope that helps.
Quote:
Originally Posted by Durrok View Post
Alright I have been struggling like crazy to get tokens to work correctly for my hardware independent image. I have the feeling I am simply missing something very easy here.

Running DS 6.8, booting into a windows pe pre-boot environment. I am trying to use this script (I condensed it):


echo Hardware Model number is %#!computer@model_num%
if "%#!computer@model_num%" =="0G5611" goto GX280

REM If we didn't find a match, just exit
goto Exit

:GX280
firm -recurse copy .\drivers\GX280 prod:\drivers
goto Exit

:Exit
exit


It is not working however. echo Hardware Model number is %#!computer@model_num% returns %#!computer@model_num%. I have already spent a few days pouring over this site, google, and any documentation from altiris I can find but in everyone's examples %#!computer@model_num% just works. What am I doing wrong?
__________________
IT Factotum * Altiris Addict * Wise Monger * VBScript Zealot

Jereme Dean
Orange County, CA
jdean33442@gmail.com
jdean is offline   Reply With Quote
Old 02-06-2008, 05:33 PM   #3 (permalink)
 
Status: Altiris Admin
Join Date: 02-05-2008
Location: Indiana
Posts: 33


echo %#!computer@prod_name% >> .\Models\%ID%.txt

I tried:

echo %#!computer@prod_name% >> G:\test.txt

Created test.txt with %#!computer@prod_name% inside of it.
Durrok is offline   Reply With Quote
Old 02-06-2008, 05:47 PM   #4 (permalink)
 
Status: Altiris Admin
Join Date: 02-05-2008
Location: Indiana
Posts: 33


Heh, alright I figured it out. Just make sure you are running the script through altiris and it will substitute the right information in for the token you are using. Going to the command line and running it when in the pre-boot environment will not work.

Sigh.. feel like an idiot right now.
Durrok is offline   Reply With Quote
Old 02-06-2008, 08:03 PM   #5 (permalink)
 
jdean's Avatar
 
Status: Super Altiris Admin
Join Date: 02-24-2005
Location: Orange County, California, USA
Posts: 585


Ah yes, you do have to run it as an Altiris job. These are tokens only utilized by Altiris and are different then the system variables like %windir%

It is a learning process. Chalk it up and move on. No need to feel stupid.

Quote:
Originally Posted by Durrok View Post
Heh, alright I figured it out. Just make sure you are running the script through altiris and it will substitute the right information in for the token you are using. Going to the command line and running it when in the pre-boot environment will not work.

Sigh.. feel like an idiot right now.
__________________
IT Factotum * Altiris Addict * Wise Monger * VBScript Zealot

Jereme Dean
Orange County, CA
jdean33442@gmail.com
jdean is offline   Reply With Quote
Old 05-09-2008, 11:40 AM   #6 (permalink)
 
Status: Junior Altiris Admin
Join Date: 01-31-2008
Location: North carolina
Posts: 9


deploy syspreped image with token script

I'm having a problem. I have a sypreped image to depoly. In my distribute image job I have depoly image listed first and second the token script. In the depoly image part I have Automatically perform configuration task after completing this imaging task unchecked and Defualt Automation (auto-select) selected in Automation pre-boot environment. I am using winpe as my bootworks automation partition.



I boot into bootworks automation to deploy the image, it gets deployed but the script never after works. The PC reboots and sysprep runs.

The messaage I get in the depoly image job is fail to boot to automation.

What am I Doing wrong.

Jim
Jamesc_NC is offline   Reply With Quote
Old 05-09-2008, 12:28 PM   #7 (permalink)
 
Status: Super Altiris Admin
Join Date: 11-09-2006
Location: London
Posts: 655


Quote:
Originally Posted by Jamesc_NC View Post
I'm having a problem. I have a sypreped image to depoly. In my distribute image job I have depoly image listed first and second the token script. In the depoly image part I have Automatically perform configuration task after completing this imaging task unchecked and Defualt Automation (auto-select) selected in Automation pre-boot environment. I am using winpe as my bootworks automation partition.



I boot into bootworks automation to deploy the image, it gets deployed but the script never after works. The PC reboots and sysprep runs.

The messaage I get in the depoly image job is fail to boot to automation.

What am I Doing wrong.

Jim
First off, are the temporary token replaced files getting created on the DS?
If so, REM out any k/b and screen locks and put a pause statement in at the end of the token replace and firm copy script. Then you can see if your script is copying down the right token replaced file.
andykn is offline   Reply With Quote
Old 05-09-2008, 01:27 PM   #8 (permalink)
 
Status: Junior Altiris Admin
Join Date: 01-31-2008
Location: North carolina
Posts: 9


Hi

Thank you for the reply.

I am running the replace token script in the same job as the deploy image how do i know if the files are being created on the DS. I am running the script in DS after my depoly image .

JIm
Jamesc_NC is offline   Reply With Quote
Old 05-12-2008, 08:01 AM   #9 (permalink)
 
Status: Super Altiris Admin
Join Date: 11-09-2006
Location: London
Posts: 655


Quote:
Originally Posted by Jamesc_NC View Post
Hi

Thank you for the reply.

I am running the replace token script in the same job as the deploy image how do i know if the files are being created on the DS. I am running the script in DS after my depoly image .

JIm
The command to do the token replacement should have, as its second argument, a destination for the file after the tokens have been replaced. Look there:

Code:
REM ReplaceTokens .\temp\sysprep.inf .\temp\%COMPNAME%.txt

In this case its in the temp directory in the express share.

Don't forget that the token replace script should start with REM, be set to run on the target machine, even though it actually runs on the server and that the tokens in it are case sensitive (usually all uppercase). Page 232 of the DS 6.9 manual gaive some good guidance. The command itself may be case sensitive, I'm not sure.
andykn is offline   Reply With Quote
Old 05-12-2008, 10:14 AM   #10 (permalink)
 
Status: Junior Altiris Admin
Join Date: 01-31-2008
Location: North carolina
Posts: 9


Thank you for the assistance.

The issue I,m having though is this: the image gets deployed through winpe bootworks. Afer the image is deployed the pc never boots back into bootworks to run the script. It boots directly into windows xp and sysprep runs. So I don,t think my replace token script ever runs.. How do I set up the deploy image job so that after the image is depolyed the pc will boot back into bootworks automation and run the replace token file script??
Jamesc_NC is offline   Reply With Quote
Old 05-12-2008, 10:44 AM   #11 (permalink)
 
Status: Junior Altiris Admin
Join Date: 01-31-2008
Location: North carolina
Posts: 9


for the replace token script, Do I run the script on the client computer or locally on the deployment server (with run when the aget is connected is checked)??

Sorry I'm new to this hardware independed imaging stuff.
JIm
Jamesc_NC is offline   Reply With Quote
Old 07-07-2008, 01:37 PM   #12 (permalink)
 
Status: Junior Altiris Admin
Join Date: 05-12-2008
Location: Texas
Posts: 7


Was there an answer to this?
dabomb311 is offline   Reply With Quote
Old 07-07-2008, 02:35 PM   #13 (permalink)
 
Status: Junior Altiris Admin
Join Date: 01-31-2008
Location: North carolina
Posts: 9


Yes there was an answer. It was to run it from the server.

Jim
Jamesc_NC is offline   Reply With Quote
Old 07-07-2008, 02:57 PM   #14 (permalink)
 
Socrates's Avatar
 
Status: Junior Altiris Admin
Join Date: 05-02-2007
Location: Phoenix, AZ
Age: 31
Posts: 13


Another thing to look at is your image job. Near the bottom, right above choosing the type of automation, is a checkbox: Automatically perform Configuration Task, if that is checked it won't care that there is a script that needs to run second, it'll boot into Windows to perform that configuration.

So make sure it's unchecked and the script should run while still within the automation after imaging.
__________________
I teach you the Overman. Man is something that is to be
surpassed. What have ye done to surpass man?
Socrates is offline   Reply With Quote
Old 07-07-2008, 03:53 PM   #15 (permalink)
 
Status: Junior Altiris Admin
Join Date: 05-12-2008
Location: Texas
Posts: 7


I apologize now, I am fairly new to this.

I have the job setup with 2 tasks.
1. Distribute Disk Image, "Automatically perform" is unchecked
2. Run Script
"REM Token Replacement / Driver Injection
echo Hardware Model number is %#!computer@model_num%
F:\RDeploy\Windows\FIRM -recurse Copy "F:\drivers\%#computer@model_num%\*" "prod:\drivers"
"
script operating system = windows
Script Run Location: Locally on the DS
Run when the agent is collected

The script is not running, i am assuming because no files are being copied, and i do not ever see the echo from above.

Any ideas?
dabomb311 is offline   Reply With Quote
Old 07-07-2008, 04:51 PM   #16 (permalink)
 
Socrates's Avatar
 
Status: Junior Altiris Admin
Join Date: 05-02-2007
Location: Phoenix, AZ
Age: 31
Posts: 13


On the second page of the script job, try running the script from the local computer and make sure the Client Run environment is set for Automation. That's how mine runs post-image and it's pretty flawless.
__________________
I teach you the Overman. Man is something that is to be
surpassed. What have ye done to surpass man?

Last edited by Socrates; 07-07-2008 at 04:54 PM..
Socrates is offline   Reply With Quote
Old 07-08-2008, 06:02 AM   #17 (permalink)
 
Status: Super Altiris Admin
Join Date: 11-09-2006
Location: London
Posts: 655


Quote:
Originally Posted by dabomb311 View Post
I apologize now, I am fairly new to this.

I have the job setup with 2 tasks.
1. Distribute Disk Image, "Automatically perform" is unchecked
2. Run Script
"REM Token Replacement / Driver Injection
echo Hardware Model number is %#!computer@model_num%
F:\RDeploy\Windows\FIRM -recurse Copy "F:\drivers\%#computer@model_num%\*" "prod:\drivers"
"
script operating system = windows
Script Run Location: Locally on the DS
Run when the agent is collected

The script is not running, i am assuming because no files are being copied, and i do not ever see the echo from above.

Any ideas?
Put a pause at the end of that script to see if it does run.

I don't think you can put a DS token like %#computer@model_num% as a command line variable.

You would have to run it as a batch file and do the Token replacement on the batch file first.

Appendix B of the DS 6.9 manual has a much better section explaining how tokens work.
andykn is offline   Reply With Quote
Old 07-28-2008, 02:44 AM   #18 (permalink)
 
Status: Junior Altiris Admin
Join Date: 11-05-2005
Location: Sweden
Posts: 25


DS variable should work

We are using DS variables in DS-script, but with xcopy insted of firm, we did not get firm to work previus, probably because we did the "rem BOOTWORK UNLOAD" before the firm copy commands.

This works fine for us:
xcopy %undir%\Drivers\%#!computer@model_num%\*.* %filedir%\drivers\ /s /e /y > nul
shogo is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -4. The time now is 07:39 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
vB.Sponsors
Altirigos