JRMason
(Just in Town)
2009-12-04 01:55 AM
Help on mapping drive

I have a strange problem using the InGroup funtion to map a drive and I was wondering if anyone else has come across this. Ok I have this statement

If InGroup("Multimedia Team")
USE K: /Delete
USE K: "\\server\MutimediaTeam"
EndIf

if I log onto one computer the drive maps fine but if I log into the one he user uses then it doesn't map. I've tried to add an = 0 at the end of the if statement and it will map but the problem is if I add it to the other drive mapping statements it will map the drive even if the user isn't in the group. Then I tried to add an = 1 and it doesn't work at all on the users computer but it will work if the same user logs onto this other computer. So the login script works but not on the computer this user is using.

I'm pulling my hair out trying to get this script to work on this users computer. If anybody has had this and knows how to fix it please help. Both computers are Windows XP pro and are on a Win 2003 domain.

Thanks in advance


Richard H.Administrator
(KiX Supporter)
2009-12-07 09:52 AM
Re: Help on mapping drive

It's possible that you have a stale group cache on the machine in question - try running the script with a "/f" flag to flush the cache. The purpose and management of the group cache is documented towards the start of the manual.

A couple of other things:
  • Check the windows log for errors.
  • Add some debug code so that you can confirm that the condition is met and that the drive mapping is not failing. Without any checking / ouput you are in the dark.