SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Mar 2010
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Get Drive Letter through VBScript

    Hi

    I am trying to write a batch script for my framework. Framework is driven through one QTP script.

    I want to call that QTP script through vbscript. Framework is based on relative path.

    I have coded a vbs but now I want the path from which vbs is executed.

    Like if run my QTP script i can use Environment("TestDir").

    Can i do the same in vbscript.
    Can i get the drive letter or the path from which the vbs is executed.

    Thanks!!
    Automation Test Engineer

  2. #2
    Advanced Member Anshoo Arora's Avatar
    Join Date
    Oct 2007
    Location
    New Delhi, India
    Posts
    635
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Get Drive Letter through VBScript

    You can parse the drive letter using WScript.ScriptFullName
    Regards,

    Anshoo Arora
    Relevant Codes

  3. #3
    Junior Member
    Join Date
    Jan 2011
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Get Drive Letter through VBScript

    set wshell = createobject("wscript.shell")
    print "Current Dir: " & wshell.currentdirectory

  4. #4
    Member
    Join Date
    Mar 2010
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Get Drive Letter through VBScript

    thx it worked.... [img]/images/graemlins/smile.gif[/img]
    Automation Test Engineer

 

 

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 7.14%
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 02:30 AM.

Copyright BetaSoft Inc.