Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Batch script not working properly when executed thru Qt-application.
Forum Updated to NodeBB v4.3 + New Features

Batch script not working properly when executed thru Qt-application.

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 404 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    Surviv0r
    wrote on 21 Nov 2018, 08:56 last edited by
    #1

    Now before we start, I want to say that I do not have any extensive knowledge of Qt or C++, so please try and explain things in a simple way. I know some terminology, but I am in no way good at this :)

    So I have a Batch script that retrieves the latest Windows updates using delims, token and things like that. Now, the script works perfectly when executed independantly with Admin rights, but when the Qt-application tries to execute said script, it returns an error: 0x8000ffff. To clarify, this is a Windows error and seems to point towards corrupted files, but this can't be the case as the script does not complain independatly.

    My Qt-application requires Admin rights and should work normally, but this is not the case. Anyone have an idea?

    J 1 Reply Last reply 21 Nov 2018, 18:31
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 21 Nov 2018, 16:05 last edited by
      #2

      Hi
      I would add check to bat to see if the Qts admin rights are
      carried over to the .bat file. (im not sure of that)
      https://stackoverflow.com/questions/4051883/batch-script-how-to-check-for-admin-rights

      1 Reply Last reply
      1
      • S Surviv0r
        21 Nov 2018, 08:56

        Now before we start, I want to say that I do not have any extensive knowledge of Qt or C++, so please try and explain things in a simple way. I know some terminology, but I am in no way good at this :)

        So I have a Batch script that retrieves the latest Windows updates using delims, token and things like that. Now, the script works perfectly when executed independantly with Admin rights, but when the Qt-application tries to execute said script, it returns an error: 0x8000ffff. To clarify, this is a Windows error and seems to point towards corrupted files, but this can't be the case as the script does not complain independatly.

        My Qt-application requires Admin rights and should work normally, but this is not the case. Anyone have an idea?

        J Offline
        J Offline
        JonB
        wrote on 21 Nov 2018, 18:31 last edited by JonB
        #3

        @Surviv0r
        It may be that your issue is to do with "admin rights", but how do you know? (Are you saying you have tried running without admin right outside of Qt and you get the same error?) My first thought would be lots of things may be different in the environment between "executing independently" versus "from within some Qt application". With something like Windows Update who knows what might matter....

        Let's at least start with: is your Qt a command-line app (try that), or is it a GUI?

        1 Reply Last reply
        2

        1/3

        21 Nov 2018, 08:56

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved