Want a script to stop non-Traktor essential Windows services?

Discussion in 'KONTROL S2 / KONTROL S4' started by smitttten, Jan 24, 2011.

Thread Status:
Not open for further replies.
  1. smitttten

    smitttten Forum Member

    Messages:
    70
  2. stashe

    stashe Forum Member

    Messages:
    62
    smitttten might wanna look over it


    @ECHO OFF

    ::=======================================

    :: **** BEGIN AUTO ELEVATION PROMPT ****

    :: This makes the batch file prompt for elevated permissions
    :: on Windows Vista or Windows 7, then re-run itself

    VER | FINDSTR /IL "5.1." > NUL
    IF %ERRORLEVEL% EQU 0 SET Version=XP

    VER | FINDSTR /IL "5.2." > NUL
    IF %ERRORLEVEL% EQU 0 SET Version=2003

    VER | FINDSTR /IL "6.0." > NUL
    IF %ERRORLEVEL% EQU 0 SET Version=Vista

    VER | FINDSTR /IL "6.1." > NUL
    IF %ERRORLEVEL% EQU 0 SET Version=7

    If "%Version%"=="XP" GoTo SkipElevation
    If "%Version%"=="2003"? GoTo SkipElevation
    PushD "%~dp0"?
    If Exist "%~0.ELEVATED" GoTo SkipElevation

    :: Have to escape double quotes because they are
    :: passed to Cmd.exe via ShellExecute

    Set CMD_Args=%0 %*
    Set CMD_Args=%CMD_Args:"="%
    Set ELEVATED_CMD=PowerShell -Command (New-Object -com 'Shell.Application').ShellExecute('Cmd.exe', '/C %CMD_Args%', '', 'runas')
    Echo %ELEVATED_CMD% >> "%~0.ELEVATED"

    :: If there are single quotes in the arguments, this will fail

    Call %ELEVATED_CMD%
    Exit
    :SkipElevation
    If Exist "%~0.ELEVATED" Del "%~0.ELEVATED"

    :: **** END AUTO ELEVATION PROMPT ****


    ::========================================


    SET Option=
    IF NOT '%1'=='' GOTO QUIT

    :MENU
    CLS
    ECHO. Welcome to the Windows Services Tool for Traktor S4 users.
    ECHO. Please select one of the numbers below to begin!
    ECHO.
    ECHO.
    ECHO. 1. Stop all non-Essential Windows Services
    ECHO. 2. Start all non-Essential Windows Services
    ECHO. 3. Quit this Script
    ECHO.
    ECHO.
    SET /P Input=Which option would you like to perform?:
    IF %Input% == 1 GOTO STOPSVC
    IF %Input% == 2 GOTO STARTSVC
    IF %Input% == 3 GOTO QUIT

    :STOPSVC
    CLS
    ECHO.
    ECHO. STOPPING all non-Traktor services!
    ECHO.
    PAUSE

    rem Stopping Windows Firewall and Windows Defender...
    net stop mpssvc
    net stop windefend

    rem Stopping DHCP Client and Wireless LAN...
    net stop WinHttpAutoProxySvc
    net stop dhcp
    net stop wlansvc

    rem Stopping Other Network Related Services...
    net stop "dns cache"
    net stop netprofm
    net stop nlasvc
    net stop netman
    net stop iphlpsvc
    net stop lanmanworkstation
    net stop "Bonjour Service"
    net stop dhcp
    net stop nsi
    net stop lanmanserver
    net stop lmhosts
    net stop "shared access"
    net stop nettcpportsharing
    net stop remoteaccess
    net stop alg
    net stop bits
    net stop peerdistsvc
    net stop certpropsvc
    net stop homegrouplistener
    net stop homegroupprovider
    net stop winrm
    net stop Broswer
    net stop TrkWks


    rem Stopping other Windows Services...
    net stop wscsvc
    net stop DPS
    net stop CscService
    net stop WPDBusEnum
    net stop ProtectedStorage
    net stop RemoteRegistry
    net stop seclogon
    net stop wscsvc

    rem Stopping Blue Tooth Services
    net stop bthserv

    rem Stopping Remote Desktop and Remote Assistance Services
    net stop sessionenv
    net stop termservice

    rem Stopping Windows Update Services
    net stop wuauserv

    rem Stopping iPod Services
    net stop "ipod service"
    net stop "Apple Mobile Device"

    rem Stopping Stuff that makes your PC look nice...
    net stop themes
    net stop sensrsvc
    net stop AeLookupSvc
    net stop UxSms

    rem Stopping Scanner, Camera and other imaging Services...
    net stop stisvc

    rem Stopping Windows Media Playing Sharing...
    net stop WMPnetworksvc

    rem Stopping Tablet Device Support...
    net stop tabletinputservice

    rem Stopping Other Windows Services...
    net stop bdesvc
    net stop wbengine
    net stop uiodetect
    net stop defragsvc
    net stop axinstsv
    net stop "w32time"
    net stop wercplsupport


    rem Stopping Printer Services
    net stop spooler

    ECHO.
    ECHO.
    ECHO. PROCESS COMPLETE!
    ECHO.
    PAUSE
    GOTO MENU

    :STARTSVC
    CLS
    ECHO. STARTING all non-Traktor services!
    PAUSE

    rem Starting Windows Firewall and Windows Defender...
    net start mpssvc
    net start windefend

    rem Starting DHCP Client and Wireless LAN...
    net start WinHttpAutoProxySvc
    net start dhcp
    net start wlansvc

    rem Starting Other Network Related Services...
    net start "dns cache"
    net start netprofm
    net start nlasvc
    net start netman
    net start iphlpsvc
    net start lanmanworkstation
    net start "Bonjour Service"
    net start dhcp
    net start nsi
    net start lanmanserver
    net start lmhosts
    net start "shared access"
    net start nettcpportsharing
    net start remoteaccess
    net start alg
    net start bits
    net start peerdistsvc
    net start certpropsvc
    net start homegrouplistener
    net start homegroupprovider
    net start winrm
    net start Broswer
    net start TrkWks


    rem Starting other Windows Services...
    net start wscsvc
    net start DPS
    net start CscService
    net start WPDBusEnum
    net start ProtectedStorage
    net start RemoteRegistry
    net start seclogon
    net start wscsvc

    rem Starting Blue Tooth Services
    net start bthserv

    rem Starting Remote Desktop and Remote Assistance Services
    net start sessionenv
    net start termservice

    rem Starting Windows Update Services
    net start wuauserv

    rem Starting iPod Services
    net start "ipod service"
    net start "Apple Mobile Device"

    rem Starting Stuff that makes your PC look nice...
    net start themes
    net start sensrsvc
    net start AeLookupSvc
    net start UxSms

    rem Starting Scanner, Camera and other imaging Services...
    net start stisvc

    rem Starting Windows Media Playing Sharing...
    net start WMPnetworksvc

    rem Starting Tablet Device Support...
    net start tabletinputservice

    rem Starting Other Windows Services...
    net start bdesvc
    net start wbengine
    net start uiodetect
    net start defragsvc
    net start axinstsv
    net start "w32time"
    net start wercplsupport


    rem Starting Printer Services
    net start spooler

    ECHO.
    ECHO.
    ECHO. PROCESS COMPLETE!
    ECHO.
    PAUSE
    GOTO MENU

    :QUIT
  3. smitttten

    smitttten Forum Member

    Messages:
    70
    Thanks for the additions. I did mention in thread the different requirements for running it based on the need for admin permissions but this is much cleaner! I did not include a start script due to the time taken to figure out the order of everything. Did you manage to test this at all?

    I am going to x-post this back to DJTT:

    http://www.djtechtools.com/forum/showthread.php?p=216670#post216670

    Nice work fella!
    Last edited: Jan 24, 2011
  4. viceversa

    viceversa Forum Member

    Messages:
    141
    I wasn't able to get this script working unless I took out all the elevation commands. but simply imputing a number does nothing the script quits but if I input anything EXCEPT the numbers 1,2 or 3 it will successfully begin stopping the services but can not start the services again (unless reboot)...I'm not very knowledgeable on scripting but any advice would be greatly appreciated! Also, keep up the good work on this script I see this as being useful for many window/traktor users!
  5. smitttten

    smitttten Forum Member

    Messages:
    70
    I am going to repost the original script - see how that works for you. It doesn't check for any elevation. I would also just reboot the system when you are done with Traktor as Windows is very funny about which order things start in.

    Have another bash and let's see what happens.

    SmiTTTen

    @Echo off

    Echo Ready to stop all non-Traktor services?

    pause

    rem Stopping Windows Firewall and Windows Defender...
    net stop mpssvc
    net stop windefend

    rem Stopping DHCP Client and Wireless LAN...
    net stop WinHttpAutoProxySvc
    net stop dhcp
    net stop wlansvc

    rem Stopping Other Network Related Services...
    net stop "dns cache"
    net stop netprofm
    net stop nlasvc
    net stop netman
    net stop iphlpsvc
    net stop lanmanworkstation
    net stop "Bonjour Service"
    net stop dhcp
    net stop nsi
    net stop lanmanserver
    net stop lmhosts
    net stop "shared access"
    net stop nettcpportsharing
    net stop remoteaccess
    net stop alg
    net stop bits
    net stop peerdistsvc
    net stop certpropsvc
    net stop homegrouplistener
    net stop homegroupprovider
    net stop winrm
    net stop Broswer
    net stop TrkWks


    rem Stopping other Windows Services...
    net stop wscsvc
    net stop DPS
    net stop CscService
    net stop WPDBusEnum
    net stop ProtectedStorage
    net stop RemoteRegistry
    net stop seclogon
    net stop wscsvc

    rem Stopping Blue Tooth Services
    net stop bthserv

    rem Stopping Printer Services
    net stop spooler

    rem Stopping Remote Desktop and Remote Assistance Services
    net stop sessionenv
    net stop termservice

    rem Stopping Windows Update Services
    net stop wuauserv

    rem Stopping iPod Services
    net stop "ipod service"
    net stop "Apple Mobile Device"

    rem Stopping Stuff that makes your PC look nice...
    net stop themes
    net stop sensrsvc
    net stop AeLookupSvc
    net stop UxSms

    rem Stopping Scanner, Camera and other imaging Services...
    net stop stisvc

    rem Stopping Windows Media Playing Sharing...
    net stop WMPnetworksvc

    rem Stopping Tablet Device Support...
    net stop tabletinputservice

    rem Stopping Other Windows Services...
    net stop bdesvc
    net stop wbengine
    net stop uiodetect
    net stop defragsvc
    net stop axinstsv
    net stop "w32time"
    net stop wercplsupport

    cls
    Echo Time to Mix!
    pause









  6. viceversa

    viceversa Forum Member

    Messages:
    141
    thanks i was just thinking I wish i saved the original one too lol but the updated one actually works fine when i took out the elevation stuff at the beginning its just i cannot get any other option on the prompt screen to work (start and quit)
  7. stashe

    stashe Forum Member

    Messages:
    62
    The script MUST be run as administrator on Vista/7 to function and that until the order is sorted properly. You will still be prompted for certain services to be shut-down or restarted.


    Code:
    @ECHO OFF
    
    :MENU
    SET INPUT=
    IF NOT '%1'=='' GOTO QUIT
    
    CLS
    ECHO. Welcome to the Windows Services Tool for Traktor S4 
    ECHO. users. This script can be used to temporarily shut
    ECHO. down non-essential Windows Services when running
    ECHO. Traktor S4.
    ECHO.
    ECHO. Please select one of the numbers below to begin!
    ECHO.
    ECHO.
    ECHO.    1. Stop all non-Essential Windows Services
    ECHO.    2. Start all non-Essential Windows Services
    ECHO.    3. Quit this Script
    ECHO.
    ECHO.
    SET /P Input=Which option would you like to perform?:
    IF %Input% == 1 GOTO STOPSVC
    IF %Input% == 2 GOTO STARTSVC
    IF %Input% == 3 GOTO QUIT
    GOTO :MENUERROR
    
    :MENUERROR
    ECHO.
    ECHO.
    ECHO. You have entered an invalid option!
    ECHO.
    ECHO.
    ECHO. You must select a menu option from 1-3. 
    ECHO. Please Try Again!
    ECHO.
    PAUSE
    GOTO :MENU
    
    :STOPSVC
    CLS
    ECHO.
    ECHO. STOPPING all non-Traktor services!
    ECHO.
    ECHO. Pressing ANY key will begin the process.
    ECHO. If you do not wish to continue, please close
    ECHO. this window immediately.
    ECHO.
    ECHO.
    ECHO.Otherwise -
    PAUSE
    
    CLS
    
    rem Stopping Windows Firewall and Windows Defender...
    net stop mpssvc
    net stop windefend
    
    rem Stopping DHCP Client and Wireless LAN...
    net stop WinHttpAutoProxySvc
    net stop dhcp
    net stop wlansvc
    
    rem Stopping Other Network Related Services...
    net stop "dns cache"
    net stop netprofm
    net stop nlasvc
    net stop netman
    net stop iphlpsvc
    net stop lanmanworkstation
    net stop "Bonjour Service"
    net stop dhcp
    net stop nsi
    net stop lanmanserver
    net stop lmhosts
    net stop "shared access"
    net stop nettcpportsharing
    net stop remoteaccess
    net stop alg
    net stop bits
    net stop peerdistsvc
    net stop certpropsvc
    net stop homegrouplistener
    net stop homegroupprovider
    net stop winrm
    net stop Broswer
    net stop TrkWks
    
    
    rem Stopping other Windows Services...
    net stop wscsvc
    net stop DPS
    net stop CscService
    net stop WPDBusEnum
    net stop ProtectedStorage
    net stop RemoteRegistry
    net stop seclogon
    net stop wscsvc
    
    rem Stopping Blue Tooth Services
    net stop bthserv
    
    rem Stopping Remote Desktop and Remote Assistance Services
    net stop sessionenv
    net stop termservice
    
    rem Stopping Windows Update Services
    net stop wuauserv
    
    rem Stopping iPod Services
    net stop "ipod service"
    net stop "Apple Mobile Device"
    
    rem Stopping Stuff that makes your PC look nice...
    net stop themes
    net stop sensrsvc
    net stop AeLookupSvc
    net stop UxSms
    
    rem Stopping Scanner, Camera and other imaging Services...
    net stop stisvc
    
    rem Stopping Windows Media Playing Sharing...
    net stop WMPnetworksvc
    
    rem Stopping Tablet Device Support...
    net stop tabletinputservice
    
    rem Stopping Other Windows Services...
    net stop bdesvc
    net stop wbengine
    net stop uiodetect
    net stop defragsvc
    net stop axinstsv
    net stop "w32time"
    net stop wercplsupport
    
    
    rem Stopping Printer Services
    net stop spooler
    
    ECHO.
    ECHO.
    ECHO. PROCESS COMPLETE!
    ECHO.
    PAUSE
    GOTO MENU
    
    :STARTSVC
    CLS
    ECHO.
    ECHO. STARTING all non-Traktor services!
    ECHO.
    ECHO. Pressing ANY key will begin the process.
    ECHO. If you do not wish to continue, please close
    ECHO. this window immediately.
    ECHO.
    ECHO.
    ECHO.Otherwise -
    PAUSE
    
    CLS
    
    rem Starting Windows Firewall and Windows Defender...
    net start mpssvc
    net start windefend
    
    rem Starting DHCP Client and Wireless LAN...
    net start WinHttpAutoProxySvc
    net start dhcp
    net start wlansvc
    
    rem Starting Other Network Related Services...
    net start "dns cache"
    net start netprofm
    net start nlasvc
    net start netman
    net start iphlpsvc
    net start lanmanworkstation
    net start "Bonjour Service"
    net start dhcp
    net start nsi
    net start lanmanserver
    net start lmhosts
    net start "shared access"
    net start nettcpportsharing
    net start remoteaccess
    net start alg
    net start bits
    net start peerdistsvc
    net start certpropsvc
    net start homegrouplistener
    net start homegroupprovider
    net start winrm
    net start Broswer
    net start TrkWks
    
    
    rem Starting other Windows Services...
    net start wscsvc
    net start DPS
    net start CscService
    net start WPDBusEnum
    net start ProtectedStorage
    net start RemoteRegistry
    net start seclogon
    net start wscsvc
    
    rem Starting Blue Tooth Services
    net start bthserv
    
    rem Starting Remote Desktop and Remote Assistance Services
    net start sessionenv
    net start termservice
    
    rem Starting Windows Update Services
    net start wuauserv
    
    rem Starting iPod Services
    net start "ipod service"
    net start "Apple Mobile Device"
    
    rem Starting Stuff that makes your PC look nice...
    net start themes
    net start sensrsvc
    net start AeLookupSvc
    net start UxSms
    
    rem Starting Scanner, Camera and other imaging Services...
    net start stisvc
    
    rem Starting Windows Media Playing Sharing...
    net start WMPnetworksvc
    
    rem Starting Tablet Device Support...
    net start tabletinputservice
    
    rem Starting Other Windows Services...
    net start bdesvc
    net start wbengine
    net start uiodetect
    net start defragsvc
    net start axinstsv
    net start "w32time"
    net start wercplsupport
    
    
    rem Starting Printer Services
    net start spooler
    
    ECHO.
    ECHO.
    ECHO. PROCESS COMPLETE!
    ECHO.
    PAUSE
    GOTO MENU
    
    :QUIT
    
  8. viceversa

    viceversa Forum Member

    Messages:
    141
    ^thank you so much! works like a charm :)
  9. smitttten

    smitttten Forum Member

    Messages:
    70
    Vice: would you mind providing some semi-detailed feedback on how this has worked for you in terms of improvements in the S4'S performance?

    Cheers Mate.

    SmiTTTen
  10. viceversa

    viceversa Forum Member

    Messages:
    141
    Well I decided to use the only laptop I have (work provided lol) as I wait for all these new sandy bridge laptops to start trickling in. the laptop is a Dell Latitude E5400 with 2 GB ram and a core 2 duo cpu. If i dont disable some of these unnecessary services I will get CPU spikes along with occasional pop and crack in the sound while im playing. So this script makes it really nice and fast to get traktor up and running and it runs flawlessly! sure there might be the occasional cpu spike (not nearly as bad as before) but no pops/cracks or nothing in the sound.

    plus its really nice that i dont have to make new windows profile with all this stuff disabled just to hop on my S4, all i gotta do is run this script!
  11. smitttten

    smitttten Forum Member

    Messages:
    70
    That's fantastic news! Cheers Vice....
  12. stashe

    stashe Forum Member

    Messages:
    62
    always good to have mates who can code :D
  13. mrcool

    mrcool Forum Member

    Messages:
    73
    I currently have Gamebooster, as do many on here, should this be used instead or as well?
  14. smitttten

    smitttten Forum Member

    Messages:
    70
    I think it depends on what you are looking for. What Stashe and I put together is pretty rough and ready compared to Gamebooster. The difference with the script is that it makes no permanent changes to your system. For some people that's not a benefit as their system is going to be dedicated to the S4 and gamebooster probably does more. For those people who want to find a way to quickly drop out the non-Traktor essential services without making permanent changes this could be a decent solution.

    Try it and see if it helps..... It would be good to know if this compliments gamebooster.
  15. viceversa

    viceversa Forum Member

    Messages:
    141
    ^exactly. for instance in my case where my gig laptop is also my work laptop :)
  16. mrcool

    mrcool Forum Member

    Messages:
    73
    Can you help me understand, I never thought gamebooster did anything permanent? I always just go return to normal mode once Im done.
  17. smitttten

    smitttten Forum Member

    Messages:
    70
    That may be the case. From the screen shots I saw it seemed to make some config changes but it maybe that it switches them back after. I have not installed it as I have a working system I don't wanna screw with. I am planning on putting another system together so I will have a proper look then. There are plenty of other people using gamebooster who can comment. I also wanted a homegrown solution I could play with and edit myself. Hopefully all this will be academic soon anyway with the next NI update.

    If your S4 working well then you shouldn't need to worry about any of this :)
  18. mrcool

    mrcool Forum Member

    Messages:
    73
    Cool, I will give it a try anyway and let you know how I get on
  19. theolagr

    theolagr New Member

    Messages:
    11
    hey guys,

    thanks for the script, i really appreciate the effort, although it still didn't rid me of the annoying clicks. at least it worked for some others and i'm guessing that's good.

    my question/problem is that after i tried it, i'm experiencing very slow wireless speeds. i got an internal 801g card on my t410i lenovo and before that i had no problems (my speed is around 10mb/s, wireless would reach easily 7-8). after i run it and tried it, i restarted my computer and noticed the problem. tried to run the 2nd choice (enable all services) and still nothing. my speeds won't go over 0.8mb/s.

    since i have no idea what changed, would you have any idea how to get back to the old settings or services? it's kind of annoying to say the least to suddenly have to surf with such slow speeds.

    let me know if you need any detailed info on this.

    thank you in advance.
  20. theolagr

    theolagr New Member

    Messages:
    11
    just realized it's not my computer but my router so disregard my previous message guys. thank you anyway though.

    cheers,
    th.
Thread Status:
Not open for further replies.

Share This Page