#23506 - 2002-06-19 04:12 PM
mapping network drives
|
Donnam
Fresh Scripter
Registered: 2002-06-19
Posts: 5
|
Am sorry for being a gumby but can't find much info on this... All I want to do is something like this script, so I can map network drives for our clients...
IF InGroup( "Purchasing" ) net use P: \\server\public /y net use i: "\\server\finance payments" /y
ENDIF
...but not sure if "net use" works etc as keeps erroring??? Please help Donna :-)
|
|
Top
|
|
|
|
#23508 - 2002-06-19 04:37 PM
Re: mapping network drives
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
That manual is a great resource, ya know... if it were a guy needing help, I'd have been looking for a RTFM in the next post somewhere.
Brian
|
|
Top
|
|
|
|
#23509 - 2002-06-19 04:39 PM
Re: mapping network drives
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
welcome to the board...
Everyone, meet Donna. She just posted her first question... and it wasn't a poll
If you have any questions, feel free to ask... odds are you will have an answer (or several) in only a few minutes.
As a bit of a tip, be sure to include the version of kix you are using and the OS of your clients.
|
|
Top
|
|
|
|
#23510 - 2002-06-19 04:46 PM
Re: mapping network drives
|
Donnam
Fresh Scripter
Registered: 2002-06-19
Posts: 5
|
Heh heh thanks guys, I appreciate the fast response :-) and yes, have loads of questions as am still getting errors and stuffed if I can find out how the error log works - am using NT4 server and NT4 workstations and nothing comming up in event viewer? I quickly see a syntax error or something like that in the script and am trying to get it to "sleep" so I can read it but not happening - have RTFM'd but patience wore out as am not a programmer sorry (just know the basics)...
|
|
Top
|
|
|
|
#23514 - 2002-06-19 05:08 PM
Re: mapping network drives
|
Donnam
Fresh Scripter
Registered: 2002-06-19
Posts: 5
|
hmmm well nothing is working at all I'm sorry - it isn't a syntax error - it's a script error but still cannot capture it to give full description, as the /d doesn't work (just flashes command screen briefly and goes away) and get$ doesn't work as it is what Lonkero says... I am using the "USE" command instead of "net use"??? I don't have any problems running the sample scripts, but can't find any "IF INGROUP" examples etc? Am startig to feel girly :-(
|
|
Top
|
|
|
|
#23515 - 2002-06-19 05:16 PM
Re: mapping network drives
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Donna, it sounds like you are not executing your code in a DOS window. If you open a DOS window and execute your code "as kix32 scriptname.kix" then all the error text will remain on the screen for you to see.
If you post your code, we will take a look at it. Make sure you paste it between the code tags (clisk button "code" below edit window on the page).
|
|
Top
|
|
|
|
#23516 - 2002-06-19 05:35 PM
Re: mapping network drives
|
Donnam
Fresh Scripter
Registered: 2002-06-19
Posts: 5
|
Ok Howard, did what you said and it worked thanks :-) this is the error
code:
Script error : error in USE statement ! ENDIF
Hope this helps?
|
|
Top
|
|
|
|
#23517 - 2002-06-19 05:36 PM
Re: mapping network drives
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Post your script so we can take a peek.
|
|
Top
|
|
|
|
#23518 - 2002-06-19 05:45 PM
Re: mapping network drives
|
Donnam
Fresh Scripter
Registered: 2002-06-19
Posts: 5
|
Ok guys, thanks for all your help - you were wonderful, but have worked it out at last! It was the /y at the end of the USE command - I was using it in my old NT4 login batch file etc...obviously doesn't register in Kixtart! Cheers :-) Donna
|
|
Top
|
|
|
|
#23520 - 2002-06-20 04:41 AM
Re: mapping network drives
|
Mastub8r
Lurker
Registered: 2002-06-20
Posts: 1
|
New to the Forum but here is one that I wrote that seemed to work on NT4 server with 98/2k clients had to loop it several time to get it 2 work like I wanted. also pretty new to scripting so dont know if the codeing is correct or repitive
Break on
; Here we will define the variables used later $Server1 = "\\PIPEMCPNT1\" $Server2 = "\\PIPEMCPNT2\" $Server3 = "\\PIPEMCP2K1\" $Server4 = "\\PIPEMCP2K2\" $Server5 = "\\PIPEMCP2K4\"
Select Case InGroup("MOLDED\MAPPREQ") ;servername If InGroup("MOLDED\MAPPREQ") ;Domain and Group Use T: $server2 + "MAPPREQ" /persistent ;maps drive T to pipemcpnt2 share mappreq Else EndIf EndSelect ;Then it repeats 2 check for the next group the user might be in Select Case InGroup("MOLDED\DOCUMENT") If InGroup("MOLDED\DOCUMENT") Use T: $server2 + "DOCDEPT" /persistent Else EndIf EndSelect Select Case InGroup("MOLDED\MPQC") If InGroup("MOLDED\MPQC") Use T: $server2 + "DATA" /persistent Else EndIf EndSelect
Select Case InGroup("MOLDED\ENG") If InGroup("MOLDED\ENG") Use T: $server2 + "ENG" /persistent Else EndIf EndSelect Select Case InGroup("MOLDED\NETADMIN") If InGroup("MOLDED\NETADMIN") Use M: $server2 + "ADMIN" /persistent Use N: $server2 + "APPS" /persistent Use U: $server2 + "MAPPREQ" /persistent Use Y: $server2 + "SYS" /persistent Else EndIf EndSelect Sleep 1
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1452 anonymous users online.
|
|
|