Windows 7: Difference between revisions
Line 112: | Line 112: | ||
* Press '''Shift''', and '''right click''' anywhere on the white space in folder files area. |
* Press '''Shift''', and '''right click''' anywhere on the white space in folder files area. |
||
* Select '''Open command window here'''. |
* Select '''Open command window here'''. |
||
=== Stream Windows Audio to Linux server === |
|||
We use '''[https://github.com/duncanthrax/scream Scream]''', which installs as a virtual sound card on Windows, and publishes sound as a multicast stream. |
|||
On Windows 7 (emitter): |
|||
* Install the driver in the package. |
|||
* Set the Scream (VDM) card as default playback device. |
|||
On Debian Buster (received): |
|||
* Compile Scream for Pulseaudio: |
|||
<source lang="bash"> |
|||
sudo apt install libpulse-dev |
|||
mkdir build && cd build |
|||
cmake .. |
|||
make |
|||
</source> |
|||
* Make sure the port <code>4010</code> is opened in the '''firewall'''. |
|||
* Start scream: |
|||
<source lang="bash"> |
|||
./scream -i enp0s31f6 |
|||
</source> |
|||
== Windows script == |
== Windows script == |
Latest revision as of 17:22, 18 July 2020
Tips
Miscellaneous
- Windows Explorer
- Press shift then right click, to get more options in context menu / SendTo folder
- Enter
shell:sendto
to configure SendTo menu
- Change location of special shell folders (desktop, favorites, my documents)
- Method 1 — Right click on the folder → properties... → Location pane → change location
- Method 2 — Edit registry locations HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders ([1]).
- Note there is also HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders. I also update that one, but the tips does not say so.
- Map network drives for ALL accounts, including administrators
- With UAC enabled, network drives mounted by a user are not available to administrators, nor apps running with elevated privileges
- [2], [3] recommends setting a registry key to bypass that, but it does not work in my Windows 7
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "EnableLinkedConnections"=dword:00000001
- Best solution, use this script to remount shares for admin at startup [4]. Copy following file at C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\remount-admin.vbs
{{#fileanchor: remount-admin.vbs}}
' Script from http://superuser.com/questions/105173/how-to-access-network-shares-from-an-elevated-process-in-windows-7?rq=1
'
' Automatically remount local mapped drives for administrator account, so that these shares are also available to apps
' running in elevated privileges
'
Option Explicit
Dim objNetwork, objShell
Dim strDriveLetter, strNetworkPath
Dim colDrives, intDrive, strDrives
If WScript.Arguments.length =0 Then
Set objNetwork = CreateObject("WScript.Network")
Set colDrives = objNetwork.EnumNetworkDrives
For intDrive = 0 To (colDrives.Count -1) Step 2
rem WScript.Echo colDrives.Item(intDrive) & " is mapped to: " & colDrives.Item(intDrive + 1)
If Len(strDrives) > 0 Then strDrives = strDrives & " "
strDrives = strDrives & " " & Chr(34) & colDrives.Item(intDrive) & Chr(34) & " " & Chr(34) & colDrives.Item(intDrive + 1) & Chr(34)
Next
If Len(strDrives) > 0 Then
' re-call script with elevation
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "cscript.exe", Chr(34) & WScript.ScriptFullName & Chr(34) & strDrives, "", "runas", 1
Else
WScript.Echo "No drives Mapped."
End If
Else
' elevated part
Set objNetwork = CreateObject("WScript.Network")
For intDrive = 0 To (WScript.Arguments.Count - 1) Step 2
rem WScript.Echo WScript.Arguments(intDrive) & " is mapped to: " & WScript.Arguments(intDrive + 1)
On Error Resume Next ' ignore already mapped drives
objNetwork.MapNetworkDrive WScript.Arguments(intDrive), WScript.Arguments(intDrive + 1)
On Error GoTo 0
Next
End If
Reference: [5]
The trick is to copy the bluetooth link keys from Windows into Linux:
- Pair the device with Linux first
- Then pair the device with Windows
- Boot back in Linux, and extract the bluetooth keys using
chntpw
. Edit the registry file C:\Windows\System32\config\SYSTEM.
aa1111111111
is the bluetooth device id of the device to pair as given in Windows control panel → bluetoot devices, or in Linux Bluemanager.
chntpw -e SYSTEM > ls > cd ControlSet001\Services\BTHPORT\Parameters\Keys > ls > cd aa1111111111 > ls > hex bb2222222222
- Note that it does not work from Windows because the keys are either denied access or hidden.
- Copy the key value (remove the spaces) into file /var/lib/bluetooth/AA:11:11:11:11:11/linkkeys
Repair Laptop brightness not working or stuck
- Easiest
- Close the lid and open it again (make sure the laptop does not go to sleep).
- From [6]
- Go to control panel, devices management, then go to monitors and open properties for "Generic PnP Monitors".
- In "details" pane, open property Hardware Ids, and copy the value field (something like
MONITOR\LGD02F1
) - To re-enable brightness control, run:
devcon.exe -remove =MONITOR *LGD02F1*
devcon.exe -rescan
- To disable it:
devcon.exe -remove =MONITOR *LGD02F1*
Use Caps Lock as another Escape key
See Map caps lock to escape in Windows. Import the registry file (Win7/Win8):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,3a,00,46,00,01,00,3a,00,00,00,00,00
Open Windows Command anywhere
- Open Windows File Explorer at any folder.
- Press Shift, and right click anywhere on the white space in folder files area.
- Select Open command window here.
Stream Windows Audio to Linux server
We use Scream, which installs as a virtual sound card on Windows, and publishes sound as a multicast stream.
On Windows 7 (emitter):
- Install the driver in the package.
- Set the Scream (VDM) card as default playback device.
On Debian Buster (received):
- Compile Scream for Pulseaudio:
sudo apt install libpulse-dev
mkdir build && cd build
cmake ..
make
- Make sure the port
4010
is opened in the firewall. - Start scream:
./scream -i enp0s31f6
Windows script
Opening file with default application in CMD shell
Recommended solution is to use START
(see SO and ss64.com):
START "Title" my_document.doc
- Access denied
However when the file is on an mapped drive, we get access denied
. The solution is then to call explorer directly:
explorer my_document.doc
Cleaning up Windows 7
Windows 7, as any Microsoft product, comes with a lot of bloat and crap. Unfortunately design is so bad that there is no way to clean it up. Here some links to help a bit.
Best Guides
dism /online /cleanup-image /spsuperseded # To run in admin, and in sys32
- Move the Users Directory in Windows 7
Using Junctions (hard symlink)
Disable hibernation
- Disable it as follows
powercfg.exe -h off
winsxs
- Disk Cleanup update
Microsoft issued an update of Disk Cleanup that allows to reduce a bit the winsxs folder. - How to reduce the size of winsxs in windows 7 ultimate x64
ctts.exe C:\Windows # Get real size of windows folders (handle soft links / hard links)
- Engineering Windows 7 - Disk Space
Windows engineering trying to justify what cannot be justified, with bad arguments.
DriverStore
- How do I delete folders from the Windows 7 DriverStore?
This was of no help for me on pc-112-597. I had to delete the folder manually
Other links for general information:
Upgrading to Windows 7 SP 1 on dual boot system
Upgrading to Win 7 SP1 fails on dual boot system because Windows does not find the boot disk (error code XXXX).
To fix the issue, Grub must be removed.
- Boot on Windows 7 Recovery disk, and start a command prompt.
- First restore the MBR [7]:
bootsect /nt60 all /mbr
. - Then update BCD:
bcdboot C:\Windows
- If getting error
Failure when Attempting to Copy Boot Files
, this is because the boot partition is not marked Active. To fix [8]:
diskpart
select disk 0
list partition
select partition 1
active
- Now retry again:
bcdboot C:\Windows
Note: maybe the three usual commands would have worked:
bootrec /fixboot
bootrec /fixmbr
bootrec /rebuildbcd
Keyboard shortcuts
Aero shortcuts [9]:
- Win-Up — Maximize active window.
- Shift-Win-Up — Maximize active window vertically.
- Win-Down — Restore / minimize window.
- Win-Left/Right — Dock the window left/right, possibly to the display on the left/right, or restore
- Shift-Win-Left/Right — Move the window to the display on the left or right.
- Win-Home — Clear all but active window.
- Win-Space — Make all windows transparent.
- Win-Shift-S — Screenshot / Snipping tool? (or use open source alternative: ShareX).