Link to home
Start Free TrialLog in
Avatar of it_gsr
it_gsr

asked on

using Kixtart 4.22 to map drives in windows 2003

Hello,
Just want to find out if there is any difference in how is used to map drives in windows 2003 and any other version. I have created a batch file called logon.bat(which contains only this command" kix32 login.kix" ). Then i have created a logon.kix(which contains this command
use "m:" "\\bgs-it100\folders"
use "y:" "\\bgktts.com\data"
Then i place these two files and the kix32.exe in the scripts folder under SYSVOL in my DC.
Now when i logon as a user, the drives are not map till i run the debug associated with the kixtart. Just don't know if it from windows 2003 or what. Need help badly.

Cheers
Avatar of TannerMan
TannerMan

This is a strecth, but the network shares you created.............did you open up securtiy settings (NTFS) for the physical folder and give permissions correctly? Windows 2003 server does NOT default set everyone full control like older versions. Just creating a share with permissions does not work,,,,by itslef.

Taking kixtart out of the picture,,,,,go on the 2003 server create a network share and give permissions in both the SHARE properties and the physical folder SECURITY. Then, as a logged on user, try to connect to the share. This is just to test that your getting the share setup right. You could even leave off my suggestions on SECURITY for physical folder and test my theory on 2003 default permissions.

I know nothng of this kixtart, but just trying to help.
Avatar of it_gsr

ASKER

TannerMan,
Thanks. I have done the permission on the folders but what i want is the folders to be map automatically when a user logs on.
Avatar of Chris Dent

I've noticed one instance where drives don't map using Kix.

The problem occurs when a drive mapped in DOS doesn't disconnect from the drive letter. Also trying to remove the mapping using Kix fails (or more to the point just has no effect). The only solution I found for that problem was adding "net use <drive> /d /y" to the logon.bat file.

To check for that one, run "net use" on one of the PCs having the problem and see if it reports the drive with a disconnected mapping.
Avatar of it_gsr

ASKER

Hi,
This is what i have in the logon.bat

kix32.exe login.kix:
net use "m:" /d/y            
net use "y:" /d/y

and this in the logon.kix:
use "m:" "\\gsrgh.com\server structure"
use "y:" "\\gsrgh.com\bgsgoldcs"

But the drives are not apearing.

Logon.bat should be the other way around (you need to kill the mapping in DOS before you can remap it with Kix):

net use m: /d /y
net use y: /d /y
kix32.exe logon.kix

You need the spaces between the /d and /y for the command to work.

Your use of the Share Path in Kix is also incorrect, well unless you really called your domain com - which would be fun if you tried to resolve any external .com address ;).

If you are going to use the full DNS Path it should be:

use "m:" "\\<servername>.gsrgh.com\server structure"
use "y:" "\\<servername>.gsrgh.com\bgsgoldcs"
Avatar of it_gsr

ASKER

This in the logon.bat:
net use m: /d/y            
net use y: /d/y
kix32.exe login.kix


and this in the logon.kix
use "m:" "\\bgs-it005.gsrgh.com\server structure"
use "y:" "\\bgs-it005.gsrgh.com\bgsgoldcs"

Don't know if i have mistakes in b'cos still not working.

You still need the spaces:

net use m: /d /y

It can't use /d/y because it's not a valid switch.
Avatar of it_gsr

ASKER

I have added the spaces but still not mapping
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of it_gsr

ASKER

Thanks Chris-Dent. Is working now. Did is what i did.
In the logon.bat, i entered these commands:

net use p: /d /y
net use y: /d /y
net use p: "\\gsrgh.com\server structure"
net use y: "\\gsrgh.com\bgsgoldcs"
I did not use the server name b'cos these folders are dfs root so i was still able to get to them.

Then within the logon.kix, entered these command:

use "p:" "\\gsrgh.com\server structure"
use "y:" "\\gsrgh.com\bgsgoldcs"


So in all i have to copy the kix32.exe, logon.bat and the logon.kix into the scripts in Sysvol folder.
Thanks man.


Glad it's working now. I don't think you're using the kix script at this stage, but if you don't need it then there's no problem there :)
Avatar of it_gsr

ASKER

It think i will need it to do other things very soon. Let me just ask you a question out of this. Like i said, the server structure is a dfs root with many departmental folders. Now what i want is that, if a user in the fiinance departement logons on, he will not be able to see the other departmental folder at all. I will post the question rite now. Any idea?

Thanks

I'm not too sure how it handles mappings to the DFS root, it could be that that's causing problems.

Still, there are always ways around. We could make kix issue a shell command and use the DOS Net Use rather than it's own function.

To make sure it can handle group queries try:

#test.bat#

kix32.exe test.kix

#test.kix#

If InGroup("Domain Admins")
    ? "Hellow World"
EndIf

Run it from the command prompt and see if it writes "Hello World" out. You'll need Kix32.exe in the same place you run it from.

If it displays that then there's no problem grabbing group names and the rest will follow.