#23530 - 2002-06-19 06:55 PM
Not mapping network drives
|
Ariella
Lurker
Registered: 2002-06-19
Posts: 2
Loc: NJ
|
Hi everyone,
I've been using correct syntax for my script and it is running correctly, however the script is not mapping network drives. I'll post a copy of the script to see whether there's something wrong with it, but I don't think there is.
If I run from a cmd line, I can access each of these network drives through their path, so they are definitely pointing at the right place.
code:
use u: "\\hb2\STMusers\@userid$" use i: "\\hb2\apps"
IF INGROUP("HEALTHLABEL") use j: "\\hb2\stm\hlabel" ENDIF
IF INGROUP("TM1") use r: "\\hb2\P&T\data\F&A\FS\F&A\TM1DATA" ENDIF
IF INGROUP("SMD") use s: "\\hb2\stm\smd" ENDIF
IF INGROUP("CDTEST") use g: "\\hb2\stm\scitech" use q: "\\hb2\stm\netbip" ENDIF
Thanks!
Ariella. [ 19 June 2002, 18:58: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#23531 - 2002-06-19 07:04 PM
Re: Not mapping network drives
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
What OS is your client? Only W2K and XP can do deep mapping.
Add error checking to your script. code:
use u: "\\hb2\STMusers\@userid$" ? "\\hb2\STMusers\@userid$ @error @Serror" use i: "\\hb2\apps" ? "\\hb2\apps @error @Serror"
IF INGROUP("HEALTHLABEL") use j: "\\hb2\stm\hlabel" ? "\\hb2\apps @error @Serror" ENDIF
IF INGROUP("TM1") use r: "\\hb2\P&T\data\F&A\FS\F&A\TM1DATA" "\\hb2\P&T\data\F&A\FS\F&A\TM1DATA @error @Serror" ENDIF
IF INGROUP("SMD") use s: "\\hb2\stm\smd" "\\hb2\stm\smd @error @Serror" ENDIF
IF INGROUP("CDTEST") use g: "\\hb2\stm\scitech" "\\hb2\stm\scitech @error @Serror" use q: "\\hb2\stm\netbip" ENDIF
What is the result?
|
Top
|
|
|
|
#23532 - 2002-06-19 08:56 PM
Re: Not mapping network drives
|
Ariella
Lurker
Registered: 2002-06-19
Posts: 2
Loc: NJ
|
I tried adding the errors and found the problem. I'm using Win2k, so no problem there.
Thanks a lot.
Ariella.
|
Top
|
|
|
|
#23533 - 2002-06-20 12:54 AM
Re: Not mapping network drives
|
MCA
KiX Supporter
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
A wlecome to thoe the board.
Can you return your solution for the other readers of this board. Thanks, greetings.
|
Top
|
|
|
|
#23537 - 2002-06-21 05:17 PM
Re: Not mapping network drives
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
You're only problem, Duncan, was that you didn't use quotes:
Your code: USE y: \\$server.$path\$share
should work if it is:
USE Y: "\\$server.$path\$share"
Of course:
USE Y: "\\"+$server+"."+$path+"\"+$share
also works (as Darren pointed out).
The interesting thing about KiXtart is it allows you to insert single-dimensional objects into your string declarations via label.
$a = "hi" $b = "$a how are you?" ($b comes out as "hi how are you")
However, you cannot use arrays like that: $a[0]="hi" $b = "$a[0] how are you?" does not work.
COM object methods do not execute inside quotes, either.
Brian
|
Top
|
|
|
|
#23538 - 2002-06-21 06:54 PM
Re: Not mapping network drives
|
Johnh
Fresh Scripter
Registered: 2002-06-21
Posts: 5
Loc: Dayton, OH
|
I'm confused (and maybe disoriented too). The first drive mapping does NOT work. The rest work great. What am I missing? The first map is to an NT server, the rest to Win2k servers. I can accomplish same at cmd line via net use... ...any ideas?
;----------------------------------------------- ;GENERAL Drive Mappings ;----------------------------------------------- USE M: /DELETE USE M: "\\ntserver\HTFORGE" /PERSISTENT:YES ? "\\ntserver\HTFORGE @error @Serror"
USE P: /DELETE USE P: "\\TMMSERVER\PROGRESS" /PERSISTENT:YES ? "\\TMMSERVER\PROGRESS @error @Serror"
USE S: /DELETE USE S: "\\ZEUS\DTR" /PERSISTENT:YES ? "\\ZEUS\DTR @error @Serror"
USE T: /DELETE USE T: "\\TMMSERVER\TMM" /PERSISTENT:YES ? "\\TMMSERVER\TMM @error @Serror"
|
Top
|
|
|
|
#23539 - 2002-06-21 07:02 PM
Re: Not mapping network drives
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
You didn't tell what @error and @serror returned. That information would be helpful when trying to determine the problem with the "M:" drive use statement. [ 21 June 2002, 19:03: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#23540 - 2002-06-21 07:09 PM
Re: Not mapping network drives
|
Johnh
Fresh Scripter
Registered: 2002-06-21
Posts: 5
Loc: Dayton, OH
|
Sorry Howard,
The M: drive mapping will not return a message at all, the rest yield a success message.
Thanks for brainstorming with me (all I was coming up with was a light drizzle).
|
Top
|
|
|
|
#23541 - 2002-06-21 07:21 PM
Re: Not mapping network drives
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Please include more of your code. If the simple line code:
? "\\ntserver\HTFORGE @error @Serror"
doesn't print something larger than the USE statement is wrong.
Why are you using the Persistent switch? [ 21 June 2002, 19:22: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#23542 - 2002-06-21 07:30 PM
Re: Not mapping network drives
|
Johnh
Fresh Scripter
Registered: 2002-06-21
Posts: 5
Loc: Dayton, OH
|
I copied most of this stuff from a run-once script - the persistent switch doesn't make sense now (duh). I tried this with same results. Everything else works GREAT !
SETTITLE("HTI Login Script")
;----------------------------------------------- ;GENERAL Drive Mappings ;----------------------------------------------- USE M: /DELETE USE M: "\\ntserver\HTFORGE" ? "\\ntserver\HTFORGE @error @Serror"
USE P: /DELETE USE P: "\\TMMSERVER\PROGRESS" ? "\\TMMSERVER\PROGRESS @error @Serror"
USE S: /DELETE USE S: "\\ZEUS\DTR" ? "\\ZEUS\DTR @error @Serror"
USE T: /DELETE USE T: "\\TMMSERVER\TMM" ? "\\TMMSERVER\TMM @error @Serror"
USE Z: /DELETE USE Z: "\\ZEUS\PUBLIC" ? "\\ZEUS\PUBLIC @error @Serror"
;----------------------------------------------- ;GROUP Drive Mapping ;----------------------------------------------- IF INGROUP("Domain Admins") USE X: /DELETE USE X: "\\ZEUS\IT$" ? "\\ZEUS\IT$ @error @Serror" GOTO END ENDIF
|
Top
|
|
|
|
#23543 - 2002-06-21 07:37 PM
Re: Not mapping network drives
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Execute just this. What happens. code:
? "Delete Existing Drive M:" USE M: /DELETE /PERSISTENT ? "Delete M: @error @serror" ? "Map M:" USE M: "\\ntserver\HTFORGE" ? "\\ntserver\HTFORGE @error @Serror"
|
Top
|
|
|
|
#23544 - 2002-06-21 07:51 PM
Re: Not mapping network drives
|
Johnh
Fresh Scripter
Registered: 2002-06-21
Posts: 5
Loc: Dayton, OH
|
It works great! What happened? (sorry I'm a little slow) Is it the /persistent switch on the use m: /delete command?? Please help me understand. You've been a great help already
jh
|
Top
|
|
|
|
#23545 - 2002-06-21 08:07 PM
Re: Not mapping network drives
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Does your original script now work?
I always use the PERSISTENT switch when performing a delete because I have seen where if a drive was mapped with the Persistent switch either via script or manually the DELETE failed. I do not yet understand why your text line did not print. Maybe the USE /delete failure somehow screwed up the new to lines?
|
Top
|
|
|
|
#23547 - 2002-06-21 08:34 PM
Re: Not mapping network drives
|
Johnh
Fresh Scripter
Registered: 2002-06-21
Posts: 5
Loc: Dayton, OH
|
Got it. It works fine now. Thanks for sharing your brains !!! I really appreciate it!!
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 557 anonymous users online.
|
|
|