четвер, 14 листопада 2019 р.

Wyłączamy automatyczną instalację sterowników z Windows Update

W czerwcu wyszło na jaw, że oprogramowanie Samsunga może zablokować mechanizm Windows Update. Celem takiego działania nie było odcięcie od aktualizacji, lecz rozwiązanie ewentualnych problemów sprzętowych, jakie mogły nastąpić wskutek instalowania sterowników pochodzących od Microsoftu. W niektórych przypadkach warto samodzielnie decydować o tej kwestii.

Trzeba przyznać, że w wielu sytuacjach Windows Update okazuje się bardzo dobrym rozwiązaniem – przekonać się o tym mogą np. testerzy systemu Windows 10, którzy dzięki tej funkcji otrzymują sterowniki do wielu urządzeń. W wielu przypadkach tych samych sterowników nie znajdziemy na stronach producentów, jest to więc jedyny sposób na to, aby uruchomić sprzęt. Dodatkową zaletą jest cykliczne i automatyczne aktualizowanie tego typu oprogramowania. Dzięki niemu użytkownicy w ogóle nie muszą zaprzątać sobie tą kwestią głowy, a po prostu korzystać z systemu operacyjnego i programów.

Niestety czasami Windows Update może także wiele zepsuć i utrudnić klientom używanie ich sprzętu. Właśnie tak było w przypadku sprawy Samsunga: sterowniki pobierane ze stron Microsoftu nadpisywały te dostarczane przez producenta sprzętu, co doprowadzało do wyłączania portów USB 3.0. Nie jest to sytuacja pożądana, firma zdecydowała się więc na zablokowanie Windows Update. Tego typu siłowe rozwiązanie nie jest najlepszym wyjściem z sytuacji – lepiej samodzielnie decydować o tym, jakie sterowniki chcemy instalować. Te z Windows Update nie zawsze muszą okazać się idealne, o czym w swoich komentarzach informowali już użytkownicy korzystający z gładzików firmy Synaptic.

Sposób 1: Zmieniamy ustawienia systemowe


Na całe szczęście Microsoft pozostawił nam wolny wybór i w dowolnym momencie możemy zrezygnować z automatycznego instalowania sterowników w Windows Update. Opcji za to odpowiedzialnych nie znajdziemy jednak w panelu sterowania. Aby się do nich dostać, klikamy prawym przyciskiem myszy na ikonę Mój komputer i wybieramy pozycję właściwości. W przypadku systemów Windows 8, 8.1 i 10 możemy także kliknąć prawym przyciskiem myszy na ikonę ekranu startowego / menu start, a następnie wybrać z niej pozycję System. Następnie z menu po lewej stronie wybieramy opcję Zaawansowane ustawienia systemu. Tutaj mała uwaga: zmiana zachowania Windows Update będzie od nas wymagała uprawnień administracyjnych.


W oknie właściwości systemowych przechodzimy do zakładki Sprzęt, a następnie klikamy przycisk Ustawienia instalacji urządzeń. W oknie, które zobaczymy możemy wybrać zachowanie systemu Windows dotyczące automatycznego instalowania i aktualizowania sterowników urządzeń. Domyślnie zajmuje się tym system, możemy jednak samodzielnie decydować o pobieraniu danych, a także całkowicie zrezygnować z tego rozwiązania. W razie potrzeby możliwe jest zrezygnowanie jedynie z pobierania dodatkowego oprogramowania do sprzętu, jakim są np. specjalne panele kontrolne. System może pobierać jedynie niezbędne do działania sterowniki. Po wyborze odpowiadających nam ustawień zapisujemy zmiany.

Sposób 2: Edytor zasad grup lokalnych


Nie jest to jedyny sposób, aby zablokować automatyczne instalowanie sterowników. Drugą metodą jest wykorzystanie zasad grup lokalnych. Najpierw naciskamy kombinację klawiszy Windows + R lub z menu start wybieramy pozycję Uruchom. Następnie w okienku wpisujemy gpedit.msc i zatwierdzamy. Teraz pozostaje nam zmienić odpowiednie ustawienie. Aby się do niego dostać, z menu po lewej stronie rozwijamy i wybieramy kolejno Konfiguracja komputera – Szablony administracyjne – System – Zarządzanie komunikacją internetową – Internetowe ustawienia komunikacyjne. Następnie z listy po prawej stronie klikamy dwukrotnie pozycję Wyłącz wyszukiwanie sterowników urządzeń w usłudze Windows Update. W okienku jakie zobaczymy wybieramy Włączone, a następnie zmiany zatwierdzamy.


Sposób 3: Rejestru się nie boimy


Istnieje jeszcze jeden sposób, aby wyłączyć instalowanie sterowników. Wykorzystać możemy do tego edytor rejestru. Wbrew pozorom nie jest to zadanie trudne, a jeżeli nie naruszymy innych kluczy, całkowicie bezpieczne. Aby z niego skorzystać, wywołujemy okno uruchamiania kombinacją klawiszy Windows + R i wpisujemy w oknie regedit.exe. Opcjonalnie możemy także wyszukać tę aplikację przy pomocy ekranu startowego (o ile uruchomiliśmy wyświetlanie kafelków administracyjnych) lub menu start.

Kolejnym krokiem jest przejście do odpowiedniego klucza. Wybierając i rozwijając opcje z menu po lewej stronie, przechodzimy przez klucze: HKEY_LOCAL_MACHINE – SOFTWARE – Microsoft – Windows – CurrentVersion – DriverSearching. W panelu po prawej stronie powinniśmy zobaczyć wartość o nazwie SearchOrderConfig. Klikamy ją dwukrotnie. Domyślna wartość to 1, co oznacza automatyczne instalowanie sterowników. Możemy ją zmienić na 0, aby całkowicie wyłączyć ich instalowanie. Innym wyborem jest wartość 2: w takim przypadku system zainstaluje wymagane oprogramowanie tylko wtedy, gdy te nie zostanie odnalezione w systemie. Wybieramy najlepszą dla nas opcję, zatwierdzamy i zamykamy edytor rejestru.


To już wszystko, po wykonaniu tych zmian system nie będzie automatycznie instalował sterowników. Z opcji tej powinniśmy korzystać z rozwagą i tylko wtedy, gdy natkniemy się na jakieś problemy techniczne – w większości wypadków najlepszym wyjściem jest pozostawianie automatycznego instalowania. Zdecydowanie nie zalecamy natomiast całkowitego wyłączania Windows Update, bo mechanizm ten zapewnia krytyczne poprawki bezpieczeństwa. Jak można go skonfigurować zgodnie z własnymi potrzebami dowiecie się z innego naszego poradnika.

Here you can find, download and install Windows updates manually.
Random applications opening when pressing any key on the keyboard - Press the windows and alt key at the same time. This resolves the problem every time for me! Hope this helps.

How to manually install language pack on your Windows 10 20H2 system:
    Download FOD Disk ISO from here;
    Extract required language pack using something similar to AnyBurn utility;
    In your system press Win+R and type lpksetup.exe, select your .cab file and install it.



пʼятниця, 18 жовтня 2019 р.

How to create Hard and Soft Symbolic Links with mklink

Windows 10, 8, 7, and Vista all support symbolic links—also known as symlinks—that point to a file or folder on your system. You can create them using the Command Prompt or a third-party tool called Link Shell Extension.

What Are Symbolic Links?

Symbolic links are basically advanced shortcuts. Create a symbolic link to an individual file or folder, and that link will appear to be the same as the file or folder to Windows—even though it’s just a link pointing at the file or folder.
For example, let’s say you have a program that needs its files at C:\Program. You’d really like to store this directory at D:\Stuff, but the program requires that its files be at C:\Program. You could move the original directory from C:\Program to D:\Stuff, and then create a symbolic link at C:\Program pointing to D:\Stuff. When you relaunch the program, it will try to access its directory at C:\Program. Windows will automatically redirect it to D:\Stuff, and everything will just work as if it were in C:\Program.
This trick can be used for all sorts of things, including syncing any folder with programs like Dropbox, Google Drive, and OneDrive.
There are two type of symbolic links: Hard and soft. Soft symbolic links work similarly to a standard shortcut. When you open a soft link to a folder, you will be redirected to the folder where the files are stored.  However, a hard link makes it appear as though the file or folder actually exists at the location of the symbolic link, and your applications won’t know any better. That makes hard symbolic links more useful in most situations.
Note that Windows doesn’t actually use the terms “hard link” and “soft link”. Instead, it uses the terms “hard link” and “symbolic link”. In the Windows documentation, a “symbolic link” is the same thing as a “soft link”. However, the mklink command can create both hard links (known as “hard links” in Windows) and soft links (known as “symbolic links” in Windows).

How to Create Symbolic Links with mklink

You can create symbolic links using the mklink command in a Command Prompt window as Administrator. To open one, locate the “Command Prompt” shortcut in your Start menu, right-click it, and select “Run as Administrator”.
On Windows 10’s Creators Update, you can use a normal Command Prompt window, without running it as an Administrator. However, to do this without an Administrator Command Prompt window, you must first enable Developer Mode from Settings > Update & Security > For Developers.
Without any extra options, mklink creates a symbolic link to a file. The below command creates a symbolic, or “soft”, link at Link pointing to the file Target :
mklink Link Target
Use /D when you want to create a soft link pointing to a directory. like so:
mklink /D Link Target
Use /H when you want to create a hard link pointing to a file:
mklink /H Link Target
Use /J to create a hard link pointing to a directory, also known as a directory junction:
mklink /J Link Target
So, for example, if you wanted to create a hard link at C:\LinkToFolder that pointed to C:\Users\Name\OriginalFolder, you’d run the following command:
mklink /J C:\LinkToFolder C:\Users\Name\OriginalFolder
You’ll need to put quotation marks around paths with spaces. For example, if the folders are instead named C:\Link To Folder and C:\Users\Name\Original Folder, you’d use the following command instead:
mklink /J "C:\Link To Folder" "C:\Users\Name\Original Folder"
If you see the message “You do not have sufficient privilege to perform this operation.”, you need to launch the Command Prompt as Administrator before running the command.
How to remove a symbolic link?
MKLINK cannot use to delete symbolic link. To remove a symbolic link, simply delete them as if you’re removing a normal file. Just make sure you don’t delete the original file.

середа, 2 жовтня 2019 р.

Delphi helpful thing you should have

On my opinion, every Delphi coder should have such things installed in its IDE:

CnPack
IDE Fix Pack
DDevExtensions
DDevExtensions fork for Delphi 10.4+




You have to add "android:requestLegacyExternalStorage="true"" in the AndroidManifest.template.xml


This component has as main purpose, to facilitate the request of resource permissions on Android. With just a few lines of code it is possible to facilitate this work in mobile Android applications.


Library to create demo versions of Delphi and CBuilder apps: time-limited, feature-limited, limited to num of uses or num of concurrent network users.Supported on platforms: Windows, OS X, iOS, Android

Message Bus Pattern for Delphi. Send (publish) Message of any type in one place and receive it (subscribe) in many places.

QRCode supported Arabic text:

DelphiServiceManager

Service manager classes by Gurus Ritsaert Hornstra and Darian Miller. I (Tommi Prami) did some tweaking and refactoring. Slapped on premissive MIT licence if no objections (Original didn't have any).

https://github.com/TommiPrami/DelphiServiceManager


Tip: If you use the Offline Installer, RAD Studio will not be able to access the GetIt Package Manager until you manually switch to "online mode". To do this, we recommend using the GetItCmd.exe tool: GetItCmd.exe -c=useonline

Download links:

You can download the 10.3.3. version via:
30896 RAD Studio, Delphi, C++Builder 10.3.3 ISO (embarcadero.com)

You can download the 10.4.1. version via:
WEB: https://altd.embarcadero.com/download/radstudio/10.4/RADStudio-10-4-1-esd-1461.exe
ISO: https://altd.embarcadero.com/download/radstudio/10.4/radstudio_10_4_101461a.iso


DelphiPraxis · GitHub - interesting Delphi libraries


Disable Ctrl+D auto formating text.



Warning options
https://marc.durdin.net/2012/05/delphi-xe2s-hidden-hints-and-warnings-options/

середа, 7 серпня 2019 р.

How to Fix Windows Error Code 14xx (1400, 1410, 1411 etc) in your 32 bit multithreaded service application

We got some strange kinds of error in our 32 bit multithreaded service on Windows x64 Server 2012. After some time (actually few hours after restart the system) properly working, the service starts to push errors like "System error. Error code 1400". The solution below fixed our issue.
This is a "desktop heap" problem. A very good discussion can be found here:
Note that this only applies to programs that are running as services, because the default desktop heap size for services is so much smaller than that for applications.
In our case, we were able to launch about 100 child processes before running out of resources without the change. With the change, this number can be increased considerably.
This is the answer we've given to our end users on our knowledgebase:
WARNING: this affects the desktop heap of all services! Do not make it larger than necessary or you will push the system to consume more resource and you may bump up against problems in the total available desktop heap size.
If you find that you cannot open more than about 100 total projects, even on a very large RAM server, you may have run into a limit of the Windows "desktop heap size".
The problem is that service sessions under windows (where the services run) have less of this "desktop heap" space available for creating windows.
The short version is:
  • Services get smaller desktop heaps than interactive sessions.
  • Desktop heap size limits the number of windows
  • Each sub-server creates one or more “windows” even if we can’t see them.
Solution:
  1. Backup your registry before making any changes!
  2. Run regedit.exe as administrator
  3. Edit the registry value:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows
    
  4. You will see a string like:
    %SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,20480,768 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ServerDll=sxssrv,4 ProfileControl=Off MaxRequestThreads=16
    
The critical bit is:
SharedSection=1024,20480,768
The second number (20480) is the size for interactive sessions. The third number (768) is the size of non-interactive (services) sessions. Note how the third number is 26x smaller than the second. Experimentally, we found that changing this to:
SharedSection=1024,20480,2048
Increased the project limit from 106 to 270, almost perfectly scaling with the heap size. Pick a value that reflects the maximum number of projects that you expect to be opened simultaneously by all users on the system. Do not make this value larger than necessary, and no larger than 8192, as each service in your system will consume more of a precious resource.
You will need to reboot for these new settings to take effect.
Another articles could be interesting to read: