|
|
|||||||
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:Thanks!use u: "\\hb2\STMusers\@userid$" Ariella. [ 19 June 2002, 18:58: Message edited by: Howard Bullock ] |
||||||||
|
|
|||||||
What OS is your client? Only W2K and XP can do deep mapping. Add error checking to your script. code:What is the result?use u: "\\hb2\STMusers\@userid$" |
||||||||
|
|
|||||||
I tried adding the errors and found the problem. I'm using Win2k, so no problem there. Thanks a lot. Ariella. |
||||||||
|
|
|||||||
Dear, A wlecome to thoe the board. Can you return your solution for the other readers of this board. Thanks, greetings. |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
Hi, Try this: $mappath="\\"+$server+"."+$path+"\"+$share USE y: $mappath Darren [ 20 June 2002, 21:32: Message edited by: Darren ] |
||||||||
|
|
|||||||
Thanks Darren, That worked great, I had tried something like that, I must have missed something!!! Thanks again. Duncan |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
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" |
||||||||
|
|
|||||||
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 ] |
||||||||
|
|
|||||||
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). |
||||||||
|
|
|||||||
Please include more of your code. If the simple line code:doesn't print something larger than the USE statement is wrong.? "\\ntserver\HTFORGE @error @Serror" Why are you using the Persistent switch? [ 21 June 2002, 19:22: Message edited by: Howard Bullock ] |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
Execute just this. What happens. code:? "Delete Existing Drive M:" |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
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? |
||||||||
|
|
|||||||
Don't add :Yes to /Persisten in KiX From batch or prompt: Net use M: /Delete /Persisten:Yes From KiX: Use M: /Delete /Persistent |
||||||||
|
|
|||||||
Got it. It works fine now. Thanks for sharing your brains !!! I really appreciate it!! |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
Windows 9x doesn't support mappings that way. It can only use NETBIOS names. Brian |
||||||||
|
|
|||||||
Do you have the AD client installed? If not, I wonder if it would make the difference. |
||||||||
|
|
|||||||
LLigetfa, No we don't have the AD client loaded. We are still using an NT4 domain, but I may try loading it, ready for AD which will take years at the rate we're going!!!! Brian, That was the conclusion that I had come to, however if you use the net use command, it works fine. (I was trying not to shell out of kix!) Thanks for the help Duncan |