Page 2 of 3 <123>
Topic Options
#169300 - 2006-10-13 03:42 PM Re: IF INGROUP HELP
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Post if you need help / found the issue so the community can benefit from your findings
Top
#169301 - 2006-10-16 05:43 PM Re: IF INGROUP HELP
ekainyah Offline
Getting the hang of it

Registered: 2005-07-05
Posts: 51
Loc: Ghana
I have done a lot but i'm getting very disappointed.This is what i did. i place the kix32.exe file, a logon.kix and a batch file logon.bat files all in the Sysvol folder in the WINDOWS\SYSVOL\sysvol\domain.com\scripts. Now in inside the logon.kix i have

IF Ingroup ("itdept")
use x: /DEL /PERSISTENT
use Y: /DEL /PERSISTENT
use x: "\\servername\surpacdata
use y: "\\servername\department
EndIf


Then within the batch file i have this:
kix32.exe logon.kix.

And in GPO under user configuration/windows settings/scripts/logon i have addeded the batch file logon.bat.

But still it does not work at all for me. Wondering what the hell is playing up with me. looks like this might not work for me.
any help

Top
#169302 - 2006-10-16 05:48 PM Re: IF INGROUP HELP
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4665
Loc: The Netherlands
Small chance but what happens when you put the domain name in front of the group so you would get \\domain\group?
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#169303 - 2006-10-16 05:57 PM Re: IF INGROUP HELP
ekainyah Offline
Getting the hang of it

Registered: 2005-07-05
Posts: 51
Loc: Ghana
I place the domain in as

IF Ingroup ("domain\itdept")
and still doen't work.

Top
#169304 - 2006-10-16 07:20 PM Re: IF INGROUP HELP
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11603
Loc: CA
Please try something like this for a test account.

Code:
If Not @LogonMode
Break On
Else
Break Off
EndIf
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')
$SO=SetOption('WrapAtEOL','On')
 
Dim $NoCache, $x
$NoCache = DelKey('HKCU\Software\KiXtart\TokenCache')
@KiX ?
If InGroup(@Domain+'\itdept')
'Found in ITDEPT Group' ?
Else
'Did not find in ITDEPT Group' ?
EndIf
 
'Press any key to continue...'
Get $x


 

Top
#169305 - 2006-10-16 08:01 PM Re: IF INGROUP HELP
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You are missing quotes.
Top
#169306 - 2006-10-16 08:38 PM Re: IF INGROUP HELP
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Quote:


IF Ingroup ("itdept")
use x: /DEL /PERSISTENT
use Y: /DEL /PERSISTENT
use x: "\\servername\surpacdata
use y: "\\servername\department
EndIf

Then within the batch file i have this:
kix32.exe logon.kix.

And in GPO under user configuration/windows settings/scripts/logon i have addeded the batch file logon.bat.

But still it does not work at all for me. Wondering what the hell is playing up with me. looks like this might not work for me.
any help




Further to what Les was saying about your missing quotes:
Code:

IF Ingroup ("itdept")
use x: /DEL /PERSISTENT
use Y: /DEL /PERSISTENT
use x: "\\servername\surpacdata"
use y: "\\servername\department"
EndIf



HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#169307 - 2006-10-17 10:25 AM Re: IF INGROUP HELP
ekainyah Offline
Getting the hang of it

Registered: 2005-07-05
Posts: 51
Loc: Ghana
sorry on the actuall scripts i have both quotes on which didn't work.

NTDOC,
i tried with your codes which i was expecting to see either 'Found in ITDEPT Group' or not but i don't c anything at all. i am wondering what i might be doing wrong or what is preventing the script to run.

Top
#169308 - 2006-10-17 10:34 AM Re: IF INGROUP HELP
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11603
Loc: CA
Hi Edmund,

Well how are you calling the script?

What Server Domain model? Active Directory or NT4?

Are you sure that all your servers have replication working correctly?

Are you running any Windows 9x clients?
If only NT/2000/XP clients then you don't need a batch file to call KIX32 and your script.

Top
#169309 - 2006-10-17 11:37 AM Re: IF INGROUP HELP
ekainyah Offline
Getting the hang of it

Registered: 2005-07-05
Posts: 51
Loc: Ghana
NTDOC,
I AM RUNING 2003 SERVER DOMAIN WITH ACTIVE DIRECTORY AND HAVE REPLICATION WORKING FINE B'COS MY DFS HAS BEING AND STILL DOING FINE AS WELL AS DC REPLICATIONS.ALL CLIENTS ARE XP WITH LESS THAN 10 RUNNING 2000.
THIS IS HOW I CALL THE SCRIPT:

i place the kix32.exe file, a logon.kix and a batch file logon.bat files all in the Sysvol folder in the WINDOWS\SYSVOL\sysvol\domain.com\scripts. Now in inside the logon.kix i have

IF Ingroup ("itdept")
use x: /DEL /PERSISTENT
use Y: /DEL /PERSISTENT
use x: "\\servername\surpacdata
use y: "\\servername\department
EndIf


Then within the batch file i have this:
kix32.exe logon.kix.

And in GPO under user configuration/windows settings/scripts/logon i have addeded the batch file logon.bat.

I DON'T KNOW WHAT IS HAPPENING TO THIS.

Top
#169310 - 2006-10-17 11:44 AM Re: IF INGROUP HELP
ekainyah Offline
Getting the hang of it

Registered: 2005-07-05
Posts: 51
Loc: Ghana
SORRY I HAVE THE QUOTES ON LIKE THIS:
use x: "\\servername\surpacdata"
use y: "\\servername\department"

Top
#169311 - 2006-10-17 01:25 PM Re: IF INGROUP HELP
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
In the GPO, under scripts you've got your kix-executable and your kix-scriptfile, in the user logon-scripts, you can then set kixexecutable.exe scriptfile.kix . afterwards this is set and replicated out, restart your machine you're testing it on.

First off - make sure like you've done eariler (I think) that your script acctually works. copy it down to a workstation, with a user that's in one or some / all of the groups, run it and verify it. does it work there? Then it should work in your gpo. Mind tho that setting up via a GPO is a bit tricky - using the old way mentioned before -> in each users profile, set the logon.bat and in the netlogon-share place the files (logon.bat, kix-executable and script-file/files).

If you are still go on via a GPO - verify that it acctually gets to the machine and user (gpresult on the machine with the user / wmi-query from the ad-mmc).
Another easy way is to log each logon - make the script write to a file or why not the log. eitherway can be good to use during test-phase.

Top
#169312 - 2006-10-17 04:19 PM Re: IF INGROUP HELP
ekainyah Offline
Getting the hang of it

Registered: 2005-07-05
Posts: 51
Loc: Ghana
Bjorn i am a little bit confuse with what you are saying.
what you saying is to place both kix32.exe and the kix files under
user configuration/windows settings/scripts/logon?

Top
#169313 - 2006-10-17 04:40 PM Re: IF INGROUP HELP
ekainyah Offline
Getting the hang of it

Registered: 2005-07-05
Posts: 51
Loc: Ghana
when i run this script in command prompt on the test computer
c:\kix>kix32 logon.kix /d
it runs ok without any error messenge but it does not map the drive

and the content of the logon.kix is
IF INGROUP("ITDEPT")
USE X: /DEL /PERSISTENT
USE Y: /DEL /PERSISTENT
USE X: "\\SERVER\SURPAC"
USE Y: "\\SERVER\DEPARTMENT"
ENDIF

Top
#169314 - 2006-10-17 04:49 PM Re: IF INGROUP HELP
ekainyah Offline
Getting the hang of it

Registered: 2005-07-05
Posts: 51
Loc: Ghana
Now when i try the script below that NTDOC has to me to test, it is able to detect when a user is in the itdept group or not so it means is on the test computer but why it not working for the map drive and on the domain is what is killing me.


If Not @LogonMode
Break On
Else
Break Off
EndIf
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')
$SO=SetOption('WrapAtEOL','On')

Dim $NoCache, $x
$NoCache = DelKey('HKCU\Software\KiXtart\TokenCache')
@KiX ?
If InGroup(@Domain+'\itdept')
'Found in ITDEPT Group' ?
Else
'Did not find in ITDEPT Group' ?
EndIf

'Press any key to continue...'
Get $x

Top
#169315 - 2006-10-17 09:04 PM Re: IF INGROUP HELP
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11603
Loc: CA
Well for now take an account and set it up in Active Directory Users and Computers

Then modify the logon to be something like this. Using either KIX32.EXE or WKIX32.EXE and the name of your Script file.

Since you're using only 2000/XP workstations then you don't need to use a batch file.




Make sure the logon has the script information that I gave you.

You should see it on screen and have to press a key to continue.

Then once that is working you can look at modifying the script to actually do the drive mappings.

Top
#169316 - 2006-10-18 12:58 PM Re: IF INGROUP HELP
ekainyah Offline
Getting the hang of it

Registered: 2005-07-05
Posts: 51
Loc: Ghana
NTDOC,
NOW I AM ALMOST THERE. IT WORKS ON A LOCAL TEST COMPUTER ALRIGHT AND I ALSO WORKS WHEN I PLACE KIX32.EXE MAP.KIX IN A TEST USER PROFILE AS YOU INDICTED ABOVE. NOW I AM LEFT WITH HOW TO GET BATCH FILE TO WORK. I HAVE CREATED A BATCH FILE NETMAP.BAT AND PLACE THIS COMMAND "KIX32.EXE MAP.KIX" IN IT AND PLACE IT UNDER GROUP POLICY "UESR CONFIGURATION/WINDOWS SETTINGS/SCRIPTS/LOGON.

THE REASON WHY I NEED THIS BATCH TO RUN IS THAT WE HAVE A LOT OF USERS IN OURS DOMAIN SO TO PUT THE "KIX32.EXE MAP.KIX" IN EVERY USER'S PROFILE IS ACTUALLY A BIG WORK FOR ME.I ACUTALLY HAVE A BATCH FILE IN THE LOGON WHICH WORKS ALRIGHT SO JUST WONDERING WHY THIS IS NOT.

EDMUND

Top
#169317 - 2006-10-18 03:54 PM Re: IF INGROUP HELP
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
My bad ekainyah. Didn't know that you could do like doc just posted, and you said you've done previously. And to answer your question, yes I belive that was what I meant. but, perhaps you should build your scripts a bit different so you can place 'kix32.exe kixfile.kix' there. then make the script decide and run the rest.
Top
#169318 - 2006-10-18 06:47 PM Re: IF INGROUP HELP
ekainyah Offline
Getting the hang of it

Registered: 2005-07-05
Posts: 51
Loc: Ghana
OK BJORN. NOW I WANT TO BE ABLE TO USE THE BATCH FILE TO GET THIS WHOLE THING TO RUN.
Top
#169319 - 2006-10-18 06:50 PM Re: IF INGROUP HELP
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Please stop shouting in uppercase.
Top
Page 2 of 3 <123>


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

Who's Online
1 registered (vertage) and 155 anonymous users online.
Newest Members
vertage, dimi575, Drecksnacken, Nlill, webtools321
17735 Registered Users

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

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