Page 1 of 1 1
Topic Options
#206839 - 2013-03-01 04:19 PM error in USE statement!
TonyF Offline
Just in Town

Registered: 2013-02-22
Posts: 2
Loc: Colorado
Hello. Having an issue with this script. Not sure where the issue is. This is my first time posting here so please let me know if you need more information. Thanks!

 Code:
if $mount<>'*'
        use $mount /delete /persistent
      endif
      if $persist
        if $user or $pass
          use $mount $unc /user:$user /password:$pass /persistent
        else
          use $mount $unc /persistent
        endif [b]<----This is the line where it's failing[/b]
      else
        if $user or $pass
          use $mount $unc /user:$user /password:$pass
        else
          use $mount $unc
        endif
      endif

Top
#206841 - 2013-03-01 04:28 PM Re: error in USE statement! [Re: TonyF]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
I don't see anything right off the bat. Are you getting an error message?

The only thing that strikes me odd is this... "if $user or $pass" ...Would think it should be... "if $user AND $pass"

Top
#206842 - 2013-03-01 04:28 PM Re: error in USE statement! [Re: ShaneEP]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
Also, what are the $mount and $unc and $persist being set to?
Top
#206844 - 2013-03-01 04:43 PM Re: error in USE statement! [Re: ShaneEP]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
I ran your code here pointing a server\share and it worked fine with or without using credentials...

I did however get an error the first time I tried, about connecting to the same share with multiple credentials. Once I changed the mapping to the IP of the server, then it worked fine. This may be the same issue you are having?

Top
#206845 - 2013-03-01 05:04 PM Re: error in USE statement! [Re: ShaneEP]
TonyF Offline
Just in Town

Registered: 2013-02-22
Posts: 2
Loc: Colorado
Thank you. You got me on the right track with that error! It was one of the drives I was mapping that was the problem. Genius. I greatly appreciate it.
Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 323 anonymous users online.
Newest Members
Audio, Hoschi, Comet, rrosell, PatrickPinto
17880 Registered Users

Generated in 0.122 seconds in which 0.065 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