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. abbodi1406

    abbodi1406 MDL KB0000001

    Joined:
    Feb 19, 2011
    Messages:
    12,067
    Likes Received:
    55,424
    Trophy Points:
    340
    The short names are better :)
     
  2. bou7a

    bou7a MDL Junior Member

    Joined:
    Aug 6, 2018
    Messages:
    85
    Likes Received:
    70
    Trophy Points:
    0
    I'm agree with you, short names are better :thumbsup:
     
  3. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Joined:
    Jul 10, 2014
    Messages:
    416
    Likes Received:
    1,409
    Trophy Points:
    10
    I will use the short names,
     
  4. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Joined:
    Jul 10, 2014
    Messages:
    416
    Likes Received:
    1,409
    Trophy Points:
    10
  5. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Joined:
    Jul 10, 2014
    Messages:
    416
    Likes Received:
    1,409
    Trophy Points:
    10
    NSudo Launcher .Net Interop 8.0 PreAlpha 3

    Usage:
    Code:
    using System;
    
    namespace M2.NSudo.Demo
    {
        class Program
        {
            static void Main(string[] args)
            {
                NSudoInstance instance = new NSudoInstance();
    
                instance.CreateProcess(
                    NSUDO_USER_MODE_TYPE.TRUSTED_INSTALLER,
                    NSUDO_PRIVILEGES_MODE_TYPE.ENABLE_ALL_PRIVILEGES,
                    NSUDO_MANDATORY_LABEL_TYPE.SYSTEM,
                    NSUDO_PROCESS_PRIORITY_CLASS_TYPE.NORMAL,
                    NSUDO_SHOW_WINDOW_MODE_TYPE.DEFAULT,
                    0,
                    true,
                    "cmd",
                    null);
    
                Console.ReadKey();
            }
        }
    }
    
    I hope you like it. @MSMG

    P.S. Everything may be changed before NSudo 8.0 Stable.

    Kenji Mouri
     

    Attached Files:

  6. bou7a

    bou7a MDL Junior Member

    Joined:
    Aug 6, 2018
    Messages:
    85
    Likes Received:
    70
    Trophy Points:
    0
    Thanks, @Mouri_Naruto for awesome tool.

    I have small quistion.

    Can i use NSudoC.exe without shared DLLs?
    'NSudoAPI.dll' and 'NSudoUX.dll'

    Good luck, Sir.
     
  7. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Joined:
    Jul 10, 2014
    Messages:
    416
    Likes Received:
    1,409
    Trophy Points:
    10
  8. bou7a

    bou7a MDL Junior Member

    Joined:
    Aug 6, 2018
    Messages:
    85
    Likes Received:
    70
    Trophy Points:
    0
  9. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Joined:
    Jul 10, 2014
    Messages:
    416
    Likes Received:
    1,409
    Trophy Points:
    10
    I will release NSudo 8.0 stable in the recent days because I don't want everyone to continue to wait.

    I need to update some documents.

    The AppVeyor CI and GitHub CI compile bugs won't be fixed until the next version.

    Maybe some bugs in NSudo 6.2 have not fixed because I forget that and NSudo 8.0 changes a lot. I am sorry. I hope you can feedback again if you meet these in 8.0 again.

    Something like Windows Longhorn. Wait for long time. I am sorry about that.

    Next version of NSudo will be 8.1.

    Kenji Mouri
     
  10. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Joined:
    Jul 10, 2014
    Messages:
    416
    Likes Received:
    1,409
    Trophy Points:
    10
  11. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Joined:
    Jul 10, 2014
    Messages:
    416
    Likes Received:
    1,409
    Trophy Points:
    10
  12. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Joined:
    Jul 10, 2014
    Messages:
    416
    Likes Received:
    1,409
    Trophy Points:
    10
    #472 Mouri_Naruto, Mar 8, 2020
    Last edited: Mar 8, 2020
    (OP)
    Some notes

    Next version of NSudo will be 8.1.

    I will add features (run as App Container, run as other users and etc) in NSudo Launcher and NSudo Shared Library (I will keep a stable NSudo Shared Library ABI in NSudo 8.1).

    I will introduce a new standalone component called NSudo Cleaner, a cleanup tool like CCleaner but more lightweight and cleaner. It will support file and registry cleanup by cleanup items for the maximum safe. The format of the rule file I will choose the TOML because it looks easy to modify via notepad and nano. The reason I will introduce it is that I think some cleaners like CCleaner, WinOptimizer, Dism++ and etc is too heavy. I want to make a lightweight and easy to use tool like cleanmgr.exe, but it's more powerful. I also hope more and more people can create cleanup rule PRs for NSudo Cleaner in the future.

    What do you think about that?

    Kenji Mouri
     
  13. avyaan.coehn

    avyaan.coehn MDL Novice

    Joined:
    Mar 9, 2020
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    How do I run cmd file?

    Code:
    "%~dp0bin\bin\NSudo\x64\NSudoLG.exe" -U:T -P:E "%~dpscript_x64.cmd"
    This does not work!
     
  14. Thomas Dubreuil

    Thomas Dubreuil MDL Senior Member

    Joined:
    Aug 29, 2017
    Messages:
    357
    Likes Received:
    594
    Trophy Points:
    10
    you can run LC instead of LG (and don't forget the 0)
    Code:
    "%NSudopath%\NSudoLC.exe" -U:T -P:E "%~dp0script_x64.cmd"
    or run your script directly and put NSudo command inside your script like this:
    Code:
    C:\Windows\system32\whoami.exe /USER | find /i "S-1-5-18" 1>nul && (
        goto :START
    ) || (
        "%NSudopath%\NSudoLC.exe" -U:T -P:E -Wait -UseCurrentConsole "%~dpnx0"&& exit /b
    )
    
    :START
     
  15. boyonthebus

    boyonthebus MDL Addicted

    Joined:
    Sep 16, 2018
    Messages:
    917
    Likes Received:
    573
    Trophy Points:
    30
    Put this in a command script and save. Run as admin. This will get you right-click run with trusted installer on desktop, and elsewhere. It will open in current folder.
    Code:
    reg add "HKCR\LibraryFolder\background\shell\runas" /v "HasLUAShield" /t REG_SZ /d "" /f
    reg add "HKCR\LibraryFolder\background\shell\runas" /ve /t REG_SZ /d "Command as Trusted Installer" /f
    reg add "HKCR\LibraryFolder\background\shell\runas\command" /ve /t REG_SZ /d "NsudoLG.exe -U:T -P:E cmd.exe /s /k \"pushd \"\"%%V\"\"" /f
    reg add "HKCR\Directory\background\shell\runas" /ve /t REG_SZ /d "Command as Trusted Installer" /f
    reg add "HKCR\Directory\background\shell\runas" /v "HasLUAShield" /t REG_SZ /d "" /f
    reg add "HKCR\Directory\background\shell\runas\command" /ve /t REG_SZ /d "NsudoLG.exe -U:T -P:E cmd.exe /s /k \"pushd \"\"%%V\"\"" /f
    reg add "HKCR\Directory\shell\runas" /ve /t REG_SZ /d "Command as Trusted Installer" /f
    reg add "HKCR\Directory\shell\runas" /v "HasLUAShield" /t REG_SZ /d "" /f
    reg add "HKCR\Directory\shell\runas\command" /ve /t REG_SZ /d "NsudoLG.exe -U:T -P:E cmd.exe /s /k \"pushd \"\"%%V\"\"" /f
    reg add "HKCR\Drive\shell\runas" /ve /t REG_SZ /d "Command as Trusted Installer" /f
    reg add "HKCR\Drive\shell\runas" /v "HasLUAShield" /t REG_SZ /d "" /f
    reg add "HKCR\Drive\shell\runas\command" /ve /t REG_SZ /d "NsudoLG.exe -U:T -P:E cmd.exe /s /k \"pushd \"\"%%V\"\"" /f
    reg add "HKCR\LibraryFolder\background\shell\runas" /v "HasLUAShield" /t REG_SZ /d "" /f
    reg add "HKCR\LibraryFolder\background\shell\runas" /ve /t REG_SZ /d "Command as Trusted Installer" /f
    reg add "HKCR\LibraryFolder\background\shell\runas\command" /ve /t REG_SZ /d "NsudoLG.exe -U:T -P:E cmd.exe /s /k \"pushd \"\"%%V\"\"" /f
    reg add "HKCR\Directory\background\shell\runas" /ve /t REG_SZ /d "Command as Trusted Installer" /f
    reg add "HKCR\Directory\background\shell\runas" /v "HasLUAShield" /t REG_SZ /d "" /f
    reg add "HKCR\Directory\background\shell\runas\command" /ve /t REG_SZ /d "NsudoLG.exe -U:T -P:E cmd.exe /s /k \"pushd \"\"%%V\"\"" /f
    reg add "HKCR\Directory\shell\runas" /ve /t REG_SZ /d "Command as Trusted Installer" /f
    reg add "HKCR\Directory\shell\runas" /v "HasLUAShield" /t REG_SZ /d "" /f
    reg add "HKCR\Directory\shell\runas\command" /ve /t REG_SZ /d "NsudoLG.exe -U:T -P:E cmd.exe /s /k \"pushd \"\"%%V\"\"" /f
    reg add "HKCR\Drive\shell\runas" /ve /t REG_SZ /d "Command as Trusted Installer" /f
    reg add "HKCR\Drive\shell\runas" /v "HasLUAShield" /t REG_SZ /d "" /f
    reg add "HKCR\Drive\shell\runas\command" /ve /t REG_SZ /d "NsudoLG.exe -U:T -P:E cmd.exe /s /k \"pushd \"\"%%V\"\"" /f
    pause
    
     
  16. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Joined:
    Jul 10, 2014
    Messages:
    416
    Likes Received:
    1,409
    Trophy Points:
    10
  17. bou7a

    bou7a MDL Junior Member

    Joined:
    Aug 6, 2018
    Messages:
    85
    Likes Received:
    70
    Trophy Points:
    0
    #477 bou7a, Mar 15, 2020
    Last edited: Mar 15, 2020
    Thanks, @Mouri_Naruto for awesome tool.

    I have 2 suggestions.
    Please, Can you adding button named 'Exit'.
    For low risks, make TrustedInstaller is not default choose.

    Untitled.png

    Good luck, Sir.
    Sorry for bad english I'm using google translator.
     
  18. Mouri_Naruto

    Mouri_Naruto MDL Developer

    Joined:
    Jul 10, 2014
    Messages:
    416
    Likes Received:
    1,409
    Trophy Points:
    10
    I don't think it's necessary to set an "Exit" button because you can close the window directly.
    Also, NSudo is a tool for advanced users, and I don't know which option is wise to set to the default option.
     
  19. bou7a

    bou7a MDL Junior Member

    Joined:
    Aug 6, 2018
    Messages:
    85
    Likes Received:
    70
    Trophy Points:
    0
    O.K. no problems it's just suggestions nothing else.
    it's exactly perfect.

    Thanks, @Mouri_Naruto :thumbsup:
     
  20. Thomas Dubreuil

    Thomas Dubreuil MDL Senior Member

    Joined:
    Aug 29, 2017
    Messages:
    357
    Likes Received:
    594
    Trophy Points:
    10