Results 1 to 3 of 3

Thread: Loading Library at Run time (.vbs file)

  1. #1
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Loading Library at Run time (.vbs file)

    Hi,
    I want to laod .vbs file using script.

    For e.g my test is open, i have abc.vbs file that is not attached till now. so i want to make general function which will load that .vbs file into Test setting -> Resources -> loading that .vbs file from particular path


    [This question was asked by Jitesh Sojitra....]


  2. #2
    Expert Member
    Join Date
    Sep 2005
    Answers
    206

    Re: Loading Library at Run time (.vbs file)

    Quote Originally Posted by psuresh1982 View Post
    Hi,
    I want to laod .vbs file using script.

    For e.g my test is open, i have abc.vbs file that is not attached till now. so i want to make general function which will load that .vbs file into Test setting -> Resources -> loading that .vbs file from particular path


    [This question was asked by Jitesh Sojitra....]
    here is the sample code ...

    dim index as integer
    index = Shell(path, AppWinStyle.Normal, True)

    Dim ShellProcess as new Process

    Try
    ShellProcess.StartInfo.FileName = path
    ShellProcess.StartInfo.UseShellExecute = True
    ShellProcess.Start()
    ShellProcess.WaitForExit()
    Catch....
    Finally
    ShellProcess.Dispose()
    End Try

    Let me know if this helps...

    Thanks,
    Suji


  3. #3
    Expert Member
    Join Date
    Sep 2005
    Answers
    206

    Re: Loading Library at Run time (.vbs file)

    another way of doing in old vb way if you don't want to use process object from vb.net ...

    dim WShShell, RetCode
    Set WShShell = Server.CreateObject("WScript.Shell")
    RetCode = WShShell.Run("C:\TEST.vbs",1, True)
    response.write RetCode
    set WShShell = nothing


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact