» Site Navigation |
|
|
» Stats |
Members: 10,094
Threads: 12,231
Posts: 57,325
Top Poster: Nick (4,991)
|
| Welcome our newest member, hussamdabit |
» September 2010 |
| S |
M |
T |
W |
T |
F |
S |
| 29 | 30 | 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
|
29
|
30
| 1 | 2 |
|
 |
02-05-2009, 01:34 PM
|
#1 (permalink)
|
Status: Junior Altiris Admin
Join Date: 09-27-2006
Location: West Point, NY
Posts: 6
|
Substituting "Location" values
Hello, everyone! My thanks to Nick for straightening out my account issues.
I was researching how to write a job that <pushes> 'Location' values (found under computer properties) to a computer already in the database, rather than pull (using token variables). Specifically, I would like to push an entry like "Personnel" to %DEPT% or "Library" to %SITE% through a DS job.
My idea would be to flex the 'Location' information on demand, since there's constant internal shuffling and I frequently have to load new software based on duty assignment. If I was able to set 'Location' data easily, I could use condition codes to automate whether to run a given installation job or not. I do <NOT> want to prompt the users for 'Location' data, and I haven't found a way to use the Configure interface to set location information (only "General" and "User Account" settings would be similar).
I can see the elements I want to access in SQL using the following sort of statement, (but am very hesitant to muck about with the records directly):
USE eXpress
SELECT [eXpress].[dbo].[location].[dept], [eXpress].[dbo].[location].[site]
FROM [eXpress].[dbo].[location]
where [eXpress].[dbo].[location].[dept] LIKE 'Admin%'
I believe I found the preferred method using the running of this script:
REM Prepare tokenized computer configuration to be copied
REM ReplaceTokens .\temp\tokenized.cfg .\temp\%ID%.cfg
However, looking at the "tokenized.cfg", I can't identify where the correct syntax or placement of the location information; the elements are only those available through the regular Configure method.
My site uses Deployment Solution 6.8 and HelpDesk, but nothing else from Altiris. I suspect that this is relatively easy if you have Inventory or even Notification Server, but we won't be purchasing either.
Any suggestions?
Respectfully, jmervyn.
P.S. I neglected to mention that I saw something similar here already labeled "Import token into registry", but I need pretty much the opposite result of what that individual required.
Last edited by jmervyn; 02-05-2009 at 01:43 PM..
|
|
|
02-24-2009, 08:02 AM
|
#2 (permalink)
|
Status: Junior Altiris Admin
Join Date: 09-27-2006
Location: West Point, NY
Posts: 6
|
Anyone? 
|
|
|
03-06-2009, 12:58 PM
|
#4 (permalink)
|
Status: Junior Altiris Admin
Join Date: 09-27-2006
Location: West Point, NY
Posts: 6
|
Thanks for the reply! That's definitely one piece of the puzzle (execution of a stored procedure from a DS job).
Unfortunately, not only do I get this error:
Server: Msg 2812, Level 16, State 13, Line 1
Could not find stored procedure 'wc_upd_computer_group'.
- but also, that's only going to apply to computer groups. I need to find wherever the stored procedures for the "department" might be. They've got to be somewhere out there, since the user can be prompted to enter them.
Don't they?
|
|
|
03-06-2009, 02:06 PM
|
#5 (permalink)
|
Status: Junior Altiris Admin
Join Date: 09-27-2006
Location: West Point, NY
Posts: 6
|
I found the correct stored procedure, labeled dbo.ins_location
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
create procedure ins_location
@computer_id int,
@site varchar( 128 ) = null,
@dept varchar( 128 ) = null,
@mailstop varchar( 128 ) = null,
@contact varchar( 128 ) = null,
@email varchar( 128 ) = null,
@phone varchar( 128 ) = null
as
begin transaction
delete from location where computer_id = @computer_id
insert into location
( computer_id, site, dept, mailstop, contact, email, phone )
values
( @computer_id, @site, @dept, @mailstop, @contact, @email, @phone )
if (@@error != 0)
begin
rollback transaction
end
else
begin
commit transaction
end
return @computer_id
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
|
|
|
 |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|