#169300 - 2006-10-13 03:42 PM
Re: IF INGROUP HELP
|
Björn
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
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
|
|
|
|
#169303 - 2006-10-16 05:57 PM
Re: IF INGROUP HELP
|
ekainyah
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
Registered: 2000-07-28
Posts: 11624
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
|
|
|
|
#169306 - 2006-10-16 08:38 PM
Re: IF INGROUP HELP
|
Kdyer
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
|
Top
|
|
|
|
#169307 - 2006-10-17 10:25 AM
Re: IF INGROUP HELP
|
ekainyah
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
|
|
|
|
#169309 - 2006-10-17 11:37 AM
Re: IF INGROUP HELP
|
ekainyah
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
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
|
|
|
|
#169312 - 2006-10-17 04:19 PM
Re: IF INGROUP HELP
|
ekainyah
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
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
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
Registered: 2000-07-28
Posts: 11624
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
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
|
|
|
|
#169318 - 2006-10-18 06:47 PM
Re: IF INGROUP HELP
|
ekainyah
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
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 331 anonymous users online.
|
|
|