Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    QProcess unable to open .vbs file !!

    Tools
    2
    9
    4509
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rajatgupta431 last edited by

      Am trying to open a .vbs file using startDetached() ; of QProcess.....its not opening the file...whereas it is able to open the batch file which lies in same working directory ...Please Help :)

      1 Reply Last reply Reply Quote 0
      • sierdzio
        sierdzio Moderators last edited by

        How should QProcess know how to run the file? It is a binary executable? If not, you need to specify an application that can open it.

        (Z(:^

        1 Reply Last reply Reply Quote 0
        • R
          rajatgupta431 last edited by

          Can you suggest me a way to open a .vbs file in the working directory from the Qt application?

          1 Reply Last reply Reply Quote 0
          • sierdzio
            sierdzio Moderators last edited by

            I do not know what a .vbs file is.

            (Z(:^

            1 Reply Last reply Reply Quote 0
            • R
              rajatgupta431 last edited by

              its just a Visual Basic script.....if i give a system() command from code to execute the file it does the work...but don't want to use system() function...

              1 Reply Last reply Reply Quote 0
              • sierdzio
                sierdzio Moderators last edited by

                Visual Basic needs to have some interpreter somewhere, I imagine. You need to run that interpreter and pass the file as an argument. I'm not using VB so I can't really say anything more constructive. Or switch to a decent scripting language like Python, Lua, bash, etc.

                (Z(:^

                1 Reply Last reply Reply Quote 0
                • R
                  rajatgupta431 last edited by

                  Actually i have to run a batch file that open cmd....so i am using a Vbscript to silently open the batch file without opening the cmd. But for opening the .vbs file even i am bound to use system() if it doesn't open with QProcess.

                  1 Reply Last reply Reply Quote 0
                  • sierdzio
                    sierdzio Moderators last edited by

                    You can open cmd silently with QProcess, AFAIK. But I'm not a Windows guru, so I can't be sure. As in many other situations, those things are quite easy in Unix.

                    (Z(:^

                    1 Reply Last reply Reply Quote 0
                    • R
                      rajatgupta431 last edited by

                      its ok ...thanks for the help....looking on for more replies :)

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post