Windows 7: Difference between revisions
Jump to navigation
Jump to search
(→Tips) |
(→Tips) |
||
Line 8: | Line 8: | ||
* '''Method 2''' — Edit registry locations <tt>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders</tt> ([http://www.vistax64.com/tutorials/107990-personal-user-shell-folders-move-location.html]). |
* '''Method 2''' — Edit registry locations <tt>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders</tt> ([http://www.vistax64.com/tutorials/107990-personal-user-shell-folders-move-location.html]). |
||
* Note there is also <tt>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders</tt>. I also update that one, but the tips does not say so. |
* Note there is also <tt>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders</tt>. 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 |
|||
* [http://answers.microsoft.com/en-us/windows/forum/windows_7-desktop/how-to-map-network-drives-for-all-users-in-windows/c8ccf50b-333e-4c30-be8e-e4031c7dd069], [http://www.winhelponline.com/blog/mapped-drives-are-not-seen-from-elevated-command-prompt-in-vista/] 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 [http://superuser.com/questions/105173/how-to-access-network-shares-from-an-elevated-process-in-windows-7?rq=1]. |
|||
{{pl2|{{hidden|<tt>C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\remount-admin.vbs</tt> |
|||
([{{#filelink: remount-admin.vbs}} download])|{{#fileanchor: remount-admin.vbs}} |
|||
<source lang="bash"> |
|||
' 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 |
|||
</source>|headerstyle=background:#ccccff;text-align:left;}} }} |
|||
== Cleaning up Windows 7 == |
== Cleaning up Windows 7 == |
Revision as of 14:10, 30 October 2013
Tips
- 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].
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\remount-admin.vbs
([{{#filelink: remount-admin.vbs}} download])
{{#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
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: