Avatar of stebennettsjb
stebennettsjb
 asked on

Kix script mappings not working 100%

Hi, we are using .kix scripts and having some trouble could any one help with some problems im having.

Mappings for departmental drives seems to fail at least 2-3 times a day (Ie someone should get G,H,U and only gets H and U) Any ideas why they keep failing.

Everyone has a mapping to there personal folder (U) via the Kix scripts and in there AD account under Profile Home folder, a few times there have been differences between then and poeple cant login, This was set up before i joined. Does anyone know why we have both???

Sometimes when we add another mapping it dosnt work, and we have to delete the lines of code and reput the code in. and then it will work???

Apparently before we used .kix we used .bat files and have the same problem but worse. Is there really no solid way that actually works to give poeple mapped drives.

Thanks for any input,

s
Windows Server 2008Active DirectoryVB Script

Avatar of undefined
Last Comment
stebennettsjb

8/22/2022 - Mon
Chris_Peris

Hi,

I use bat files to map the drive for users and it works perfectly. Best thing is to do is map the personal drive through the user account - profile -Home and make all the other Folders map through a bat. Also if u make the bat file using the user user name u can give a option in Start - All Programs where user can just click on the bat file to map the drives. let me know if u need to know how. Also this is the bet file format i use



NET USE X: /DELETE
NET USE Y: /DELETE

NET USE X: "\\192.168.18.17\XYZ$"
NET USE Y: "\\192.168.18.17\ABC$"
ASKER CERTIFIED SOLUTION
Isorg

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
stebennettsjb

ASKER
Hi Isorg,

I will give it go tomorrow thank you. No wireless connections, just seems to not run everything. Today i had 3 people from 1 site ring up saying that a drive mapping wasnt working. No one has touched that line of script for 4-5 months. But we did another mapped drive to it. Just seems very random which adds to pain of it. If once there logged in i go to the kix script and run it they will get the drive but it sometimes takes 2-3 goes. Same with them logging off and back on again.

Another one that cropped up this week. was

USE G: "\\servername\location" /PERSISTANT
SHELL G:/mybatch.bat

where it maps a drive to G then runs a script in that location. Then

Then the batch file has 2 more mapped drives and login details.

The users are getting the mapped drive. but not the login credential ???

If they run the script again once logged in the problem is sorted. If they try and connect to the drive they get prompted for username password, with username filled in and just need to enter the password.

This was also working for months and months and now suddenly stopped.

I will let you the results of the debug when i get in :)

Thanks

s
Isorg

you add any new domain controlers?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
stebennettsjb

ASKER
no, we've had same dc's for year or so maybe.

stebennettsjb

ASKER
Sorry for the delay in getting back to you.

So i used the below script


;Place at the top of the kix script
if @userid = "testuser"
   debug on
endif


; Place after your Drive mapping commands
; use g: ...
if @error
   ? 'There was an error mapping the G: ' +  @serror
endif


pops up black box and i have to click though it going though each IF GROUP x

but it always closes after 4 groups I moved the script that wasnt running up to the top and now its running.

Just wondering why its closing after 4 when theres maybe 10+ the 4th and 5th IF statements are formatted the same as the first IF statements

Thanks

s

stebennettsjb

ASKER
double checked.

the only thing i could different is that the IF that it always closed on didnt have /PERSISTENT on the delete mapping and remapping.

example with:

IF INGROUP("MySite\Access to Photographs")
USE P: /DELETE /PERSISTENT
USE P: "\\MyServer\Photographs" /PERSISTENT
ENDIF

Without:

IF INGROUP("MySite\Access to Photographs")
USE P: /DELETE
USE P: "\\MyServer\Photographs"
ENDIF

Should that matter?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
stebennettsjb

ASKER
Closed and excepted Isorg for solution.

I ran the scripts again and found that where they kept stopping there was a syntax error. This has fixed all the known problems i have.

Thanks