Results 1 to 3 of 3
  1. #1

    Problem mapping drive using SilkTest...

    Hello Everyone,

    I'm trying to create a function that will read a file to get the target machine drive and name of the machine. Then I need to check and see if the drive is mapped if not then map it and if it is mapped check to see if its active and if not then activate it... Does anyone know how to do this.

    P.S. I already know how to read the data from the file.

    I would gladly appreciate any ones help...

  2. #2

    Re: Problem mapping drive using SilkTest...

    Use SYS_SetDrive inside of a Do...Except to see if it's already mapped. You should land in the exception side of that if it isn't.

    As for mapping it, I'd just use a SYS_Execute and ("Net use") command.

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">[-] do
    [ ] // try it
    [ ] SYS_SetDrive (&quot;u&quot
    [-] except
    [ ] // if it's a system error
    [-] if (ExceptNum () == E_SYSTEM)
    [ ]
    [ ] // connect
    [ ] SYS_Execute (&quot;net use u: \\server\share password /USER:username&quot
    [ ]
    [-] else
    [ ]
    [ ] // whine
    [ ] reraise</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Bon chance.

    - Dave
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  3. #3

    Re: Problem mapping drive using SilkTest...

    Hello Again,

    I just wanted to say thank you. Your sugguestion worked out great...



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 07:15 PM.

Copyright BetaSoft Inc.