[Script] Windows 10 TNBT (The next big Tweak) v6.5.6 -official thread-

Discussion in 'Windows 10' started by uniQ168, Aug 2, 2015.

  1. kronflux

    kronflux MDL Member

    Joined:
    May 11, 2011
    Messages:
    112
    Likes Received:
    22
    Trophy Points:
    10
    #261 kronflux, Sep 5, 2016
    Last edited by a moderator: Apr 20, 2017
    Odd! I use it in all my scripts that require elevation, and have never run into issues. As far as I can tell, the only real difference is that it uses the architecture appropriate cacls, and uses cmd to launch the vbs script created.

    Perhaps a conflict with something else, or it didn't get copied correctly?
    regardless, if you change
    Code:
    set params = %*:"=""
    echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
    back to
    Code:
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
    it should work, seems whatever is causing the issue doesn't like that cmd launch.

    As you said, it's not -necessary- but it is nice to use the appropriate method. *shrug*

    Thanks for taking my input into mind though! like I said, project definitely has potential. :)
     
  2. zamica

    zamica MDL Member

    Joined:
    Oct 1, 2012
    Messages:
    147
    Likes Received:
    21
    Trophy Points:
    10
    thanks for keeping it updated
     
  3. uniQ168

    uniQ168 MDL Junior Member

    Joined:
    Jul 18, 2015
    Messages:
    75
    Likes Received:
    319
    Trophy Points:
    0
    #263 uniQ168, Sep 6, 2016
    Last edited by a moderator: Apr 20, 2017
    (OP)
    No problem. Like I said, I welcome any kind of feedback.

    "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system" will always cause a loop, you might try it yourself. Definitely not working this way. ;)
     
  4. kronflux

    kronflux MDL Member

    Joined:
    May 11, 2011
    Messages:
    112
    Likes Received:
    22
    Trophy Points:
    10
    #264 kronflux, Sep 6, 2016
    Last edited by a moderator: Apr 20, 2017
    Hmm. So I just noticed in some of my VM's that some OS's I'm using have 64-bit registry files present, and some do not. And those which do, still have the 32-bit registry present(who knows which is actually used, but the point is that all we're doing is checking if we have access to a particular file that we know exists) So the only check you'd really have to do is for CACLS..
    Code:
    IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
    IF EXIST "%SYSTEMROOT%\SysWOW64\cacls.exe" (
    >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\System32\config\system"
    ) ELSE (
    >nul 2>&1 "%SYSTEMROOT%\System32\cacls.exe" "%SYSTEMROOT%\System32\config\system"
    ))
    (or if you wanted to be REALLY thorough, you could do a full check)
    Code:
    IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
    IF EXIST "%SYSTEMROOT%\SysWOW64\cacls.exe" (
    IF EXIST "%SYSTEMROOT%\SysWOW64\config\system" (
    >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
    ) ELSE (
    >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\System32\config\system"
    )) ELSE (
    >nul 2>&1 "%SYSTEMROOT%\System32\cacls.exe" "%SYSTEMROOT%\System32\config\system"
    ))
    Sorry about that. I hadn't thought of the possibility that the OS may not have those files present, but would have 64-bit CACLS present.
    Since we didn't have a check in there at all, it would just keep trying..


    Full thorough code:
    Code:
    :: BatchGotAdmin
    :-------------------------------------
    REM  --> Check for permissions
    IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
    IF EXIST "%SYSTEMROOT%\SysWOW64\cacls.exe" (
    IF EXIST "%SYSTEMROOT%\SysWOW64\config\system" (
    >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
    ) ELSE (
    >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\System32\config\system"
    )) ELSE (
    >nul 2>&1 "%SYSTEMROOT%\System32\cacls.exe" "%SYSTEMROOT%\System32\config\system"
    ))
    
    REM --> If error flag set, we do not have admin.
    if '%errorlevel%' NEQ '0' (
        echo Requesting administrative privileges...
        goto UACPrompt
    ) else ( goto gotAdmin )
    
    :UACPrompt
        echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
        set params = %*:"=""
        echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
        "%temp%\getadmin.vbs"
        del "%temp%\getadmin.vbs"
        exit /B
    :gotAdmin
        if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
        pushd "%CD%"
        CD /D "%~dp0"
    :--------------------------------------
     
  5. Hadron-Curious

    Hadron-Curious MDL Guru

    Joined:
    Jul 4, 2014
    Messages:
    3,657
    Likes Received:
    569
    Trophy Points:
    120
    Where is the link to the full ''source code'' after making changes?
     
  6. zylor

    zylor MDL Junior Member

    Joined:
    Feb 25, 2012
    Messages:
    82
    Likes Received:
    30
    Trophy Points:
    0
  7. uniQ168

    uniQ168 MDL Junior Member

    Joined:
    Jul 18, 2015
    Messages:
    75
    Likes Received:
    319
    Trophy Points:
    0
  8. Hadron-Curious

    Hadron-Curious MDL Guru

    Joined:
    Jul 4, 2014
    Messages:
    3,657
    Likes Received:
    569
    Trophy Points:
    120
  9. uniQ168

    uniQ168 MDL Junior Member

    Joined:
    Jul 18, 2015
    Messages:
    75
    Likes Received:
    319
    Trophy Points:
    0
  10. AnimaliX

    AnimaliX MDL Novice

    Joined:
    Jul 28, 2009
    Messages:
    44
    Likes Received:
    23
    Trophy Points:
    0
    #270 AnimaliX, Sep 7, 2016
    Last edited by a moderator: Apr 20, 2017
    Hello.

    Code:
    Scheduled Tasks Tweaks:
    - Disables all default Windows tasks
    is this really good thing to do? :)
     
  11. uniQ168

    uniQ168 MDL Junior Member

    Joined:
    Jul 18, 2015
    Messages:
    75
    Likes Received:
    319
    Trophy Points:
    0
    #271 uniQ168, Sep 7, 2016
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Sorry for the confusion. Not all tasks get disabled, only the unneeded ones link telemetry/feedback/error-reporting. Will change this in OP now.
     
  12. jasongenova

    jasongenova MDL Junior Member

    Joined:
    Jan 23, 2016
    Messages:
    75
    Likes Received:
    20
    Trophy Points:
    0
    Did OP abandon ship?
     
  13. uniQ168

    uniQ168 MDL Junior Member

    Joined:
    Jul 18, 2015
    Messages:
    75
    Likes Received:
    319
    Trophy Points:
    0
    Updated to v6.4 with some fixes here and there. ;)
    I will work on a better way to autorun the anti-ransomware script.

    Nope, I was just busy the last few days.
     
  14. Dycedarg

    Dycedarg MDL Novice

    Joined:
    Dec 20, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Cant write on Microsoft Edge or Wifi Settings

    After apply the option Scheduled Tasks Tweaks i cant write in edge browser or if i have to write wifi password.:confused:

    If i restore scheduled task everything its working again.:confused:

    Thanks for your time and this great script.
     
  15. moitreker

    moitreker MDL Novice

    Joined:
    Oct 21, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    #275 moitreker, Sep 29, 2016
    Last edited: Sep 29, 2016
    super super super super
     
  16. uniQ168

    uniQ168 MDL Junior Member

    Joined:
    Jul 18, 2015
    Messages:
    75
    Likes Received:
    319
    Trophy Points:
    0
    That's odd, never ran into any problem like that. I will look into it.
    Also v6.4.1 released with some bugs fixed. ;)
     
  17. Dycedarg

    Dycedarg MDL Novice

    Joined:
    Dec 20, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    I will try and inform you asap.

    Thanks for your time.
     
  18. wazer

    wazer MDL Junior Member

    Joined:
    Jul 31, 2009
    Messages:
    64
    Likes Received:
    9
    Trophy Points:
    0
    You should not have hower taskbar/start menu delay put on 0, it causes mess and programs supporting hower function cannot be clicked on since hower is remoed instant, i suggest 100ms as default also let people decide if they want windows audio back.
     
  19. getsuga369

    getsuga369 MDL Junior Member

    Joined:
    Apr 14, 2015
    Messages:
    64
    Likes Received:
    17
    Trophy Points:
    0
    Hi there, I used your script but there is something I wish it wouldn't do. How can I exempt it from disabling local search (files only) in windows 10?
    May I know the correct registry so that I can use file search when I enable scheduled task tweak?

    Thnx in advance.
     
  20. uniQ168

    uniQ168 MDL Junior Member

    Joined:
    Jul 18, 2015
    Messages:
    75
    Likes Received:
    319
    Trophy Points:
    0
    #280 uniQ168, Oct 3, 2016
    Last edited: Oct 3, 2016
    (OP)
    The registry tweaks will only disable websearch/cortana and remove the searchbar from taskbar.
    On my previously tested VMs, local search always worked.

    I agree on the delay, this is already fixed in the upcoming v6.5 release.
    Again, I won't add too many switches in the script, since this is not it's purpose. If you want a more flexible solution, please use Toggle Tweaker.

    EDIT: v6.5 is out. ;)