Jump to content

Octopuss

Member
  • Posts

    1,212
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Czech Republic

Posts posted by Octopuss

  1. Haha!! I expected that kind of reply :P Didn't think anyone would be interested, considering there's a ton of such on the internet already.

    @ECHO OFF
    echo Stopping GWX process
    taskkill /im gwx.exe /t /f
    echo.
    echo Removing GWX tasks
    echo.
    schtasks /delete /tn "\microsoft\windows\setup\gwx\launchtrayprocess" /f
    schtasks /delete /tn "\microsoft\windows\setup\gwx\refreshgwxconfig" /f
    schtasks /delete /tn "\microsoft\windows\setup\gwx\refreshgwxconfigandcontent" /f
    schtasks /delete /tn "\microsoft\windows\setup\gwx\refreshgwxcontent" /f
    schtasks /delete /tn "\microsoft\windows\setup\gwx" /f
    echo.
    for %%A in (2952664 2977759 3021917 3035583 3068708 3075249 3080149) do (
    echo Uninstalling KB%%A...
    wusa.exe /kb:%%A /uninstall /quiet /norestart)
    echo.
    Echo Deleting GWX folders
    echo.
    takeown /f %windir%\System32\GWX /r /d y
    icacls %windir%\System32\GWX /grant administrators:F /t
    rd /s /q %windir%\System32\GWX
    copy nul %windir%\System32\gwx
    icacls %windir%\System32\gwx /deny Everyone:F
    echo.
    takeown /f %localappdata%\GWX /r /d y
    icacls %localappdata%\GWX /grant administrators:F /t
    rmdir /s /q %localappdata%\GWX\
    echo.
    takeown /f %systemdrive%\$Windows~BT /r /d y
    icacls %systemdrive%\$Windows~BT /grant administrators:F /t
    rmdir /s /q %systemdrive%\$Windows~BT\
    rmdir /s /q %systemdrive%\$Windows.~WS\
    echo.
    
    echo Disabling GWX and OS upgrade
    echo.
    reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\GWX /t REG_DWORD /v DisableGWX /d 1 /f
    reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /t REG_DWORD /v "DisableOSUpgrade" /d 1 /f
    reg add HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate /t REG_DWORD /v "DisableOSUpgrade" /d 1 /f
    echo.
    echo Hiding GWX related updates. This may take a while.
    echo.
    start "title" /b /wait cscript.exe "%~dp0HideGWXetc.vbs" 2952664 2977759 3021917 3035583 3068708 3075249 3080149
    echo.
    echo Telemetry
    echo.
    echo Stopping and deleting Diagnostic Tracking Service
    sc stop DiagTrack
    sc delete DiagTrack
    echo "" > C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl
    
    reg add HKLM\SOFTWARE\Microsoft\Windows\ScriptedDiagnosticsProvider\Policy /v EnableQueryRemoteServer /t REG_DWORD /d 0 /f
    echo.
    
    echo Removing scheduled tasks
    echo.
    schtasks /delete /tn "\microsoft\windows\application experience\aitagent" /f
    schtasks /delete /tn "\microsoft\windows\application experience\microsoft compatibility appraiser" /f
    schtasks /delete /tn "\microsoft\windows\application experience\programdataupdater" /f
    schtasks /delete /tn "\microsoft\windows\autochk\proxy" /f
    schtasks /delete /tn "\microsoft\windows\customer experience improvement program\consolidator" /f
    schtasks /delete /tn "\microsoft\windows\customer experience improvement program\kernelceiptask" /f
    schtasks /delete /tn "\microsoft\windows\customer experience improvement program\usbceip" /f
    schtasks /delete /tn "\microsoft\windows\diskdiagnostic\microsoft-windows-diskdiagnosticdatacollector" /f
    schtasks /change /disable /tn "\microsoft\windows\maintenance\winsat"
    schtasks /change /disable /tn  "\microsoft\windows\media center\activatewindowssearch"
    schtasks /change /disable /tn  "\microsoft\windows\media center\configureinternettimeservice"
    schtasks /change /disable /tn  "\microsoft\windows\media center\dispatchrecoverytasks"
    schtasks /change /disable /tn  "\microsoft\windows\media center\ehdrminit"
    schtasks /change /disable /tn  "\microsoft\windows\media center\installplayready"
    schtasks /change /disable /tn  "\microsoft\windows\media center\mcupdate"
    schtasks /change /disable /tn  "\microsoft\windows\media center\mediacenterrecoverytask"
    schtasks /change /disable /tn  "\microsoft\windows\media center\objectstorerecoverytask"
    schtasks /change /disable /tn  "\microsoft\windows\media center\ocuractivate"
    schtasks /change /disable /tn  "\microsoft\windows\media center\ocurdiscovery"
    schtasks /change /disable /tn  "\microsoft\windows\media center\pbdadiscovery"
    schtasks /change /disable /tn  "\microsoft\windows\media center\pbdadiscoveryw1"
    schtasks /change /disable /tn  "\microsoft\windows\media center\pbdadiscoveryw2"
    schtasks /change /disable /tn  "\microsoft\windows\media center\pvrrecoverytask"
    schtasks /change /disable /tn  "\microsoft\windows\media center\pvrscheduletask"
    schtasks /change /disable /tn  "\microsoft\windows\media center\registersearch"
    schtasks /change /disable /tn  "\microsoft\windows\media center\reindexsearchroot"
    schtasks /change /disable /tn  "\microsoft\windows\media center\sqlliterecoverytask"
    schtasks /change /disable /tn  "\microsoft\windows\media center\updaterecordpath"
    schtasks /delete /tn "\Microsoft\Windows\Windows Error Reporting\QueueReporting" /f
    rem schtasks /change /disable /tn  ""
    rem schtasks /delete /tn "" /f
    echo.
    echo ... All operations complete. Reboot now.
    pause

    and the vbs file (which I didn't even look at because I don't understand programming one bit

    Dim hideupdates(7)
    
    hideupdates(0) = "KB2952664"
    hideupdates(1) = "KB2977759"
    hideupdates(2) = "KB3021917"
    hideupdates(3) = "KB3035583"
    hideupdates(4) = "KB3068708"
    hideupdates(5) = "KB3075249"
    hideupdates(6) = "KB3080149"
    
    set updateSession = createObject("Microsoft.Update.Session")
    set updateSearcher = updateSession.CreateupdateSearcher()
    
    Set searchResult = updateSearcher.Search("IsInstalled=0 and Type='Software'")
    
    For i = 0 To searchResult.Updates.Count-1
    set update = searchResult.Updates.Item(i)
    For j = LBound(hideupdates) To UBound(hideupdates)
    'MsgBox hideupdates(j)
    if instr(1, update.Title, hideupdates(j), vbTextCompare) = 0 then
      'Wscript.echo "No match found for " & hideupdates(j)
    else
    Wscript.echo "Hiding updates..." & hideupdates(j)
    update.IsHidden = True
    end if
    Next
    Next
  2. **** it's dead here.

    In addition to the above, does anyone know whether it's possible to configure Windows so that you never have to type the password? You can specify how many times should the system boot up automatically, and while it's possible to enter a ridiculously high number, I am looking for more "clean" way to do this.

  3. On 14. duben 2016 at 5:02 PM, 351837 said:

    I think you look something like this:

    https://github.com/th3power/aegis-voat/releases

    Oh yes. I actually saw this before. It's a bit complicated, and the person who wrote it certainly knows a LOT about scripting :D

    It turned out there's not a whole lot to disable/delete if you're not hysterically paranoid. One or two services max, some registry keys and several scheduled tasks. Plus it's probably a good idea to remove everything GWX related before too. I actually kind of combined parts of the above and https://tweakhound.com/2015/11/01/remove-and-block-gwx-in-windows-7-2/ and created my own simple batch file I am happy enough with.

  4. I want to write my own batch file to deal with all the telemetry present in Windows 7.

    Does anyone know about any site with up to date (ideally actively maintained, but that's probably too much to ask for) list of updates to uninstall and services/tasks to stop/disable/delete?

    Thus far I was able to find presumably outdated list of updates and this:

    sc stop DiagTrack
    sc stop dmwappushservice
    sc delete DiagTrack
    sc delete dmwappushservice
    echo "" > C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl

    Everything under “Application Experience”
    Everything under “Autochk”
    Everything under “Customer Experience Improvement Program”
    Under “Disk Diagnostic” delete only the “Microsoft-Windows-DiskDiagnosticDataCollector”
    Under “Maintenance” “WinSAT”
    “Media Center” and click the “status” column, then select all non-disabled entries and disable them.

  5. The latest forum "upgrade" pretty much made me leave. Not only does it look really ugly and confusing (really, do you have to change the colours and layout every single time?), it's also slow as hell. I see absolutely no reason why a simple forum should not load pages almost immediatelly. Opening anything takes anywhere between two and three seconds.

  6. For me, an OS is stable enough if it can run for a full month of your typical everyday's use :) If it doesn't slow down, throw some obscure errors or flat out crashes, it's good enough.

  7. ISO files.

    http://microsoft.com/software-download/techbench

    Media Creation downloads the "parts" (AFAICR) to make the ISO (A/L for Win8, again AFAICR). Dornloading the WinX ISOS's right now. I'll get back to you on whether ESD or WIM inside (in about 20 minutes). I'm suspecting ESD but I could be wrong. :unsure. IF ESD, then it would be pointless to download again. :}

     

    Edit - Actually, I'm using this link because I'm doing it on an XP installation.

    It *appears* that they may be the same ISO's? :unsure:

    https://www.microsoft.com/en-us/software-download/windows10ISO

    Edit2 - 32-Bit has a WIM. Will report back on 64-bit, but since 32-bit is WIM, then *probably*... 1hr45min to download (it's bigger, naturally).

    Edit3 - Confirmed. 64-Bit also a WIM.

     

    HTH and happy (re-) downloading. :(

     

    (Last note - I should also mention I haven't tried them yet as I need to back up my Win7 installation first.)

    I can confirm the web-downloaded isos contain wim images.

    Bye bye Media creation tool.

     

    Btw what's the difference between english and english international?

  8.  

    replace generic device icons with enhanced

    to put a check in that box

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Device Metadata]

    "PreventDeviceMetadataFromNetwork"=dword:00000000

     

    Speaking of this, has anyone ever managed to get it to work? I have that tweak applied to the image and it's left unchecked after installation.

  9. The brackets, or quotes, that are common to both sides get factored out, so to speak.

    Ah! That's what I needed to know.

     

    Or you could do as I suggested above:

    Yup, ended up doing just that. But I ran into another oddity there - when checking whether a variable is defined, for some obscure reason you have to do it without %%. That is even more confusing.

     

    Are you also saying that xcopy ignores quotes in the path as long as they are paired? That's pretty weird!

     

    I learned a lot today, even if I made myself look like a clueless id*** who shouldn't dig into anything deeper than Windows GUI :P

    I never knew a lot, and combined with being unemployed for 3 years, I forgot large part of the little I knew :(

  10. bphlpt, I can't say I understand. It seems like no matter what documentation I read, there is always a case where it doesn't apply somewhere.

    I thought I had to enclose the string I put in a variable in quotes to prevent the system from getting confused. You even said it yourself. And yet, here is a case where it is wrong.

    Btw I do use ss64 for reference most of the time.

     

    And yes, this is all pretty new to me. Not that I never touched batch files in the last 20 years, but this is about the most complicated stuff I ever attempted. It smells too much of programming, and my brain is just incompatible with that :/

     

    Also, apparently it's impossible to insert empty string into a variable. Either there's a value or the variable is deleted.

    Expanding on that, and going back to the previous problem, is it even correct to do this?

    if "%brand%"==""

    Doesn't that actually check whether the variable equals two quotes rather than being empty? I've just gotten completely lost. I don't even know when am I supposed to use the quotes anymore. Guess all of this is lost to me. Even in such primitive form.

  11. I thought comparing strings is always the same, no?

     

    Well this is the (almost, edited the actual copy/whatever operations out) whole thing:

    choice /c:123 /m "Is this a: (1:desktop, 2:notebook, 3:my own PC, 4:N/A) ?"if errorlevel==4 goto :startif errorlevel==3 set type="-ja"if errorlevel==2 goto :ntbif errorlevel==1 set type=""goto :start:ntbset type="-ntb"set /p brand="Manufacturer's name: "if "%brand%"=="" (echo.echo No input. Try again.echo.goto :ntb) else (goto :start):startif exist d:\win7\boot\cs-cz\nul (set language="cz") else (set language="")...copy operationsif "%language%"=="cz" (copy "e:\unattended\keyb-EN-US+CZ-QWERTZ.xml" d:\win7\sources\$OEM$\$1\install /y) else (copy "e:\unattended\keyb-EN-US+CZ-QWERTY.xml" d:\win7\sources\$OEM$\$1\install /y)if %type%=="-ja" (...more copy operations)

    When the .xml file is being chosen, the if works with quotes.

    And it doesn't at the end. It makes zero sense. A string is a string. If command is always if.

  12. Hmmm. 

    What about:

    :ntbset /p brand=Manufacturer's name: if "%brand%"=="" echo.&echo. No input. Try again.&goto :ntbgoto :start

    jaclaz

    Ok... what does the & char do, and why does this work and what I did doesn't? Since I posted the question I tried it with the quotes, like so

     

    P.S. These are all stupid little scripts I use for myself when I occasionally prepare a Windows image, so there's no need for any user stupidity checks (OR maybe is, lol).

     

    edit:

    If bold and red font wasn't enough... ok, "%brand%" is what it needed. I don't get it though!! Nowhere I looked did it say you have to compare strings like this. Grr.

    Oh well.

    This works:

    :ntbset /p brand="Manufacturer's name: "if "%brand%"=="" (echo. No input. Try again.goto :ntb) else (goto :start)
  13. I have another stupid question (and I feel really dumb this time).

     

    :ntb
    set /p brand="Manufacturer's name: "
    if %brand%=="" goto :noinput
    goto :start

    :noinput
    echo.
    echo. No input. Try again.
    goto :ntb

     

    No matter what I type, it always ends up with "goto was unexpected at this time". I read some documentation about the various commands several times and still don't understand why it doesn't work.

×
×
  • Create New...