====== Windows OS ======
* [[habrahabr>254211|Да здравствует мыло душистое, или как исправить неправильное масштабирование Windows программ]]
=== Drivers ===
* Drivers for DELL Vostro 1320 can be found [[http://support.dell.com/support/downloads/driverslist.aspx?c=us&l=en&s=gen&catid=-1&dateid=-1&formatid=-1&hidlang=en&hidos=WLH&impid=-1&os=W764&osl=EN&servicetag=HQ1CMK1&SystemID=VOS_N_1320&TabIndex=&typeid=-1|here]].
* [[https://devid.info/|Free driver search and update utility]]
=== Utilities ===
* [[http://technet.microsoft.com/en-us/sysinternals/bb842062|Sysinternals Suite]]
===== Questions answered =====
=== How to install and uninstall APPX application on Windows 10? ===
* Download APPX file from [[https://store.rg-adguard.net/|this website]] by pasting the Microsoft application URL into the box.
* Install from PowerShell: ''Add-AppxPackage -Path D:\Microsoft.UI.Xaml.2.3_2.32002.13001.0_x64.appx''
* Uninstall from PowerShell: ''Get-AppxPackage Microsoft.UI.Xaml* | Remove-AppxPackage''
* List all installed packages: ''Get-AppxPackage | Select Name, PackageFullName''
=== How to uninstall Microsoft Edge Windows 10? ===
Apply the following changes in registry:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge]
"NoRemove"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView]
"NoRemove"=dword:00000000
After that Microsoft Edge and Microsoft EdgeWebView could be uninstalled in usual way from Control Panel.
See also: [[superuser>1823821/uninstall-microsoft-edge-windows-11|Uninstall Microsoft Edge Windows 11]].
=== Windows Update reports that Windows 11 cannot be installed on this computer ===
Check the following:
* [[https://support.microsoft.com/en-us/windows/enable-tpm-2-0-on-your-pc-1fd5a332-360d-4f46-a1e7-ae6b0c90645c|TPM 2.0 is enabled in BIOS]]. On [[https://faq.shuttle.eu/faq:software:windows#windows_11_compatibility|Shuttle PC]] enable //Advanced → TPM Configuration → Security Device Support// and after boot check that "Trusted Platform Module 2.0" device is present in Device Manager.
* [[https://support.microsoft.com/en-us/windows/windows-11-and-secure-boot-a8ff1202-c0d9-42f5-940f-843abef64fad|UEFI boot]] is enabled in BIOS: //Boot → Boot Mode Select = UEFI//
=== [[https://www.howtogeek.com/217348/how-to-record-the-sound-coming-from-your-pc-even-without-stereo-mix/|How to record audio from speakers?]] ===
If "Stereo Mix" is not installed because sound drivers do not support it, you may use Audacity Windows WASAPI input (choose from drop-down list to the left from the microphone icon on the toolbar).
=== How to skip Microsoft account creation during Windows setup? ===
The general idea is to disable network (would be wise not to enable it at all). During installation process:
* Press Shift + F10 to start cmd.
* Run ''ncpa.cpl'' and disable WiFi network adapter.
* Run ''taskmgr'' and terminate installation master. The master will be restarted and this time you will see "Limited experience" option which you can use.
==== Network & internet ====
=== Wake up the PC using [[wp>wake-on-LAN]] function ===
Use [[https://www.matcode.com/wol.htm|MC-WOL utility]] ({{:work:mc-wol.7z|local copy}})
=== [[superuser>410490|How to share Internet connection via Wifi?]] ===
{{ windows_shared_connection.png|Setup shared connection}}
One can follow the instructions to [[lifehacker>5369381/turn-your-windows-7-pc-into-a-wireless-hotspot|turn Your Windows 7 PC Into a Wireless Hotspot]], however such hotspot is not recognized by some devices (see [[https://answers.yahoo.com/question/index?qid=20121218091847AAPLIA9|The majority of Android devices do not support Ad-hoc connections]], [[https://community.connectify.me/connectify/topics/can_this_be_used_to_get_wifi_network_on_samsung_galaxy_s3_from_my_laptops_ad_hoc_network#reply_12876998|Android devices do not support connecting to Ad-Hoc networks]] and
[[http://www.connectify.me/hotspot-faq/#q5|What is the difference between Access Point mode and Ad Hoc mode?]]).
Luckily there is way to [[superusera>410506|set up your windows machine as a very simple wireless access point]]:
netsh wlan set hostednetwork mode=allow ssid= key= keyUsage=persistent
netsh wlan start hostednetwork
After that you should enable connection sharing in the network interface that provides Internet (this interface may well be a WiFi connection established via the same WiFi card (e.g. //Intel 6250 WiFi//), but usually this is //Local Area Connection//). For that go to //Properties -> Sharing//, enable //Allow other users to connect through this computer's Internet connection// and select //Microsoft Virtual WiFi Miniport Adapter// as an interface to share this connection with (check [[http://windows.microsoft.com/en-US/windows-vista/Using-ICS-Internet-Connection-Sharing|Using ICS]] for details).
[[superusera>485341/28311|Is it not possible to hide the SSID of the Windows 7 soft AP]].
If your system does not show //Microsoft Hosted Network Virtual Adapter// in //Network connections// then it seems that [[superusera>373873|your WiFi card or driver does not support AP mode]].
To define a new range for your internal IP addresses, trick ''ScopeAddress'' and ''ScopeAddressBackup'' in ''HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters'' and then restart //Internet Connection Sharing// service. For more details about how to fine-tune ICS service see [[http://www.jpuddy.net/2009/11/11/changing-the-dhcp-range-for-internet-connection-sharing-in-windows-7/|here]].
If the client cannot obtain the IP address, check that ICS is set on //Microsoft Virtual WiFi Miniport Adapter// (see [[superuser>339448|this post]]).
=== How to share internet connection via USB? ===
From [[superuser>69656|How to share Internet between two computers via USB]]:
Using USB-to-USB cable like Belkin Easy Transfer:
{{http://i.stack.imgur.com/0mJsw.png|Belkin Easy Transfer}}
[[https://www.amazon.com/UGREEN-Transfer-Cable-Windows-transferring/dp/B019DI3RV8|{{https://images-na.ssl-images-amazon.com/images/I/51xvw14SBtL._SX466_.jpg?200|UGREEN Transfer Cable}}]]
or [[http://www.amazon.co.uk/dp/B00AQM8586?gclid=COaGg--ltr0CFQ_HtAodzzUA4w#productDetails|USB 3.0 to Gigabit Ethernet Network Adapter]]:
{{http://ecx.images-amazon.com/images/I/412Yg5V6w1L._SX300_.jpg}}
or [[http://www.ebay.com/itm/131119327723?_trksid=p2055120.m1438.l2649|USB3.0 3× port hub + Gigabit ethernet network adapter]]:
{{http://i.ebayimg.com/00/s/NjUwWDc1MA==/z/a5EAAOxyYSdTAkcF/$_12.JPG?300}}
Exposing file as block device to USB host using ''[[github>torvalds/linux/blob/master/Documentation/usb/gadget-testing.rst#8-mass-storage-function|usb_f_mass_storage.ko]]'' module and then mounting it via loopback:
* [[https://unix.stackexchange.com/questions/120368|Make a computer act as a virtual USB device for other equipments]]
* [[stackoverflow>17624815|Emulate physical USB device Linux]]
* [[https://www.emcraft.com/som/stm32f7-212/stm32f7-usb-storage|Using USB Mass Storage Gadget]]
Exposing filesystem using [[wp>Media_Transfer_Protocol|MTP]]:
* [[github>viveris/uMTP-Responder|uMTP-Responder]] -- supports among others [[wp>Raspberry_Pi#Pi_Zero|Raspberry PI Zero (W)]] and [[wp>BeagleBoard#BeagleBone_Black|BeagleBone Black]].
* [[https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md|Setting up a Raspberry Pi as an access point in a standalone network (NAT)]]
Programming [[wp>Media_Transfer_Protocol|MTP]] under Windows:
* [[https://docs.microsoft.com/en-us/windows/win32/api/portabledeviceapi/nn-portabledeviceapi-iportabledevicemanager|IPortableDeviceManager interface]]
* ''[[github>tpn/winsdk-10/blob/master/Include/10.0.10240.0/um/PortableDeviceApi.h|PortableDeviceApi.h]]'' --header files from Windows SDK
* [[https://sourceforge.net/projects/farplugs/files/|FarPortaDev_3.13.0.4040_x64.7z]] -- example on C++ which utilizes Portable Device API
* [[stackoverflow>5626710/can-i-use-com-from-java-via-jna|Can I use COM from Java via JNA?]]
* [[github>java-native-access/jna/blob/master/www/PlatformLibrary.md#typelib-parsing|Typelib parser and code generator]] ([[github>matthiasblaesing/TlbCodeGenerator#generation|Maven plugin]])
See also:
* [[wp>Ethernet over USB]]
* [[http://www.linux-usb.org/usbnet/|The GNU/Linux "usbnet" Driver Framework]]
=== How to connect computers using null-modem cable? ===
Check [[https://powerlink.emc.com/nsepn/webapps/btg548664833igtcuup4826/public/CLARiiON_CX4/CX4_Troubleshooting_Flowcharts/flowcharts/configure_PPP_on_your_windows_computer.htm|Configuring PPP on Your Windows Computer]] and [[http://vworld.nl/?p=1439|Setting up a PPP connection with Windows 7]].
* Open //Device manager// and click //Action -> Add legacy hardware//.
* Select //Install the hardware that I manually select from the list (Advanced)// and choose //Modems//.
* Select //Don't detect my modem; I will select it from a list//, and then click //Next//.
* Select the following options, and click Next:
* In the //Manufacturer// column, select //(Standard Modem Types)//.
* In the //Models column//, select //Communications cable between two computers//.
* Click //Selected ports//, select a port that is not used by the installed modem (say, COM4), and click //Next//.
Set up dial-up networking by doing the following:
* Click //Control Panel -> Network and Internet -> Network and Sharing Center -> Set up a new connection or network//
* When the //Set Up a Connection or Network// wizard starts, select //Set up a dial-up connection// and click //Next//.
* Select //Communications cable between two computers//, click //Next//.
* Enter any dummy phone number (e.g. "0") and press //Next//.
Go to //Control Panel -> Network and Internet -> Network Connections -> Dial-up Connection -> [right click] -> Properties//
* Click the //Configure...// button on the //General// tab.
* From the //Maximum speed// drop-down list, select 921600 bps.
* Make sure //Enable hardware flow control// is selected, and then click OK.
* Click the //Options// tab, then click //PPP Settings...//.
* Make sure that //Enable LCP extensions// and //Enable software compression are selected//, and then click OK.
* Click the //Networking// tab, select //Internet Protocol (TCP/IP)//, and then click //Properties//.
* Make sure that //Obtain an IP address automatically// and //Obtain DNS server address automatically//, are selected and then click //Advanced...//.
* Clear //Use default gateway on remote network//, select //Use IP header compression//, and then click //OK// three times.
See also [[http://social.technet.microsoft.com/Forums/windows/en-US/5858797c-bc75-4e3f-bca4-d988fadd7581/setting-up-a-ppp-connection-using-communications-cable-between-two-computers?forum=w7itpronetworking|problems]].
=== How to change the default DNS suffix? ===
{{ windows_dns_suffix.png?300|Screenshot}}
//System Properties// -> //Change...// -> //More...//
In Linux the analogous value is the value of ''search'' in ''/etc/resolv.conf''.
=== How to mount NFS share? ===
{{ windows7_features.png?300|Screenshot}}
Go to //Control Panel -> Programs -> Programs and Features//. Then click on //Turn Windows features on or off// then select //Services for NFS -> Client for NFS//. After reboot:
mount \\192.168.1.1\backup k:
=== What are the possible values for ''HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters'' key? ===
See:
* [[http://osr507doc.sco.com/en/ASUSystemG/asusystemT.asureg_lanmanserver.html|Lanman Server Parameters]]
* [[http://support.microsoft.com/kb/136712|Вопросы и ответы о средствах обзора в Windows]]
=== How to enable guest (no password) access to file shares? ===
Navigate to //Control Panel -> Network and Internet -> Network and Sharing Center -> Advanced sharing settings// and //Turn off Public folder sharing//. This will enable Guest account automatically.
Without this when trying to mount this Windows returns ''Error code: 0x80004005 Unspecified error'' and Linux ''mount error(12): Cannot allocate memory''.
You may also wish to turn off public folder sharing.
=== How to disable Windows from announcing itself as domain browser? ===
How is it possible to suppress the following message in logs:
''nmbd: process_local_master_announce: Server STATION at IP 192.168.1.1 is announcing itself as a local master browser for workgroup WORKGROUP and we think we are master. Forcing election.''
Add the following to your registry (from [[superuser>205163#206098|here]]):
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Browser\Parameters]
"IsDomainMaster"="No"
=== My Windows shares are not visible for neighbouring computers ===
For [[http://www.kaspersky.ru|KAV/KIS]] users you need to change the network type to "Trusted network" as shown [[http://support.kaspersky.com/faq/?qid=208280576|here]].
=== How to access DAV folder from Windows? ===
There are several WebDAV clients for Windows:
* [[http://www.mydocsonline.com/info_webfolders.html|Web Folder]] is integrated into Explorer. It supports HTTP/HTTPS.
* [[http://forum.farmanager.com/viewtopic.php?f=5&t=6317|NetBox]] -- SFTP/SCP/FTP/FTPS/WebDAV client for [[Far]].
* [[http://cyberduck.io/|Cyberduck]] -- FTP, SFTP, WebDAV, S3 & OpenStack Swift browser for Mac and Windows.
* [[http://devwfb.blogspot.com/2008/07/how-to-map-https-only-web-folder-to.html|How To Map A HTTPS-only Web Folder To A Drive]] (or [[http://smallvoid.com/article/winnt-webdav-network-drive.html|Mapping WebDAV folder as a network drive letter]]) is a way to map remote folder via ''net use'' utility.
=== [[serverfault>308781|WebDav results System Error 67 in Windows XP]] ===
I have tried this advise:
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters]
; For Windows XP:
;"UseBasicAuth"=dword:00000002
; For Windows Vista and higher:
"BasicAuthLevel"=dword:00000002
but it didn't work for me. See also:
* [[http://doc.owncloud.org/server/5.0/user_manual/files/files.html#windows|Accessing your WebDav files]]
* [[http://www.yeehawup.com/2011/07/mapping-a-network-drive-to-webdav-share-in-windows-7/|Mapping a Network Drive to WebDAV Share in Windows 7]]
* [[http://www.parashift.com.au/blog/2013/10/webdav-with-basic-authentication-and-windows-7|WebDAV with Basic Authentication and Windows 7]]
=== How to configure Windows Firewall? ===
One can do it:
* via //Control Panel -> Windows Firewall//
* using the registry ''HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\FirewallRules''
* using CLI:
netsh advfirewall firewall add rule name="WePrint" dir=in action=allow profile=any description="MyServer Firewall Exception" program="C:\Program Files\MyServer.exe" enable=yes
References:
* [[http://www.sevenforums.com/tutorials/542-windows-firewall-add-remove-exception.html|Windows Firewall – Add or Remove an Exception]]
* [[http://community.spiceworks.com/topic/245706-win-7-inbound-firewall-exception-registry-edit|Edit Win 7 inbound firewall exception in registry]]
* [[http://www.autohotkey.com/board/topic/50583-programatically-add-windows-firewall-exception-need-help/|Programatically add Windows Firewall Exception]]
==== Booting & recovery ====
=== Removing the entry from boot menu ===
In Windows 7 it is no longer possible to edit ''boot.ini'' file to add/remove new boot entries. Now you have to do it with ''bcdedit'' utility:
* ''bcdedit /v'' will display all boot entries together with entry UIDs
* ''bcdedit /delete {83838-234234-44234234-234234}'' (ID will be different in your case) will remove this entry
=== Recovering the Vista or Windows 7 Bootloader from the DVD ===
* Read [[http://neosmart.net/wiki/display/EBCD/Recovering+the+Vista+Bootloader+from+the+DVD|Recovering the Vista or Windows 7 Bootloader from the DVD]]
* Main guidelines (please, refer the documentation before executing):
bootrec.exe /fixmbr
bootrec.exe /fixboot
x:\boot\bootsect.exe /nt60 all /force
bootrec.exe /rebuildbcd
* If you get ''Element not Found'' error, that means, the partition is not marked as active. Use ''diskpart'' utility and execute((Read [[http://www.pcstats.com/articleview.cfm?articleid=2264&page=9|here]], [[http://social.technet.microsoft.com/Forums/en/w7itproinstall/thread/7791044e-db7f-4144-a96c-945299811f58|here]], [[superuser>66282/bootmgr-is-missing-windows-7|here]] about how to overcome this error message)):
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 298 GB 1024 KB
DISKPART> select disk 0
Disk 0 is now the selected disk.
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 OEM 39 MB 31 KB
Partition 2 Primary 24 GB 40 MB
Partition 3 Primary 273 GB 24 GB
DISKPART> select partition 2
Partition 2 is now the selected partition.
DISKPART> active
=== After installation of Windows I've found that system files are located on the different system drive. How to transfer them? ===
On Windows XP:
* Copy files ''BOOT.INI'', ''NTDETECT.COM'', ''NTLDR'', ''Bootfont.bin''. I suggest to modify the label to make sure the right ''BOOT.INI'' is used.
* Make the necessary partition active.
* Reboot.
See [[http://forum.ru-board.com/topic.cgi?forum=62&topic=12491#4|Перенос NTLDR с раздела на раздел, с диска на диск]] and [[superuser>979578|Make Windows bootable after copying from one partition to another]].
=== How to fix MBR? ===
* From [[http://www.computerhope.com/issues/ch000175.htm|Additional information on FDISK /MBR]]:
The ''fdisk /mbr'' command is an undocumented switch used with the FDISK command (MS-DOS 5.0 and higher) that recreates the master boot record (loader) on a hard drive.
Use ''fdisk /cmbr '' where '''' represents the drive you want to recreate the master boot record. To determine the drive number, run the ''fdisk /status'' command.
* In Windows recovery console use ''bootrec.exe /fixmbr'' or ''fixmbr '' e.g. ''fixmbr \Device\HardDisk0''.
* On Linux use [[SourceForge>ms-sys|ms-sys]]: ''ms-sys -7 /dev/sd**x**''
* On Linux you can also do the following: ''dd if=/dev/hd**x** of=/dev/hd**y** bs=446 count=1''
* From [[http://www.wilderssecurity.com/threads/please-read-before-you-post.55317/|Acronis forum]]: Download [[http://www.acronis.com/files/support/mbrautowrite_en.iso|mbrautowrite_en.iso]] and boot from it.
=== How to create a bootable Windows USB flash? ===
- Download and install ''[[https://www.raymond.cc/blog/wp-content/plugins/download-monitor/download.php?id=3132|Windows_7_SP1_Updates_x64.ulz]]'':
WindowsUpdatesDownloader.exe -install Windows_7_SP1_Updates_x64.ulz
- Open ''[[http://www.windowsupdatesdownloader.com/ProgramFiles.aspx|WindowsUpdatesDownloader.exe]]'' and download all critical updates for Windows 7 SP1.
- Download [[https://www.ntlite.com/download/|NTLite]]
See also:
* [[superuser>62193|Install Windows 7 from USB flash drive]]
* [[https://www.raymond.cc/blog/create-an-integrated-up-to-date-windows-7-install-disc/|Create an integrated up to date Windows 7 install disc]]
=== How to merge Windows 7 installation images into one? ===
For example, I have two ISO images (one with ×64 and one with ×32 installations). How to merge them into one?
From [[http://www.sevenforums.com/installation-setup/315177-how-do-merge-win8-win7-installation-together-same-setup-1-dvd.html#post2626375|Kow do merge Win8 & Win7 installation together in the same setup DVD]] and [[http://chall32.blogspot.nl/2009/11/windows-7-all-in-one-32-and-64-bit-dvd.html|All in One (32 & 64 bit) DVD HOWTO]] and [[http://forums.mydigitallife.info/threads/52253-Merge-windows-8-32-bit-and-64-bit-Dart-as-one-iso?p=871479&viewfull=1#post871479|Merge windows 8 32 bit and 64 bit as one ISO]]:
* Copy the contents of your ×32 installation disk into e.g. ''D:\x32\''
* Mount your ×64 installation disk as ''F:'' and do the following commands:
* ''%%imagex /export /compress maximum "F:\sources\install.wim" 1 "D:\x32\sources\install.wim" "Windows 7 Home Basic (x64)"%%''
* ''%%imagex /export /compress maximum "F:\sources\install.wim" 2 "D:\x32\sources\install.wim" "Windows 7 Home Premium (x64)"%%''
* ''%%imagex /export /compress maximum "F:\sources\install.wim" 3 "D:\x32\sources\install.wim" "Windows 7 Professional (x64)"%%''
* ''%%imagex /export /compress maximum "F:\sources\install.wim" 4 "D:\x32\sources\install.wim" "Windows 7 Ultimate (x64)"%%''
* Open ×32 installation disk in UltraISO and remove all contents (bootable data is preserved). Add everything from ''D:\x32\'' and create ISO.
See also:
* [[https://technet.microsoft.com/en-us/library/cc722145%28v=ws.10%29.aspx|ImageX]] -- utility to create Windows images or to incorporate service packs into Windows image.
=== How to remove Windows 7 Service Pack backup files? ===
dism /online /Cleanup-Image /SPSuperseded
To remove old versions of system components (system updates cannot be uninstalled after this operation):
dism /online /Cleanup-Image /StartComponentCleanup /ResetBase
References:
* [[http://www.ghacks.net/2011/02/23/remove-windows-7-sp1-backups-to-free-up-disk-space/|Remove Windows 7 SP1 Backups To Free Up Disk Space]]
* [[lifehackeru>2013/11/05/kak-umenshit-razmer-papki-winsxs-v-windows-7-i-8|Как уменьшить размер папки WinSxS в Windows 7 и 8?]]
=== How to stop windows from restarting your computer after updates? ===
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
"NoAutoRebootWithLoggedOnUsers"=dword:00000001
=== [[http://superuser.com/a/922069|How to disable the "Get Windows 10" icon shown in the notification bar?]] ===
From [[http://www.infoworld.com/article/2974479/microsoft-windows/how-to-get-rid-of-the-your-upgrade-to-windows-10-is-ready-lock-on-windows-update-in-win7-and-8-1.html|How to get rid of the 'Your upgrade to Windows 10 is ready' lock]]:
Remove ''%WINDIR%\System32\GWX'' folder. Then uninstall [[https://support.microsoft.com/en-us/kb/3035583|KB3035583]] and [[https://support.microsoft.com/en-us/kb/2952664|KB2952664]]. Finally mark these updates hidden.
Also add the following to registry:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Gwx]
"DisableGwx"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade]
"ReservationsAllowed"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate]
"DisableOSUpgrade"=dword:00000001
=== Sometimes just after recovering from sleep mode WiFi card stops working ===
After recovering from sleep mode system does not react on WiFi on/off toggle and refuses to go to sleep mode again complaining that WiFi driver prevents it.
Try to set the highest power level via WiFi driver settings as [[http://genesis.sony-europe.com/instranet/ccil_sony/selfservice/search.jsp?DocId=29916|advised here]]: //Advanced -> Ad Hoc Power Management = Maximum Power Settings//.
Also this helps when WiFi connection is unstable (drops down) under high load.
==== System ====
=== Switching Windows 7 to another product key ===
Run the following sequence of steps:
* to setup a new product key: \\
''slmgr.vbs -ipk GJ9BQ-8QK7G-BTR2G-9PW1Y-9RFY8''
* to activate windows: \\
''slmgr.vbs -ato''
* to check operation status: \\
''slmgr.vbs -dlv''
=== Windows 7 activation ===
* [[torrents>3908973|Активация Windows 7]]
* [[http://rutracker.org/forum/viewtopic.php?p=60179317#60179317|Как прошить SLIC 2.1 в BIOS?]]
* [[habrahabr>75384|Активацию Windows 7 доломали окончательно]]
=== Automatic elevation of administrator rights ===
* In order to activate automatic elevation of administrator rights start ''secpol.msc'' utility, navigate to //Local Policies -> Security Options// and change //User Account Control: Behaviour of the elevation prompt for administrators in Admin Approval Mode// to //Elevate without prompting// value.
* Alternatively you can tick //Run as administrator// in link properties.
* Or you can right-click on program shortcut in main menu and //Run as administrator//
See also [[http://www.petri.co.il/disable-uac-in-windows-7.htm|Disabling User Account Control (UAC) in Windows 7]].
=== Elevation of administrator rights for CMD scripts ===
One can use [[superusera>209045|runas /user:Administrator cmd ...]] for that, but this requires knowing who is local administrator.
Better use some utility like [[http://code.kliu.org/misc/elevate/|this]] or [[http://jpassing.com/2007/12/08/launch-elevated-processes-from-the-command-line/|that]].
=== How terminate the process by given command line criteria? ===
''[[https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/taskkill.mspx?mfr=true|taskkill]]'' does not provide the filtering by command line. The solution is to use ''[[https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/wmic_overview.mspx?mfr=true|wmic]]'' to display command line and then standard CygWin tools to filter and cut the PID and finally terminate the process by PID:
''%%taskkill /F /PID `wmic process where Description=\"java.exe\" get ProcessID,CommandLine | perl -ne '/command-line-filter\s+(\d+)/ && print $1'`%%''
=== [[superuser>42124|How can I put the computer to sleep from command line?]] ===
* sleep((Will hibernate instead of sleep if you don't turn the hibernation off)): \\
''rundll32.exe powrprof.dll,SetSuspendState 0,1,0''
* sleep: \\
''psshutdown -d -t 0''
* lock: \\
''rundll32.exe User32.dll,LockWorkStation''
* hibernate: \\
''rundll32.exe PowrProf.dll,SetSuspendState''
* restart: \\
''shutdown.exe -r -t 00''
* shutdown: \\
''shutdown.exe -s -t 00''
=== The menu item //Start -> Shutdown -> Sleep// is disabled ===
There might be different reasons for that:
* Your BIOS is out of date. \\
Update your BIOS firmware.
* S1/S3 ACPM option is disabled in BIOS. \\
Enable this option in BIOS.
* Your graphic video card driver prevents this. \\
Update your video card driver. Make sure the standard (default) video driver is not used (disabled).
More information:
* [[http://windows.microsoft.com/en-us/windows7/Sleep-and-hibernation-frequently-asked-questions|Sleep and hibernation: frequently asked questions]]
* [[http://social.technet.microsoft.com/Forums/en/itprovistahardware/thread/05fa4693-8b01-47eb-8a9a-027b5b8b8c06#53e15fb0-8e30-445e-9a13-6e023f9d600f|Enable sleep/standby options in gpedit.msc]]
=== [[http://www.techrepublic.com/blog/tr-dojo/delete-hiberfilsys-by-disabling-windows-hibernate-function/|How to disable hibernation and remove ''hiberfil.sys'']]? ===
Run ''powercfg.exe -h off''. If that fails with error 0xc000007f, then free more space on drive C: (''hiberfil.sys'' can only be created on C: but ''pagefile.sys'' can be moved to another drive, see //Control Panel -> Performance Information and Tools -> Advanced Tools// -> click on //Adjust the appearance and performance of Windows// -> tab //Advanced// -> click on //Change//).
=== Computer wakes up after hibernation ===
After I have put my computer to hibernation, it starts up by itself.
Check the following:
* There is wake up time scheduled in BIOS. Reset your BIOS.
* Some Windows scheduled task has //Wake the computer to run this task// options set (see [[http://www.howtogeek.com/204742/how-to-make-any-computer-boot-up-or-shut-down-on-a-schedule/|How to Make Any Computer Boot Up or Shut Down on a Schedule]]).
=== [[serverfault>219930|How do I rename a scheduled task?]] ===
Not possible. One can only export, rename the file and import again.
=== Отказано в доступе к системным файлам ===
{{ kaspersky_program_control.png?400|Управление программами}}
При попытке перезаписать системный файла из CMD скрипта выдаётся ошибка ''Access denied''.
Добавьте данный скрипт в список исключений для [[http://www.kaspersky.ru|KAV/KIS]].
=== [[https://www.winhelponline.com/blog/users-must-enter-a-user-name-and-password-to-use-this-computer-missing-windows-10/|How to enable automatic logon on Windows?]] ===
{{ windows10_auto_logon.png?400|Sign-in options}}
Press Win+R and run ''netplwiz'' (or ''control userpasswords2''). Afterwards select the necessary default user, uncheck "Users must enter a user name and password" and enter the necessary password. Equivalent to:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"AutoAdminLogon"=dword:00000001
"DefaultUserName"="your_account@microsoft.com"
"DefaultPassword"="microsoft_password"
:INFO: On Windows 10: If this option is not present then to go //Settings -> Accounts -> Your info// and click on //Sign in with a local account instead//.
:INFO: On Windows 10: Turn of //Settings -> Accounts -> Sign-in options -> Require Windows Hello sign-in for Microsoft accounts// and disable //Windows Hello PIN// or apply the following reg file:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device]
"DevicePasswordLessBuildVersion"=dword:00000000
=== How to force Windows to remember my last login name? ===
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System]
"DontDisplayLastUserName"=dword:00000000
=== Hiding a user from login menu ===
For each user you want to hide at login screen, create an ''DWORD'' entry with a name matching the user ID:
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList]
"backuppc"=dword:00000000
More information: [[http://seclists.org/fulldisclosure/2005/Aug/0101.html|here]], or [[http://www.petri.co.il/hide_a_user_from_the_welcome_screen_in_windows_xp.htm|here]], or [[http://www.intelliadmin.com/index.php/2006/09/hide-user-accounts-from-the-windows-xp-welcome-screen/|here]].
=== [[http://www.computerhope.com/issues/ch000725.htm|How to disable internal speaker?]] ===
{{ windows_internal_speaker.png?400|Screenshot}}
//Device Manager -> View -> Show hidden devices//, then expand //Non-Plug and Play Drivers -> Beep -> Stop//. Also disable this service in drop-down menu.
=== What services are safe to stop in Windows? ===
* Windows Media Player Network Sharing Service
* Windows Search (there will be no search in //Control Panel//)
* Windows Update
=== The service ''PresentationFontCache.exe'' on Windows 7 loads CPU for 70-100% ===
The fault may happen:
* when WPF-applications are started on Microsoft .NET Framework 3.0 platform
* when video-drivers are reinstalled
* ...
The service creates invalid cache file ''%windir%\ServiceProfiles\LocalService\AppData\Local\FontCache3.0.0.0.dat'' which needs to be deleted to solve the problem.
=== The service ''svchost.exe'' on Windows 7 loads CPU for 25% ===
To find the problematic service use "Resource Monitor" (''%windir%\system32\perfmon.exe /res''). On CPU tab find the problematic service (most likely it will be "Windows Update") and stop it.
See also:
* [[https://www.wintips.org/how-to-fix-svchost-exe-netsvcs-memory-leak-or-high-cpu-usage-problems/|How to fix: Svchost.exe (netsvcs) memory leak or high CPU usage problems]]
* [[https://appuals.com/high-cpu-usage-by-svchost-exe-netsvcs/|BEST FIX: High CPU Usage by svchost.exe (netsvcs)]]
* [[http://www.ekopamag.com/how-to-fix-svchost-exe-netsvcs-high-cpu-usage-problem/|How to Fix Svchost.exe netsvcs High CPU Usage]]
=== [[http://www.hanselman.com/blog/FiguringOutWhyMySVCHOSTEXEIsAt100CPUWithoutComplicatedToolsInWindows7.aspx|How to find out what service consumes CPU?]] ===
Use //Resource Monitor// (better alternative for //Task Manager//) which can be launched from last one (//Performance tab -> Resource Monitor...//).
=== [[ixbt>17:35372-40#1238|Reduce CPU temperature]] ===
* Use better thermopasta
* Use [[http://acerfans.ru/soft/12-rmclock-opisanie-i-nastrojjka..html|RMClock]]
=== [[stackoverflow>11606774|How to get the uptime in Windows?]] ===
* It is shown in //Task Manager// on tab //Performance//.
* It is output by ''systeminfo'' utility.
=== [[http://www.thewindowsclub.com/automatic-memory-dump-settings-windows-8|Disable automatic memory dumps on BSOD]] ===
//Control Panel -> System -> Advance System Settings -> Advanced// tab, click on //Startup and Recovery// and set //Write debugging information// to //none//.
More information:
* [[superuser>1160748|MiniDump folder is empty after BlueScreen crashes]]
* [[https://www.bleepingcomputer.com/download/bluescreenview/|BlueScreenView]] -- free, portable application that allows you to view minidump files.
=== What id Dr.Watson? How to use alternative debugger? ===
[[wp>Dr._Watson_(debugger)|Dr.Watson]] is an application debugger included with the Microsoft Windows operating system.
* [[http://support.microsoft.com/kb/188296|How to remove Dr.Watson]]
* [[http://blogs.msdn.com/b/cobold/archive/2010/03/01/collection-crash-dumps.aspx|Collecting crash dumps]]
* ''[[http://technet.microsoft.com/en-us/library/cc939486.aspx|AeDebug]]'' registry variable.
* [[http://blogs.technet.com/askperf/archive/2007/06/15/capturing-application-crash-dumps.aspx|Capturing Application Crash Dumps]] with Dr.Watson
* [[habrahabr>106751|Как звали Доктора Ватсона?]]
* [[http://msdn.microsoft.com/en-us/library/ee416349.aspx#ID4EGB|Crash Dump Analysis – Writing a Minidump]]
* [[http://msdn.microsoft.com/en-us/windows/hardware/gg487440.aspx|Windows Error Reporting (WER): Getting Started]] (dumps are located in ''%LOCALAPPDATA%\Microsoft\Windows\WER\ReportArchive\'')
* [[http://support.microsoft.com/kb/315263|How to read the small memory dump files that Windows creates for debugging]]
* [[http://msdn.microsoft.com/en-us/windows/hardware/gg463009|Download Debugging Tools for Windows]] (WinDbg software+symbols) ([[http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx|installation steps for Debugging Tools]]).
* [[http://windbg.dumpanalysis.org/|WinDbg Quick Links]] (articles, books)
* [[http://windbg.info/doc/1-common-cmds.html|WinDbg command guide]]
* [[http://www.dumpanalysis.org/blog/index.php/2007/06/20/crash-dump-analysis-checklist/|How to report crash or hang or BSOD]]
Relevant registry settings:
REGEDIT4
; For x64 use this key:
;[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]
; 0 = no prompt is issued to the user before the selected debugger is executed
"Auto"="1"
"UserDebuggerHotKey"=dword:00000000
; Alternative for drwtsn:
;"Debugger"="drwtsn32 -p %ld -e %ld -g"
; Alternative for windbg:
;"Debugger"="C:\\Debug\\windbg -p %ld -e %ld -c \".dump /mfh C:\\myfile.dmp ;q\""
' Two below lines are identical, but later allows the variable expansion:
;"Debugger"="%Applications%\\Debug\\cdb.exe -p %ld -e %ld -g -c \"~*k;.dump /mfh /u %SystemRoot%\\Temp\\crash.dmp;.kill;qd\""
"Debugger"=hex(2):25,50,72,6f,67,72,61,6d,73,25,5c,44,65,62,75,67,5c,63,64,62,\
2e,65,78,65,20,2d,70,20,25,6c,64,20,2d,65,20,25,6c,64,20,2d,67,20,2d,63,20,\
22,7e,2a,6b,3b,2e,64,75,6d,70,20,2f,6d,66,68,20,2f,75,20,25,53,79,73,74,65,\
6d,52,6f,6f,74,25,5c,54,65,6d,70,5c,63,72,61,73,68,2e,64,6d,70,3b,2e,6b,69,\
6c,6c,3b,71,64,22,00
=== 4GB memory support ===
The discussion about that WinXP actually can support more than 3GB of memory is [[http://forum.ixbt.com/topic.cgi?id=22:62047#2|here]]. Is it advised to add ''/pae /3gb /nolowmem'' into your ''boot.init'', but that didn't work for me.
=== How to enable 3GB/1GB split of process virtual space? ===
* Start windows with ''/3Gb'' switch in ''boot.ini''.
* Link application with ''/LARGEADDRESSAWARE'' option.
See [[serverfault>27352|Are there any drawbacks of "/3Gb" switch in boot.ini for 32bit Windows?]] and also [[wp>Physical Address Extension]].
=== Using [[wp>Miracast]] to mirror screen on TV ===
Follow [[https://www.drivereasy.com/knowledge/miracast-in-windows-7-everything-you-need-to-know/|How can I use Miracast in Windows 7]]:
* Check ''netsh wlan show drivers'' output
* Use WiFi adapter which is [[http://www1.wi-fidev.org/product-finder-results?sort_by=default&sort_order=desc&categories=1&subcategories=24&capabilities=2&certifications=4|Miracast-certified]], e.g. Intel 7260/8260 or Qualcomm Atheros AR5B22. Atheros is better choice because of better support on Linux, see [[linux#error_when_trying_to_switch_atheros_card_to_master_mode|Error when trying to switch Atheros card to master mode]].
=== [[http://www.ntfs.com/quest22.htm|How to format flash as NTFS?]] ===
{{ http://www.ntfs.com/images/device-optimize.gif|Screenshot}}
//Device Manager -> Disk drives -> [Select your drive] -> Properties -> Policies -> Optimize for performance//. After that NTFS will appear in list of file system options in format dialog.
=== What are the options to encrypt the data? ===
There are generally two options:
* [[wp>Encrypting File System|EFS]] -- file level encryption within NTFS (available on Windows XP)
* [[http://security.stackexchange.com/questions/8307/how-secure-is-ntfs-encryption|How secure is NTFS encryption?]]
* [[wp>BitLocker Drive Encryption|BitLocker]] -- a full drive encryption (available on Windows Vista and later)
One can use [[http://www.microsoft.com/en-us/download/details.aspx?id=24303|BitLocker To Go Reader]] utility on Windows XP to gain read-only access to encrypted FAT volume.
=== Symbolic & hard links in Windows ===
* For windows XP use ''[[http://www.petri.co.il/download_free_reskit_tools.htm|linkd]]'' or ''[[http://ss64.com/nt/fsutil.html|fsutil]]'' to create links.
* For Windows 7 additionally use [[http://ss64.com/nt/mklink.html|mklink]] to create symbolic links.
* [[http://wesnerm.blogs.com/net_undocumented/2006/10/symbolic_links_.html|Links in Windows]]
Windows XP does not generally support symbolic links, however there is a workaround for it, see [[http://schinagl.priv.at/nt/ln/ln.html#symboliclinksforwindowsxp|Symbolic links for Windows XP]] (from [[stackoverflowa>18593425/267197|Symbolic Link Driver for Windows XP]]). One needs to:
* Download [[http://homepage1.nifty.com/emk/symlink-1.06-x86.cab|CAB]] archive and unpack it.
* Run ''senable.exe install'' to install driver to ''%WINDIR%\system32\drivers''.
* Now one can use ''ln.exe'' utility to create symlinks: ''%%ln.exe -s \\host\share\folder link_name%%''
=== How to set a short file name on NTFS volume? ===
For example after ''fsutil file setshortname C:\development dev'' the contents of the folder will be available both as ''C:\development\'' and и ''C:\DEV\''.
==== CMD ====
* [[http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx|Command-line reference]]
* [[http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/batch.mspx|Using batch files]]
* [[http://www.robvanderwoude.com/bht.php|Collection of batch techniques and tips]]
=== [[stackoverflow>8049002|How to evaluate the last directory entry in the current path]] (e.g. ''C:\Temp\**Local**'')? ===
@echo off
for %%* in (.) do set dir=%%~n*
echo %dir%
=== [[stackoverflow>7005951|How to search for a substring?]] ===
This snippet searches for substring ''%2'' in string ''%1'':
echo %1 | findstr /C:"%2" >nul && (
echo Found
)
=== Why ''%ERRORLEVEL%'' is not working in loop? ===
The reason for that is because CMD expands all ''%''-enclosed variables in loop only once before first iteration. That is why the code
for %%i in (1 2 3) do (
some_util.exe %%i
echo %ERRORLEVEL%
)
does not work: it always prints 0 to console.
Solutions:
- [[stackoverflowa>7141862/267197|Use subcall]] \\
for %%i in (1 2 3) do call :routine %%i
exit /b
:routine
some_util.exe %~1
echo %ERRORLEVEL%
exit /b
- Enable [[stackoverflowa>6782296/267197|delayed expansion]] \\
setlocal enabledelayedexpansion
for %%i in (1 2 3) do (
some_util.exe %%i
echo !ERRORLEVEL!
)
=== How to read lines from file, substitute variables and accumulate in one variable? ===
Suppose you have a file where each line refer some path that may contain a variable:
%APPDATA%\Skype\
%USERPROFILE%\Desktop\
The following script will the lines from that file, apply variable substitution, accumulate them in one variable which can be used as argument for some utility:
@echo off
setlocal enabledelayedexpansion
set args=
for /f %%i in (file.lst) do (
for /f %%a in ('echo %%i') do call :expand %%a
)
7z a -mx=9 -ms=on -mqs=on all.7z %args% > NUL
exit
:expand
set args=%args% %1
exit /b
References:
* [[stackoverflowa>1200871/267197|How expand a CMD shell variable twice (recursively)]]
* [[superuser>288255|How to append a variable in a loop?]]
=== How to include external file into CMD script? ===
From [[stackoverflowa>2763907/267197|Batch file include external file for variables]]:
for /f "delims=" %%x in (common.sh) do (set %%x)
where ''common.sh'' has only lines in format ''var=value''.
=== [[stackoverflowa>25696405/267197|How to check that given executable exists in %PATH%]]? ===
where /q myapplication
IF ERRORLEVEL 1 (
ECHO The application is missing. Ensure it is installed and placed in your PATH.
EXIT /B
) ELSE (
ECHO Application exists.
)
=== What are ''CMD'' alternatives? ===
Check [[googlecode>p/clink/|clink]].
=== To eliminate the need to type the extensions? ===
From [[http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ftype.mspx?mfr=true|Ftype documentation]]:
assoc .ext=Util
ftype Util=C:\Programs\util.exe "%1" %*
set pathext=%pathext%;.ext
After that instead of ''util.exe test.ext'' one may simply type ''test''.
=== [[stackoverflowa>5488111/267197|How to run an endless loop?]] ===
for /L %%n in (1,0,10) do (...)
=== [[stackoverflowa>72796/267197|How to pass an argument to ''start'' that contains spaces?]] ===
start "" "some file with spaces.pdf"
==== User interface ====
=== How to change the border size? ===
{{ windows7_border_size.png?500px|Screenshot}}
* Right click on desktop -> //Personalize// (or navigate to //Control Panel -> Appearance and Personalization -> Personalization//)
* Click on //Window Color -> Advanced appearance settings//, select //Border Padding// from drop-down menu and decrease the value.
=== How to enable grouping of windows on taskbar only for given applications? ===
See [[habrahabr>174593|Дизассемблируем Windows Explorer — отключаем группировку на панели задач]].
=== [[stackoverflowa>113805/28311|How to remove shadow from windows borders?]] ===
Go to //Control Panel -> System and Security -> System Performance Information and Tools -> Adjust visual effects//. In opened dialog uncheck //Show shadows under windows//.
=== [[superuser>666978|How to install a new “display language” onto Windows 8 Single Language?]] ===
[[wp>Windows 8 editions|Windows 8 Single Language]] does not support multiple language, but it is possible to replace the language as discussed in forum using ''dism'' utility.
=== [[http://pcsupport.about.com/od/windowsxp/ht/stealingfocus02.htm|How to prevent programs from stealing focus?]] ===
REGEDIT4
[HKEY_CURRENT_USER\Control Panel\Desktop]
"ForegroundLockTimeout"=dword:00030d40
=== How to automatically setup needed keyboard layouts (input languages)? ===
* Create the following XML file:
* Apply it using the following command:
''%%control intl.cpl,,/f:"input-languages.xml"%%''
The ID e.g. ''0409:00000409'' is composed from language ID (see [[http://msdn.microsoft.com/en-us/library/dd318693%28v=vs.85%29.aspx|Language Identifier Constants and Strings]]) and layout ID (see subkeys of ''HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Keyboard Layouts'').
{{tag>symlink DAV Kaspersky DNS ISO}}