Page 1 of 1 1
Topic Options
#161728 - 2006-05-08 01:26 PM Printers are no mapping
ankara Offline
Lurker

Registered: 2006-05-08
Posts: 3
Hi everyone

I have a domain user which is member of a domain global group and maps his default printer no problem. I want the same user to map another printer from another department. The problem is his user id section does not map the printer. If I take him out of his department his user id section maps the printer. I dont want to put the user in the other department because they are mapping 6 printers in total.Here is my setting
IF INGROUP("ggsys")
$rc=ADDPRINTERCONNECTION("\\prn10\PRG9")? ''+@ERROR+' - '+@SERROR
ENDIF
second section is
if @userid = "pmarkl"
$rc=ADDPRINTERCONNECTION("\\prn11\prg10")? ''+@ERROR+' - '+@SERROR
ENDIF

It seems that kix is checking only the group membership and not the user id.
section.

The other problem is I have 10 users in one department 6 of them are mapping the printer and other 4 are not mapping the printer. All users PC's build identicall. Same happens with department drives some are mapping and some are not.

Please help my department setting is.
IF INGROUP ("DLacc")
USE X: "\\a5.rt.net\dfsdep\set_dep"
ENDIF
the user are in the department I checked and double checked it.
Thanks

Top
#161729 - 2006-05-08 02:49 PM Re: Printers are no mapping
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4945
Loc: Leatherhead, Surrey, UK
You've got some nasty coding bugs in there, mainly caused by unbalanced quotes.

Try this:
Code:
If InGroup("ggsys") 
If ADDPRINTERCONNECTION("\\prn10\PRG9")
"Error connection printer \\prn10\PRG9: ["+@ERROR+"] "+@SERROR+@CRLF
EndIf
EndIf

If @USERID="pmarkl"
If ADDPRINTERCONNECTION("\\prn11\PRG10")
"Error connection printer \\prn11\PRG10: ["+@ERROR+"] "+@SERROR+@CRLF
EndIf
EndIf



If you've got similar constructions elsewhere in the script you should tidy them up as well.

If you are still not getting the X: drive mapping after this fix then ensure that you are displaying any error that occurs.

Top
#161730 - 2006-05-09 10:02 AM Re: Printers are no mapping
ankara Offline
Lurker

Registered: 2006-05-08
Posts: 3
Hi Richard

Thank you very much for your help. I am new to Kix, Can you please tell me how I can display errors with regards to mapping department drives

Thank you again

Top
#161731 - 2006-05-09 10:55 AM Re: Printers are no mapping
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4945
Loc: Leatherhead, Surrey, UK
Here is an example (untested):
Code:
IF InGroup("DLacc") 
Use X: /delete /persistent
Use X: "\\a5.rt.net\dfsdep\set_dep"
If @ERROR "ERROR: Cannot map X: Reason: ["+@ERROR+"] "+@SERROR+@CRLF EndIf
EndIf


Top
#161732 - 2006-05-12 12:21 PM Re: Printers are no mapping
ankara Offline
Lurker

Registered: 2006-05-08
Posts: 3
Thanks richard very kind of you
Top
#161733 - 2006-05-15 12:32 PM Re: Printers are no mapping
testuser Offline
Fresh Scripter

Registered: 2003-05-07
Posts: 5
Hi Peter
IF InGroup("DLacc")
Use X: /delete /persistent
Use X: "\\a5.rt.net\dfsdep\set_dep"
If @ERROR "ERROR: Cannot map X: Reason: ["+@ERROR+"] "+@SERROR+@CRLF EndIf
EndIf

I have the above as you suggested. This department does not map their department drive and I dont get any error message at all when kix runs. If I open a dos prompt and type the command manually after the user loged on then I can map the drive.
net Use X: "\\a5.rt.net\dfsdep\set_dep" works

Is there any way I can find out why kix is not mapping this drive some sort of debug

thanks

Top
#161734 - 2006-05-15 01:51 PM Re: Printers are no mapping
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 950
Loc: Stockholm, Sweden.
First thing that comes to my mind if the user/users is in the DLacc-group?
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#161735 - 2006-05-15 03:13 PM Re: Printers are no mapping
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
...or the classic "I screwed up the cache by renaming" syndrome.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#161736 - 2006-05-15 04:04 PM Re: Printers are no mapping
testuser Offline
Fresh Scripter

Registered: 2003-05-07
Posts: 5
Hi Peter

I checked, and double checked that, the user is in that group. Whne I run the kix from the netlogon share, I still dont get this drive mapped nor I get any error message to see what is really happening

Top
#161737 - 2006-05-15 04:13 PM Re: Printers are no mapping
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 950
Loc: Stockholm, Sweden.
Flush the cache and give something like this a testrun -
Code:

"checking if in group" ?
IF InGroup("DLacc")
"Yes, in group DLacc,mappning" ?
Use X: /delete /persistent
Use X: "\\a5.rt.net\dfsdep\set_dep"
If @ERROR "ERROR: Cannot map X: Reason: ["+@ERROR+"] "+@SERROR+@CRLF EndIf
EndIf



Or, perhaps someone can supply you with a real testscript (or search for it via 'search').


Edited by Björn (2006-05-15 04:14 PM)
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#161738 - 2006-05-15 09:22 PM Re: Printers are no mapping
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4641
Loc: The Netherlands
Deleting the registry key below would also clear the cache.


Quote:


HKEY_CURRENT_USER\Software\KiXtart\TokenCache





BTW: Who is peter?
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#161739 - 2006-05-15 10:00 PM Re: Printers are no mapping
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

BTW: Who is peter?



Better still, who are you and why are you taking over for ankara?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#161740 - 2006-05-16 10:47 AM Re: Printers are no mapping
testuser Offline
Fresh Scripter

Registered: 2003-05-07
Posts: 5
Hi chaps
Deleted the registry key as suggested, but still no luck. I have about 10 users whic are not mapping any of their drives, and have no idea what is happening. If I put a batch file on the desktop and click on it all drives map. I mapped to the netlogon share and run the kix and still not mapping, including some printers. I have run out of options.

Thanks for any help

Top
#161741 - 2006-05-16 10:57 AM Re: Printers are no mapping
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4641
Loc: The Netherlands
Testuser,

You should start your own thread about this and not "hijack" this one.
If you post the code you have now and write an explanation of the problems you have in your own new thread it would be easier to help. Please include the OS of the servers and workstations and the kix version you use in the new thread.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#161742 - 2006-05-16 11:03 AM Re: Printers are no mapping
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 950
Loc: Stockholm, Sweden.
The question noone has asked yet, what version of Kixtart are you running?
Does anything run on these 10 clients?
are they identical to the rest? - if not, what differs?
If I were you I would check your script again for spelling-errors or non-exsistent quoting or errournus quoting. Stupid question, but did you remove the reg-cached part on these 10 aswell? Have you tried running anything else on one of these specific machines? are the users that are connected to these puters really in the groups? are they identical to other users?

I have great experience with scripts that fails, and when you dig around and later on post it here, it sums up to a missing quotation or a spelling error... (therefore I always salute the heroes of korg ).


Edited by Björn (2006-05-16 11:05 AM)
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#161743 - 2006-05-16 11:12 AM Re: Printers are no mapping
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 950
Loc: Stockholm, Sweden.
oooh, *_* it's two of 'em..
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#161744 - 2006-05-18 11:08 AM Re: Printers are no mapping
testuser Offline
Fresh Scripter

Registered: 2003-05-07
Posts: 5
All client are windows XP SP2
servers are win2003 running A.D.
Group policy is exucuting the kix
Kix version is 4.52.
The clients are in the same global group, and the global group is part of the Domain local group. The if statement I am running against is domain local group. I changed this to global group as well and still does not work, All pc's are identical. The problem is I dont know where is failing. lets say 10 people are in one department which are in the same group, 6 of them map the department and 4 of them can't. The following day people who map the drives can not map their drives, there is no logic to it. Same with the printers. this is happening to 2 to 3 departments. The debug on and off does not show anything either. I just want to find out what part is the problem.
I am stuck

Top
#161745 - 2006-05-18 02:27 PM Re: Printers are no mapping
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4641
Loc: The Netherlands
Putting the lines below just after the line that should map the drive should show if the drive has been mapped ok or not. And it gives you some time to read the stuff on the screen by using sleep.

Code:

?"Error code: " + @error
?"Error text: " + @serror
sleep 5



And like said before you should start your own thread for this. If you want us to help you as good as we can it should contain the COMPLETE code you are using and the stuff you posted here about the server and client OS and the kixtart version you use.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


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

Who's Online
1 registered (adamlevine) and 165 anonymous users online.
Newest Members
katherinknul, phamthuy, xuantu075, skygreen2031, amelindaróe
17629 Registered Users

Generated in 0.113 seconds in which 0.037 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