#27199 - 2002-08-17 12:06 AM
Mapping to PDC
|
Stealth
Fresh Scripter
Registered: 2001-08-09
Posts: 48
Loc: Scotland
|
What im trying to achive is mapping a network connection to the PDC as follows
If (InGroup("DIV_TRAIN") <> 0) Use I: @lserver+"\TRAINING" Use J: @lserver+"\TRAINDB" ; $nul=WriteValue($HKCUSMWCVEUSF,"Personal","I:\","REG_SZ") EndIf
I want to connect the I drive to the BDC which works fine but the J drive I want to connect to the PDC I have tried substituting @lserver with @Domain01 computername = domain name01 with no joy can this be done?
Thanks in advance...
|
|
Top
|
|
|
|
#27201 - 2002-08-17 12:52 AM
Re: Mapping to PDC
|
Stealth
Fresh Scripter
Registered: 2001-08-09
Posts: 48
Loc: Scotland
|
Yeah but MCA told me to do it, only kidding MCA did a great job of tiding my script up it looks more complicated which is a good thing less people here will muck around with it thanks anyway.
|
|
Top
|
|
|
|
#27203 - 2002-08-16 01:55 PM
Re: Mapping to PDC
|
Stealth
Fresh Scripter
Registered: 2001-08-09
Posts: 48
Loc: Scotland
|
Unfortunatley all NT4 Wkstn i don't understand why it doesn't work with the @domain01 or @ldomain01 should it have a @domain+01 perhaps?
|
|
Top
|
|
|
|
#27205 - 2002-08-16 02:05 PM
Re: Mapping to PDC
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
When amapping a drive, the use statement need a specific network address (IP address) and resource name (share). The domain name can not be resolved to a specific address. Therefore, you need to provide the name of the server.
In an NT4 environment, I used to use NLTEST.exe from the resourcce kit to find a PDC in a domain. code:
c:\data\scripts>nltest /dclist:dss_test Domain 'dss_test' is not an NT 5 domain. (Using NetServerEnum). List of DCs in Domain dss_test \\US194DC41 (PDC) \\US177SS40 The command completed successfully
You can use Pipe() udf or redirect to a file and parse it to find the server name with the PDC role.
{edit} my comments seem to have been off target. [ 16. August 2002, 14:37: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#27206 - 2002-08-16 02:36 PM
Re: Mapping to PDC
|
Stealth
Fresh Scripter
Registered: 2001-08-09
Posts: 48
Loc: Scotland
|
Thanks for the replies I will try and get back
|
|
Top
|
|
|
|
#27207 - 2002-12-03 03:42 AM
Re: Mapping to PDC
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear Lonkero,
We prefer the IF (InGroup("DIV_TRAIN") <> 0) notation. This format works for all kixtart releases.
A possible partication in board golf tournaments isn't such a good idea. We doesn't play computer games. Only a little collection we have for our cousins. Only we are interesting in the ideas of it. Ideas which show what is really possible with a programming language. greetings.
|
|
Top
|
|
|
|
#27208 - 2002-12-03 03:46 AM
Re: Mapping to PDC
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear Stealth,
Normally it isn't any problem to map a PDC share. As administrator you have mostly the rights to choose (temporary) share name and to implement selected name in your scripts.
Please can you return a status update. greetings.
|
|
Top
|
|
|
|
#27211 - 2002-12-03 04:10 AM
Re: Mapping to PDC
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear Lonkero,
Search through the forums were you can see how much people specifies something like IF (InGroup("Div_Train") = 1).
Of course you are right about your format, but we find our solution more clear. In the current release it is also possible to use the NOT operator, which gives another way of presenting such logical structure.
Another benefit is: when you are using always the same structure you can easily search for them when a modification is necessary. Some BAT/script languages have the capability to use full and short keywords which can be very interesting, but mostly using those short keywords makes reading and maintaining scripts hard. greetings.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|