Page 2 of 3 FirstFirst 123 LastLast
  1.    02 Mar 2015 #11
    Join Date : Mar 2015
    Posts : 14
    Win7/8/10/Hackingtosh
    Thread Starter

    well quite some things, as well as my explorer process usually shows N/A (probably coz it's the one that connects to the desktop)

    also window handling cant be completely disturbed, coz I can still snipe that window down with taskmanager...
    Attached Thumbnails Attached Thumbnails Screenshot (10).png  
      My ComputerSystem Spec
  2.    02 Mar 2015 #12
    Join Date : Sep 2014
    Nashville, TN
    Posts : 3,143
    Windows 10 Pro

    Well, whatever the issue is... Taskkill can only work with whatever is listed in the process window title. If it's not there, it can't find it.

    So something is stealing your window title... and it doesn't do it on a normal vanilla system.
      My ComputerSystem Spec
  3.    02 Mar 2015 #13
    Join Date : Mar 2015
    Posts : 14
    Win7/8/10/Hackingtosh
    Thread Starter

    makes sense, but it is weird that the task Manager can still snipe the window fine...
      My ComputerSystem Spec
  4.    02 Mar 2015 #14
    Join Date : Sep 2014
    Nashville, TN
    Posts : 3,143
    Windows 10 Pro

    Task Manager is probably looking further into the process than tasklist does (or taskkill)
      My ComputerSystem Spec
  5.    05 Mar 2015 #15
    Join Date : Mar 2015
    Sydney, NSW
    Posts : 93
    Windows 10

    Hi My1,

    Will this command work for you?
    Code:
    powershell "$shell = New-Object -ComObject WScript.Shell; $shell.AppActivate('Personalization'); $shell.SendKeys('%{F4}')"
      My ComputerSystem Spec
  6.    05 Mar 2015 #16
    Join Date : Mar 2015
    Posts : 14
    Win7/8/10/Hackingtosh
    Thread Starter

    takes some time but works.
      My ComputerSystem Spec
  7.    05 Mar 2015 #17
    Join Date : Mar 2015
    Sydney, NSW
    Posts : 93
    Windows 10

    Yes. Starting an instance of PowerShell can be really slow. The slowness is especially noticeable when executing such trivial tasks.


    If you're okay with using temp files, calling a VBScript from your batch script will be a much quicker solution than PowerShell.

    Code:
    @echo off
    
    
    REM Open a "Personalization" window 
    control /name Microsoft.Personalization
    
    
    REM One second minimum delay required
    timeout 2
    
    
    REM Close the "Personalization" window
    set temp_vbs="%TEMP%\%~nx0.tmp0.vbs"
    (
        echo Dim objShell
        echo Set objShell = CreateObject("WScript.Shell"^)
        echo If objShell.AppActivate("Personalization"^) = True Then
        echo    objShell.SendKeys("%%{F4}"^)
        echo End If
    ) > %temp_vbs%
    cscript %temp_vbs% //B
    del %temp_vbs%
    REM


    Also, My1, I'd like to know where you found taskkill /fi "WINDOWTITLE eq Personalization" on SevenForums? This command only works under very specific conditions. It won't work most of the time.
      My ComputerSystem Spec
  8.    05 Mar 2015 #18
    Join Date : Mar 2015
    Posts : 14
    Win7/8/10/Hackingtosh
    Thread Starter

    I have no problems with tempfiles.

    also I found it here when I wanted to google how to shut this window down in a script, post 3

    Is it possible to create a windows batch file to do this? - Windows 7 Help Forums

    btw this thing works epic, I have now completed my wanted script, which can save a lot of work when working with themes in W10 9926+.
      My ComputerSystem Spec
  9.    05 Mar 2015 #19
    Join Date : Mar 2015
    Sydney, NSW
    Posts : 93
    Windows 10

    In that SF thread, Duzzy's code suggestion to Neutron's script doesn't actually work there (always yielding the "INFO: No tasks running with the specified criteria." error). Not in Windows 7, not in Windows 10.


    Quote Originally Posted by My1 View Post
    btw this thing works epic, I have now completed my wanted script, which can save a lot of work when working with themes in W10 9926+.
    Excellent news.
      My ComputerSystem Spec
  10.    05 Mar 2015 #20
    Join Date : Mar 2015
    Posts : 14
    Win7/8/10/Hackingtosh
    Thread Starter

    it did work for Mystere

    also you need admin in the cmd. so I added this little thing at the very beginning:

    Code:
    @echo off
    
    :: BatchGotAdmin
    :-------------------------------------
    REM  --> Check for permissions
    >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
        pushd "%CD%"
        CD /D "%~dp0"
    :--------------------------------------
      My ComputerSystem Spec

 
Page 2 of 3 FirstFirst 123 LastLast


Similar Threads
Thread Forum
Any way of permenently closing the "Search" app?
Specifically "Microsoft.Windows.Cortana_cw5n1h2txyewy" I do not need this running in the background and it is showing up on Display Fusion's taskbar.
General Support
Solved Build 10162 - Internet Explorer restarts after closing.
Hi all, I noticed since Build 10162 was installed that IE11 restarts after I have closed it down. How can I stop this from happening ?
Browsers and Email
White window frames around every window.
Since 10122 I've noticed that they changed the window frames from using accent colours to just using white all the time. Personally I don't like this and I am wondering if there is a way to bring accent colouring back.
Customization
What would you like to see in Window 9?
Tell us what you would like to see in Windows 9 For me... A metro/modern UI off switch A real start menu Full Kinect integration so I can control the PC by waving my arms like a mad man.
General Support
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 17:45.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums