Showing posts with label Window. Show all posts
Showing posts with label Window. Show all posts

6/07/2024

Stop window update process in force

Open powershell by admin 

and put this on terminal


> net stop wuauserv #stop service update
> net stop bits #stop bits
> Remove-Item -Path "C:\Windows\SoftwareDistribution\Download\*" -Recurse -Force
> net start wuauserv #restart 
> net start bits #restart


You can do something else after stop bits, service update.

Thank you.




5/30/2018

How to get current directory in window application.

Example source code to get current directory in window application


..
CString CurrentDirectoryToCString()
{
    TCHAR buff[MAX_PATH];
    memset(buff, 0, MAX_PATH);
    ::GetCurrentDirectory(MAX_PATH, buff);
    CString strFolder = buff;

    return strFolder;
}
..