run VBS from TCL

brahmadev
brahmadev Altair Community Member
edited October 2020 in Community Q&A

Hello Forum! 

 

I have been working on a project where it involves working of VBS as well as TCL. And before running the main logic in the TCL I want to run the VBS file from TCL using EXEC command but it was throwing some kind of error. I have a constraint of not using the batch file to run both the scripts individually. 

When I did a search on the internet I found that CScript or Wscript should be helping but while working with this command, it was of no help.

Can someone share the approach of solving this issue.

 

thanks and regards,

Brahmadev.

 

 

Answers

  • tinh
    tinh Altair Community Member
    edited June 2019

    Pls show your script

  • brahmadev
    brahmadev Altair Community Member
    edited June 2019

    Hello Tinh,

     

    I just need to run a vbs script from tcl as we run notepad application from tcl

     

    i tried with Cscript/Wscript but it was not working

     

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited June 2019

    Hello Tinh,

     

    I just need to run a vbs script from tcl as we run notepad application from tcl

     

    i tried with Cscript/Wscript but it was not working

     

     

    Do you try to search with Google yet?

    Try: http://code.activestate.com/lists/activetcl/2550/

    Thank you Google!

     

  • brahmadev
    brahmadev Altair Community Member
    edited June 2019

    Do you try to search with Google yet?

     

    Yeah! That was my first step way before posting this question in the forum

     

     

    This was the exact set of code I have tried in TCL but it was of no help.

     

    So i was just wondering do I need to install any external packages !

     

     

  • Roshan Shiveshwar
    Roshan Shiveshwar Altair Community Member
    edited June 2019

    Hello Forum! 

     

    I have been working on a project where it involves working of VBS as well as TCL. And before running the main logic in the TCL I want to run the VBS file from TCL using EXEC command but it was throwing some kind of error. I have a constraint of not using the batch file to run both the scripts individually. 

    When I did a search on the internet I found that CScript or Wscript should be helping but while working with this command, it was of no help.

    Can someone share the approach of solving this issue.

     

    thanks and regards,

    Brahmadev.

     

     

     

    Have you tried the following :

     exec cmd.exe /k '<vbs file path>'

     

     

  • brahmadev
    brahmadev Altair Community Member
    edited June 2019

    exec cmd.exe /k '<vbs file path>'

     

    Hey Roshan, thanks for the response....

    Actually I won't be having permissions to access the CMD  on my machine due to security. :mellow:/emoticons/default_mellow.png' title=':mellow:' />

  • tinh
    tinh Altair Community Member
    edited June 2019

     

    Hey Roshan, thanks for the response....

    Actually I won't be having permissions to access the CMD  on my machine due to security. :mellow:/emoticons/default_mellow.png' title=':mellow:' />

     

    Sure, if security is restricted you cannot run the interp

     

    How's about exec cscript.exe ? What is error?

  • brahmadev
    brahmadev Altair Community Member
    edited June 2019

    Hello guys,

     

    Thanks for your response.

     

    Actually, the cscript was working perfectly, thing was I didn't keep a reference file as input for the VBS file because of which error has occurred.

     

    Thanks and regards,

    Brahmadev.