Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Custom Gina and Mapping Network Drives Problem

Posted on 2006-11-06
9
Medium Priority
?
300 Views
Last Modified: 2008-03-17
Hi,

I have written my own custom GINA componet and every works fine on all operating systems apart from Win2K.  The componet itself works OK, but I have scripts that map drives etc on a  users logon.  These drives no longer map when a user logs on, I have checked and the scripts are OK and seem to run.

Any ideas?

0
Comment
Question by:lee_ingram
  • 3
  • 3
7 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 17882266
What error codes are you getting?
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 17883329
How do you make the mapping? With the 'net use' or the 'subst' command? Do you use network drives and/or shares?

You might switch between these different mappings and try if the other works. Are there any long directory names or names with spaces or non-ascii involved?

Regards, Alex




0
 
LVL 1

Author Comment

by:lee_ingram
ID: 17884324
Im not sure  how the mapping are made at this is done within the Networking department.  I have just been told that the shares and long directory names etc dont work with the custom gina.  They work find on windows 2003 but not w2k.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:lee_ingram
ID: 17884329
There are not error codes, but the drives dont map.
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 17885473
>>>> I have just been told that the shares and long directory names etc dont work

Please post one example of a script that doesn't work. Generally, W2k and XP are not so much different that a mapping could fail that works on XP (there are more reasons for other way round). I assume that the scripts check for XP OS and because of that it failed.

Regards, Alex
0
 
LVL 1

Author Comment

by:lee_ingram
ID: 17887766
Hi,

The scripts on the w2k box work prefectly until I install my custom gina component, when you then reboot the box the mapped drives simply disappear and then we have error messages saying that it can find certain files within the script.  There errors messages are simply file not found because the script accesses a file that it on a mapped drive that has failed to be mapped.

So as far as I can see its the custom gina on a w2k box that is some how causes problems with mapping drives.

Thanks
0
 
LVL 39

Accepted Solution

by:
itsmeandnobodyelse earned 2000 total points
ID: 17888025
>>>> the box the mapped drives simply disappear

drives can be mapped by command 'net use' or command 'subst'. Then, the windows explorer can map drives that were defined in Tools\Map Drives...

I assume you refer to the latter what would mean that your gina doesn't invoke the explorer's drive mappings. Unfortunately, I have only a weak idea why it works on XP and fails on W2k (I assume it won't work with NT4.0 also)  On XP, if you kill the explorer process, the desktop - which is one window of the explorer - will vanish only for a short time. Then, a new explorer was invoked by the operation system. If you do the same on W2k or NT, the desktop keeps blank and you have to start a new explorer yourself. So XP seems to use an explorer which is integrated than in previous versions and what might include that it restores the explorer driver mappings associated to the user. As told that is only a guess ... and I don't know if it is possible on win2k to refresh the explorer's drive mappings programmatically (you could spot them in the registry and invoke an appropriate mapping script).

Maybe the following workaround is easier where you simply add the needed mappings in your scripts if they don't already exist:

REM map drive x
if not exist x:\*.* net use x: \\server\share

or alternatively when referring to local paths

REM map drive y
if not exist y:\*.* subst y: c:\anysub_path

Regards, Alex

0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question