Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Location
    India
    Posts
    41

    Unanswered: Calling Shell script from VB

    Hi ,

    I want to call the a unix shell script present in the remote sever
    using Visual Basic Application.

    Is it possible to invoke the shell script present in the remote server
    and get the output of the script in a Excel format.

    Pls Throw some light to this question.

    Thanks and Regds,
    Arun

  2. #2
    Join Date
    Mar 2004
    Posts
    10

    Re: Calling Shell script from VB

    Originally posted by arunprasadlv
    Hi ,

    I want to call the a unix shell script present in the remote sever
    using Visual Basic Application.

    Is it possible to invoke the shell script present in the remote server
    and get the output of the script in a Excel format.

    Pls Throw some light to this question.

    Thanks and Regds,
    Arun
    You may run a batch file from inside VB. The batch file in turn opens a telnet session with a server and calls the script. You can create an exclusive user in the unix box thro' which the telnet session will be logged in. The profile of this user will run the script on logging in. You may have to then copy (ftp?) the tab/comma separated file to the local machine and then to a Excel import through some OLE function.

    I guess, its very complicated and hence would suggest you to try simpler means of achieving what you would want.

  3. #3
    Join Date
    May 2004
    Posts
    5
    Yes definitely u can do that...


    Just use the call shell() function of VB.

    Using the I/O write a small batch file containing the
    rsh commands and pass that batch file name inthe call shell("batch file xx",1)

    It will be run
    e.g

    Call Shell("D:\HOM\FCISOURCE\FCI.bat", 1)

    the FCI.bat looks like
    rsh 97.241.94.226 -l rajib -n /omp/bin/DBsurvey -i /home/jlizama/QUERY.txt -o /home/rajib/fciall.xls
    ...

    I hope u got the idea

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •