Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QtIFw: Deleteing a windows registry key with whitespace in name

QtIFw: Deleteing a windows registry key with whitespace in name

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 2 Posters 790 Views
  • 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
    Schenk
    wrote on 26 Nov 2018, 12:49 last edited by aha_1980
    #1

    Hi,

    i do not know how to delete a key in a windows registry, which has a whitspace in its name.

    The following snippet does not work, because of the whitspace.

    installer.execute(cmd, ["/c", "reg", ""DELETE", autostartPath, "/v", "Test test", "/f", "/reg:64"]);
    

    The windows shell want to have the "" around the key, so i did it, but no success.

    installer.execute(cmd, ["/c", "reg", ""DELETE", autostartPath, "/v", "\"Test test\"", "/f", "/reg:64"]);
    
    

    If i call the last line in a windows shell, it works:

    Admin-Windows shell:

    reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Test test" /f /reg:64
    
    K 1 Reply Last reply 26 Nov 2018, 13:15
    0
    • S Schenk
      26 Nov 2018, 12:49

      Hi,

      i do not know how to delete a key in a windows registry, which has a whitspace in its name.

      The following snippet does not work, because of the whitspace.

      installer.execute(cmd, ["/c", "reg", ""DELETE", autostartPath, "/v", "Test test", "/f", "/reg:64"]);
      

      The windows shell want to have the "" around the key, so i did it, but no success.

      installer.execute(cmd, ["/c", "reg", ""DELETE", autostartPath, "/v", "\"Test test\"", "/f", "/reg:64"]);
      
      

      If i call the last line in a windows shell, it works:

      Admin-Windows shell:

      reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Test test" /f /reg:64
      
      K Offline
      K Offline
      koahnig
      wrote on 26 Nov 2018, 13:15 last edited by
      #2

      @Schenk said in QtIFw: Deleteing a windwos registry key with whitespace in name:

      The following snippet does not work, because of the whitspace.

      installer.execute(cmd, ["/c", "reg", ""DELETE", autostartPath, "/v", "Test test", "/f", "/reg:64"]);
      

      The windwos shell want to have the "" around the key, so i did it, but no success.

      installer.execute(cmd, ["/c", "reg", ""DELETE", autostartPath, "/v", "\"Test test\"", "/f", "/reg:64"]);
      
      

      Is this only a typing error in the post or a copy of your actual trials?
      Check the duplicated double quotes before DELETE

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Schenk
        wrote on 26 Nov 2018, 13:18 last edited by Schenk
        #3

        It is only a typing error in the post, because i typed this in ;)

        1 Reply Last reply
        0

        1/3

        26 Nov 2018, 12:49

        • 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