#200059 - 2010-09-27 12:14 PM
it maps ok, it doesnt map ok.
|
baggies1
Fresh Scripter
Registered: 2010-05-13
Posts: 9
Loc: suffolk, england
|
i have recently created a new drive mapping.
a users account when logging onto the test machine will happily map the new drive.
frustratingly this doesnt happen on her own machine. this is the case with a number of our machines. she has no conflicting host entries, she has no conflicting drive letter conflict.
is there anything i could check?
|
|
Top
|
|
|
|
#200061 - 2010-09-27 12:18 PM
Re: it maps ok, it doesnt map ok.
[Re: Richard H.]
|
baggies1
Fresh Scripter
Registered: 2010-05-13
Posts: 9
Loc: suffolk, england
|
apologies but where is the error info (sorry bit of a newbie)
yes maps ok with net use command
|
|
Top
|
|
|
|
#200062 - 2010-09-27 12:21 PM
Re: it maps ok, it doesnt map ok.
[Re: baggies1]
|
baggies1
Fresh Scripter
Registered: 2010-05-13
Posts: 9
Loc: suffolk, england
|
this is my current map script with *** where my server name normally is the last drive is the one i'm having issues with. (N drive)use "*" /DELETE
use U: \\***\*** /persistent:no
use H: \\***\%username% /persistent:no
if ingroup("***01 users")
use s: "\\***\***"
endif
if ingroup("** users")
use V: "\\***\***03"
endif
if ingroup("*** users")
use W: "\\***\***04"
endif
if ingroup("***")
use X: "\\***\***"
endif
if ingroup("*** access")
use R: "\\***\***"
endif
if ingroup("*** access")
use t: "\\***\***"
endif
if ingroup("***Tdrive")
use t: /delete
use t: "\\***\***"
endif
if ingroup("*** access")
use i: "\\***\***"
endif
if ingroup("*** access")
use q: "\\***\***"
endif
if ingroup("** access")
use p: "\\***\**"
endif
if ingroup("*** access")
use p: /delete
use p: "\\***\***"
endif
if ingroup("***")
use M: "\\***\**"
endif
if ingroup("*** access")
use K: "\\***\***"
endif
if ingroup("*** access")
use j: "\\***\***"
endif
if ingroup("***")
use n: "\\***\***"
endif
Edited by Glenn Barnas (2010-09-27 12:25 PM) Edit Reason: added code tags
|
|
Top
|
|
|
|
#200064 - 2010-09-27 12:30 PM
Re: it maps ok, it doesnt map ok.
[Re: Glenn Barnas]
|
baggies1
Fresh Scripter
Registered: 2010-05-13
Posts: 9
Loc: suffolk, england
|
thanks
so like this
if ingroup("***")
use n: "\\***\***"
If @ERROR
@SERROR @CRLF
EndIf
so if an error does it appear onscreen? is logged in c drive somewhere?
|
|
Top
|
|
|
|
#200065 - 2010-09-27 12:59 PM
Re: it maps ok, it doesnt map ok.
[Re: baggies1]
|
baggies1
Fresh Scripter
Registered: 2010-05-13
Posts: 9
Loc: suffolk, england
|
If InGroup("mydomain\G-Mitarbeiter") Use P: /delete /persistent ? "Deleting P drive" ? @ERROR ? @SERROR Use P: "\\mydomain\dfs\projekte" ?"Mapping P drive." ? @ERROR ? @SERROR EndIf
taken from another script , this kinda look what i want.
i really need to dump the results to the users local c drive everytime they login to track mapping errors. where does the @error get recorded? onscreen is no good and i dont want each user having o hit the return key several times. also in my script i dont use my domain. should i?
Edited by baggies1 (2010-09-27 12:59 PM)
|
|
Top
|
|
|
|
#200068 - 2010-09-27 01:09 PM
Re: it maps ok, it doesnt map ok.
[Re: Glenn Barnas]
|
baggies1
Fresh Scripter
Registered: 2010-05-13
Posts: 9
Loc: suffolk, england
|
hmm yes that can be a problem cant it.
if the script crashes out half way through its only half job done..(my "end if's" causing the issues)
i'm trying to decyfer the kixstart bible but not entirely sure..
i still need to dump the results to the root of the c drive or something..
even if succesful...would be a good first line tool for issues on all pc's. and also wouldnt disturb the user.
what does the "?" do in the example above? dump to screen or some default file?
Edited by baggies1 (2010-09-27 01:11 PM)
|
|
Top
|
|
|
|
#200069 - 2010-09-27 01:22 PM
Re: it maps ok, it doesnt map ok.
[Re: baggies1]
|
baggies1
Fresh Scripter
Registered: 2010-05-13
Posts: 9
Loc: suffolk, england
|
i think my issue maybe caching.
the group my user should be a member of (and is in AD) isnt listed in the current user registry.
i've run wkix32.exe /f to flush the cache in the registry i re-ran the script but still didnt map the drive i wanted.
do i need to flush , then reboot first?
Edited by baggies1 (2010-09-27 01:24 PM)
|
|
Top
|
|
|
|
#200070 - 2010-09-27 02:10 PM
Re: it maps ok, it doesnt map ok.
[Re: baggies1]
|
Glenn Barnas
KiX Supporter
   
Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
|
The "?" is a shortcut for a CR/LF sequence, which is usually at the end of a line. Coders that are used to BASIC sometimes think of it as a PRINT statement, since "?" is a BASIC shortcut for PRINT. As such, it winds up at the beginning of the line.
Running Kix32 /f will flush the cache without needing a reboot, but the data is already cached for that sesssion. There are ways to manually flush the cache by deleting a registry key.
The SANITY UDF will scan your code and look for common errors in syntax, including mismatches of quotes, parens, and paired expressions like If/EndIf. Get the copy from my web site as it was updated recently and the copy here is over a year old.
A simple way to write a debug log is to use one of the message UDFs. I just posted fMsg() today. Define a global var called $MSG_LOG_ to point to the log file, then add $MsgTxt = 'this is a message... the error was' + @ERROR
fMsg($MsgTxt, , 0, 16) This will write the message only to the log file. You can even do something fancy:$MsgTxt = 'An error occurred while mapping drive D:'
$LogTxt = 'Drive D:, \\server\share, ' + @SERROR
$fMsg($MsgTxt, $LogTxt) which will write a short message to the screen and a more detailed message to the log.
Be sure to Del $Msg_Log_ after you define it, otherwise it will keep gathering data from each login session into a single file.
Glenn
_________________________
Actually I am a Rocket Scientist!
|
|
Top
|
|
|
|
#200071 - 2010-09-27 02:32 PM
Re: it maps ok, it doesnt map ok.
[Re: Glenn Barnas]
|
baggies1
Fresh Scripter
Registered: 2010-05-13
Posts: 9
Loc: suffolk, england
|
thanks for all your help Glen.
running the flush command on boot up fixed my issue.
there are no latency issues therefore i will run at each bootup.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 735 anonymous users online.
|
|
|