Page 1 of 1 1
Topic Options
#204262 - 12/02/10 11:55 AM Computer OU mixing up with PC name
HVL Offline
Just in Town

Registered: 10/03/10
Posts: 1
Loc: Netherlands
We use Kixtart 4.6 and I stumbled on a issue (also wit older version)
We want to assign a printer based on computermembership of a certain OU.
One of the OU's is called 035, which refers to a classroom number.
The one with problems is OU 241, another classroom
Now with two PC's who both have the 035 numbers in their PCname (ie. PC0355 and PC0357) get the printer which is assigned to classroom (OU) 035, while they should have gotten another printer.
This is the script we use, hopefully someone sees what is the problem.
Part of the code and Select statement
;Find computerOU

$objSysInfo = CreateObject("ADSystemInfo") 
$strComputerDN = $objSysInfo.computerName 
$struserDN = $objSysInfo.UserName 



;Assign printer based on computerOU

CASE INSTR($strComputerDN,"035")
	"PC staat in 0.35"+@CRLF
	" "+@CRLF

#204273 - 12/02/10 03:58 PM Re: Computer OU mixing up with PC name [Re: HVL]
Allen Moderator Offline
KiX Supporter

Registered: 03/04/19
Posts: 4252
Loc: USA

I think you are going to need to explain yourself a little better and provide more of your script, assuming there is more. Otherwise you are going to be getting guesses.

If you are using Kix 4.60, I suggest moving to 4.62.

#204277 - 12/02/10 07:55 PM Re: Computer OU mixing up with PC name [Re: Allen]
ShaneEP Moderator Offline
MM club member

Registered: 02/11/29
Posts: 1988
Loc: Tulsa, OK
Yeah, this code is not complete, there is missing SELECT / ENDSELECT for starters.
#204278 - 12/02/11 02:53 PM Re: Computer OU mixing up with PC name [Re: ShaneEP]
Les Offline
KiX Master

Registered: 01/06/11
Posts: 12734
I use Howard's InContainer() UDF.
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Page 1 of 1 1

Moderator:  Jochen, Allen, Radimus, Chris S., Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 131 anonymous users online.
Newest Members
OKCPCS, mprell, Dad24Lads, Cutebear, kstieers
17434 Registered Users

Generated in 0.028 seconds in which 0.01 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google: