NSudo | Series of System Administration Tools | General Thread

Discussion in 'MDL Projects and Applications' started by Mouri_Naruto, Feb 6, 2015.

?

These things you maybe see in the future version of NSudo. What do you think about?

Poll closed Sep 13, 2019.
  1. Publish to Chocolatey? (Suggested by wwtex.)

    8 vote(s)
    66.7%
  2. Publish to scoop? (Suggested by wwtex.)

    1 vote(s)
    8.3%
  3. Publish to Windows Store? (Desktop Bridge.)

    3 vote(s)
    25.0%
  4. Add NSudo Configuration Editor?

    9 vote(s)
    75.0%
  5. Using Qt to implement the UI? (It may increase the binary size of NSudo.)

    3 vote(s)
    25.0%
  6. Compile NSudo with CMake?

    3 vote(s)
    25.0%
  7. Yes

    0 vote(s)
    0.0%
  8. No

    0 vote(s)
    0.0%
Multiple votes are allowed.
  1. Thomas Dubreuil

    Thomas Dubreuil MDL Senior Member

    Aug 29, 2017
    363
    620
    10
    #261 Thomas Dubreuil, Oct 5, 2018
    Last edited: Oct 18, 2018
    Hi Mouri_Naruto,
    Thanks a lot for your work, using it a lot, but Nsudo in Context menu doesn't work anymore since LTSC update, is it due to my settings or could be compatibility issue with v1809? (exe still works normal)
    here's my context menu (tweaked a bit):
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\exefile\shell\NSudo]
    "SubCommands"="NSudo.RunAs.TrustedInstaller;NSudo.RunAs.TrustedInstaller.EnableAllPrivileges;NSudo.RunAs.System;NSudo.RunAs.System.EnableAllPrivileges;"
    "MUIVerb"="NSudo"
    "Icon"="\"C:\\Program Files\\NSudo\\NSudo.exe\""
    "Position"="1"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell]
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.System]
    @="Run As System"
    "HasLUAShield"=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.System\command]
    @="\"C:\\Program Files\\NSudo\\NSudo.exe\" -U:S \"\"%1\"\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.System.EnableAllPrivileges]
    @="Run As System (Enable All Privileges)"
    "HasLUAShield"=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.System.EnableAllPrivileges\command]
    @="\"C:\\Program Files\\NSudo\\NSudo.exe\" -U:S -P:E \"\"%1\"\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.TrustedInstaller]
    @="Run As TrustedInstaller"
    "HasLUAShield"=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.TrustedInstaller\command]
    @="\"C:\\Program Files\\NSudo\\NSudo.exe\" -U:T \"\"%1\"\""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.TrustedInstaller.EnableAllPrivileges]
    @="Run As TrustedInstaller (Enable All Privileges)"
    "HasLUAShield"=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.TrustedInstaller.EnableAllPrivileges\command]
    @="\"C:\\Program Files\\NSudo\\NSudo.exe\" -U:T -P:E \"\"%1\"\""
    
    and for other users who might like, here's my json file (you can edit with notepad++
    Code:
    {
      "ShortCutList_V2": {
        "Registry Workshop": "C:\\PROGRA~1\\REGIST~1\\RegWorkshopX64.exe",
        "Explorer": "explorer",
        "Hosts": "notepad %windir%\\System32\\Drivers\\etc\\hosts",
        "Component Services": "comexp",
        "PowerShell": "powershell",
        "Task Scheduler": "taskschd",
        "CMD": "cmd"
      }
    }
    ps: using DOS names is a pain, hope it gets fixed in a next release ;)

    edit: seems right click/context menu only works when the app path has no space, this was working everywhere before
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,449
    90
    /hide would be appreciated @Mouri_Naruto.
     
  3. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Jul 10, 2014
    525
    1,791
    30
  4. Thomas Dubreuil

    Thomas Dubreuil MDL Senior Member

    Aug 29, 2017
    363
    620
    10
    #264 Thomas Dubreuil, Oct 10, 2018
    Last edited: Oct 10, 2018
    Found the problem, don't know why but theses values: \"\"%1\"\"" are inserted like this ""%1"" when I merge my .reg in registry, and both don't work (Windows LTSC)...
    But if I simply put "%1" instead, context menu works perfectly with space in path (or no space, either).

    So, new .reg :)

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\exefile\shell\NSudo]
    "SubCommands"="NSudo.RunAs.TrustedInstaller;NSudo.RunAs.TrustedInstaller.EnableAllPrivileges;NSudo.RunAs.System;NSudo.RunAs.System.EnableAllPrivileges;"
    "MUIVerb"="NSudo"
    "Icon"="\"C:\\Program Files\\NSudo\\NSudo.exe\""
    "Position"="1"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell]
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.System]
    @="Run As System"
    "HasLUAShield"=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.System\command]
    @="\"C:\\Program Files\\NSudo\\NSudo.exe\" -U:S "%1"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.System.EnableAllPrivileges]
    @="Run As System (Enable All Privileges)"
    "HasLUAShield"=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.System.EnableAllPrivileges\command]
    @="\"C:\\Program Files\\NSudo\\NSudo.exe\" -U:S -P:E "%1"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.TrustedInstaller]
    @="Run As TrustedInstaller"
    "HasLUAShield"=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.TrustedInstaller\command]
    @="\"C:\\Program Files\\NSudo\\NSudo.exe\" -U:T "%1"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.TrustedInstaller.EnableAllPrivileges]
    @="Run As TrustedInstaller (Enable All Privileges)"
    "HasLUAShield"=""
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\NSudo.RunAs.TrustedInstaller.EnableAllPrivileges\command]
    @="\"C:\\Program Files\\NSudo\\NSudo.exe\" -U:T -P:E "%1"
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Jul 10, 2014
    525
    1,791
    30
    Because I changed the command line parser. (Maybe.)
    I feel sorry.
     
  6. v72dd

    v72dd MDL Senior Member

    Nov 20, 2016
    445
    77
    10
    What status? :)
     
  7. v72dd

    v72dd MDL Senior Member

    Nov 20, 2016
    445
    77
    10
    Very good!
     
  8. v72dd

    v72dd MDL Senior Member

    Nov 20, 2016
    445
    77
    10
    Any news?
     
  9. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Jul 10, 2014
    525
    1,791
    30
    Roadmap of NSudo 6.1

    These things you will see in the NSudo 6.1.
    0. Change the way of process creation. (Breaking changes.) (Using ShellExecuteEx instead of “cmd /c start”)
    1. Add "ShowWindowMode" option in the command line usage. (Suggested by testtest322.)
    2. Add "RunAs" and "Mode" option in the command line usage.
    3. Provide "NSudo Manual.pdf". (Chinese only because I am not good at English.)

    Mouri
     
  10. Lehmer

    Lehmer MDL Novice

    Oct 29, 2018
    1
    0
    0
    I get a problem when I try to execute NSudo:

    Failed to get SE_DEBUG_NAME privilege.(Please run as Administrator).

    But I'm already running as admin... so I don´t have any idea of the reason of this error
     
  11. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Jul 10, 2014
    525
    1,791
    30
    It seems you are using the NSudoC.
    Run Command Prompt or PowerShell as Administrator, then call NSudoC in it.

    Mouri
     
  12. MonarchX

    MonarchX MDL Expert

    May 5, 2007
    1,732
    313
    60
    Can you please post compiled versions too? I am on LTSC 1809 and would love to test 1809 NSudo support!

    Have you figured out why for some .exe, the context menu option does not work, but launching NSudo.exe first and then the other .exe does work?
     
  13. rayleigh_otter

    rayleigh_otter MDL Expert

    Aug 8, 2018
    1,121
    933
    60
    UI for NSudo, thats why i like sordums power run.
     
  14. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,449
    90
  15. pf100

    pf100 Duct Tape Coder

    Oct 22, 2010
    2,069
    3,449
    90
    That's the problem. NSudoC won't hide command prompts run by NSudoC from the command line. Powerrun will.
     
  16. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Jul 10, 2014
    525
    1,791
    30
    @pf100 You should use NSudoG, same implementation of NSudoC, but without console window.

    Tip:
    NSudo.exe The GUI version, with command line support. (Windows Subsystem)
    NSudoG.exe The command line version for slient use. (Windows Subsystem)
    NSudoC.exe The command line version for console use. (Console Subsystem)