Page 1 of 2 12>
Topic Options
#23530 - 2002-06-19 06:55 PM Not mapping network drives
Ariella Offline
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 Offline
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?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#23532 - 2002-06-19 08:56 PM Re: Not mapping network drives
Ariella Offline
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. [Smile]

Ariella.

Top
#23533 - 2002-06-20 12:54 AM Re: Not mapping network drives
MCA Offline
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.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#23534 - 2002-06-20 08:44 PM Re: Not mapping network drives
Dunc Offline
Getting the hang of it

Registered: 2002-05-25
Posts: 54
Loc: Guildford England
Hello,

I also seem to be having trouble with mapping drives. Please, It may be me do things wrong!

I am trying to map a drive, but getting the path to map to from a variable. Can this be done?

Here is a short script that indicates just what I am trying to do.

$Share = "Common"
$Path = "maff.gov.uk"
$server = "ITD001df"

USE T: \\ITD001df.maff.gov.uk\common ; This Works OK

USE y: \\$server.$path\$share ; This does not !

Thanks Duncan

Top
#23535 - 2002-06-20 09:26 PM Re: Not mapping network drives
Darren_W Offline
Hey THIS is FUN
*****

Registered: 2001-10-10
Posts: 208
Loc: Bristol, England
Hi,

Try this:

$mappath="\\"+$server+"."+$path+"\"+$share

USE y: $mappath

Darren

[ 20 June 2002, 21:32: Message edited by: Darren ]
_________________________
I want to share something with you - the three sentences that will get you through life.
Number 1, 'cover for me.'
Number 2, 'oh, good idea, boss.'
Number 3, 'it was like that when I got here'.

Top
#23536 - 2002-06-21 10:35 AM Re: Not mapping network drives
Dunc Offline
Getting the hang of it

Registered: 2002-05-25
Posts: 54
Loc: Guildford England
Thanks Darren,

That worked great, I had tried something like that, I must have missed something!!!

Thanks again.

Duncan

Top
#23537 - 2002-06-21 05:17 PM Re: Not mapping network drives
BrianTX Offline
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 Offline
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 Offline
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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#23540 - 2002-06-21 07:09 PM Re: Not mapping network drives
Johnh Offline
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 Offline
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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#23542 - 2002-06-21 07:30 PM Re: Not mapping network drives
Johnh Offline
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 Offline
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"

_________________________
Home page: http://www.kixhelp.com/hb/

Top
#23544 - 2002-06-21 07:51 PM Re: Not mapping network drives
Johnh Offline
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 Offline
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?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#23546 - 2002-06-21 08:19 PM Re: Not mapping network drives
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
Don't add :Yes to /Persisten in KiX

From batch or prompt:
Net use M: /Delete /Persisten:Yes

From KiX:
Use M: /Delete /Persistent

Top
#23547 - 2002-06-21 08:34 PM Re: Not mapping network drives
Johnh Offline
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
#23548 - 2002-06-21 08:48 PM Re: Not mapping network drives
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Check out http://81.17.37.55/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=004400&p= for my drive mapping and quick logging functions. They may simplify your life.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#23549 - 2002-06-24 06:56 PM Re: Not mapping network drives
Dunc Offline
Getting the hang of it

Registered: 2002-05-25
Posts: 54
Loc: Guildford England
Hi,

Can someone answer this?

Is there any reason that I can get Kix to map a drive using FQDN under Windows 2000/NT/XP, but cannot for Windows 98.

I am trying to rewrite a logon script that works for all three OS.

USE T: "\\ITD001df.maff.gov.uk\common"

Thanks

Duncan

Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Chris S., Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 151 anonymous users online.
Newest Members
MikeKrausnick, Ruggiero, xempa333, KroodjeBip, Thala
17470 Registered Users

Generated in 0.103 seconds in which 0.055 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org