SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Feb 2002
    Location
    UK
    Posts
    87
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    SQA - Get Computer Name

    Has anyone used the following function to get the computer name of the machine they are running on?

    Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA"
    (lpBuffer as String, nSize As Long)

    Should I be including a library file or something? Any information to help get me started would be appreciated

  2. #2
    Junior Member
    Join Date
    Dec 2004
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: SQA - Get Computer Name

    Use Robot's command Environ to get the computer name

    Dim sComputerName As String

    sComputerName = Environ("COMPUTERNAME")

  3. #3
    Member
    Join Date
    Feb 2002
    Location
    UK
    Posts
    87
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: SQA - Get Computer Name

    Thanks, that works well!

    Is there a similar command to get the machine's ip address?

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Location
    Montreal, QC, Canada
    Posts
    366
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: SQA - Get Computer Name

    Just run
    shell("ipconfig /Batch c:\ipvalue.txt")

    This will send the details to c:\ipvalue.txt then you can parse the file for your value as needed.

    0 Ethernet adapter :

    IP Address. . . . . . . . . : 555.555.55.555

    Max

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:50 PM.

Copyright BetaSoft Inc.