Page 1 of 1 1
Topic Options
#159615 - 2006-03-22 02:58 PM Using Active Directory Security groups in a script
rhamersley Offline
Fresh Scripter

Registered: 2005-11-09
Posts: 15
Loc: Fort Lauderdale, FL
I created a Active Directory security group called "AllKixInstallCallTracking" and added members to this group. When I run the script it bypasses this part of the script and does not run what is shown below. But if I take out the (If InGroup) the script that installs the call tracking software runs. Anyone else has experienced this??

If InGroup ("AllKixInstallCallTracking")
? "Installing Call Tracking Software"
If NOT ReadValue('HKEY_CURRENT_USER\SOFTWARE\RunOnce','cal2')
? "regvalue does not exist" ?
sleep 5
SHELL '%windir%\system32\msiexec.exe /i \\Fldavrep01\calltracking\PSCallRecordingSetup\PSCallTracking_Setup.msi /qb-'
WriteValue('HKEY_CURRENT_USER\SOFTWARE\RunOnce','cal2','1','REG_SZ')
EndIf
EndIf

Top
#159616 - 2006-03-22 03:19 PM Re: Using Active Directory Security groups in a script
ChristopheM Offline
Hey THIS is FUN
*****

Registered: 2002-05-13
Posts: 311
Loc: STRASBOURG, France
1) try to write

If InGroup ("YourDomain\AllKixInstallCallTracking")

2) flush the kixtart token cache with "kix32 /f yourscriptname.kix"
_________________________
Christophe

Top
#159617 - 2006-03-22 03:34 PM Re: Using Active Directory Security groups in a script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
try flushing the group tokencache.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#159618 - 2006-03-22 03:49 PM Re: Using Active Directory Security groups in a script
rhamersley Offline
Fresh Scripter

Registered: 2005-11-09
Posts: 15
Loc: Fort Lauderdale, FL
Should I run the flush token cache command on the first script name I have. I have one main script that calls a bunch of secondary scritps based on the IP address and so on. Also should I just open a dos prompt and execute the command??
Top
#159619 - 2006-03-22 04:11 PM Re: Using Active Directory Security groups in a script
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
not to sound stupid, but did you add the user you're currently running the script aswell? =)

dunno if it's any difference between flushing with different scripts.
you could always just delete the containing info in the registry (hkey_current_user\kix).
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#159620 - 2006-03-22 04:36 PM Re: Using Active Directory Security groups in a script
rhamersley Offline
Fresh Scripter

Registered: 2005-11-09
Posts: 15
Loc: Fort Lauderdale, FL
Did you mean delete registry entries in "HKEY_CURRENT_USER\software\kixtart\tokencache\" All the entryies under token cache???

Yes I have put myself in the security group. If I comment the If Group statment out it works fine with the installation but once I take the semicolon out it bypasses it.

Top
#159621 - 2006-03-22 04:37 PM Re: Using Active Directory Security groups in a script
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Yep. Thats the reg key.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#159622 - 2006-03-22 04:39 PM Re: Using Active Directory Security groups in a script
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Just running kix32.exe /f from a command prompt will also delete all entries in the registry key.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#159623 - 2006-03-22 05:06 PM Re: Using Active Directory Security groups in a script
rhamersley Offline
Fresh Scripter

Registered: 2005-11-09
Posts: 15
Loc: Fort Lauderdale, FL
I ran the kix32.exe /f command and still the security group does not work.

What I tried so far
I deleted the old AD security group and created a new one called KIXInstallCT and changed the following script to run the following, I also added myself into the KIXInstallCT Active Directory security group. Ran the script and to no avail it still does not run. But I take out the InGroup statement by adding a semicolon it runs. I kinda have to shrug my shoulders and go why why why. There is no reason for this not to run.

color g+/n
? "Verifying Call Tracking Software is installed"
If InGroup ("KIXInstallCT")
? "In group KIXInstallCT"
sleep 5
If NOT ReadValue('HKEY_CURRENT_USER\SOFTWARE\RunOnce','cal2')
SHELL '%windir%\system32\msiexec.exe /i \\Fldavrep01\calltracking\PSCallRecordingSetup\PSCallTracking_Setup.msi /qb-'
WriteValue('HKEY_CURRENT_USER\SOFTWARE\RunOnce','cal2','1','REG_SZ')

EndIf
EndIf

Top
#159624 - 2006-03-22 06:23 PM Re: Using Active Directory Security groups in a script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Did you rename the group? Try deleting the reg key instead of the /F.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#159625 - 2006-03-22 08:35 PM Re: Using Active Directory Security groups in a script
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Here, try running this script. It will output a bunch of information which can help
you to track down what might be causing the issue.

Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')

color g+/n
'Verifying Call Tracking Software is installed.' ?
'Returning information to debug the script.' ??
'Current User: ' + @UserID ?
'KiX Ver: ' + @KiX ?
'KiX Type: ' + @ScriptExe ?
'KiX Starting Dir: ' + @StartDir ?
'Script name: ' + @ScriptName ?
'DOS Ver: ' + @DOS ?
'Domain Membership: ' + @Domain ?
'Logon Domain: ' + @LDomain ?
'Logon Server: ' + @LServer ?
'Logon Drive: ' + @LDrive ?
'Logon Mode: ' + @LogonMode ?
'Site: ' + @Site ?
'Script Dir: ' + @ScriptDir ?
'System Folder: ' + @LanRoot ?
'System Date: ' + @Date ?
'System Time: ' + @Time ?
'Product Type: ' + @ProductType ??
If InGroup('KIXInstallCT')
Dim $W
'User found in group KIXInstallCT' ?
Sleep 5
If Not ReadValue('HKCU\SOFTWARE\RunOnce','cal2')
'Reg read returned: ' + @ERROR + ' - ' + @SERROR ?
SHELL '%windir%\system32\msiexec.exe /i \\Fldavrep01\calltracking\PSCallRecordingSetup\PSCallTracking_Setup.msi /qb-'
'Install returned: ' + @ERROR + ' - ' + @SERROR ?
$W=WriteValue('HKCU\SOFTWARE\RunOnce','cal2',1,REG_SZ)
'Write to Reg returned: ' + @ERROR + ' - ' + @SERROR ?
EndIf
Else
color r+/w+
? 'WARNING!' ?
'User not found in KIXInstallCT group' ??
EndIf

Dim $Pause
color g+/n
'Script is completed, press any key to continue.' ?
Get $Pause

Top
#159626 - 2006-03-23 08:58 AM Re: Using Active Directory Security groups in a script
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Robert,

Were you able to test run this code and figure out anything yet?

Top
#159627 - 2006-03-23 09:00 AM Re: Using Active Directory Security groups in a script
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
try running the shell part by itself to check if that line truly works. did it reply that you were in the group?

Or, run NTDOC's script that does it all =)
(Sorry Doc, didn't read it until now)


Edited by ewook (2006-03-23 09:11 AM)
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#159628 - 2006-03-23 09:06 AM Re: Using Active Directory Security groups in a script
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Well the code I posted for him will show that as well as a bunch of other system information.

'Install returned: ' + @ERROR + ' - ' + @SERROR ?



Edited by NTDOC (2006-03-23 09:06 AM)

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1607 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.068 seconds in which 0.027 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org