Skip to content

Commit

Permalink
Merge pull request #6 from itigoag/develop
Browse files Browse the repository at this point in the history
add small search icon
  • Loading branch information
sbaerlocher authored Sep 12, 2019
2 parents da5e296 + 132b0af commit 9b87466
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 24 deletions.
15 changes: 15 additions & 0 deletions scripts/search-Bar.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$Regpath = $Env:SystemDrive + "\Users\Default\NTUSER.DAT"
& REG LOAD HKLM\DEFAULT_USER $Regpath
New-ItemProperty -Path "HKLM:\DEFAULT_USER\Software\Microsoft\Windows\CurrentVersion\Search" -PropertyType DWord -Name "SearchboxTaskbarMode" -Value 0
& REG UNLOAD HKLM\DEFAULT_USER

#All users for existing profiles
New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS
$Profiles = Get-ChildItem -Path HKU:\
foreach ($Profile in $Profiles) {
if ((($Profile.PSChildName).Length -gt 8) -and ($Profile.Name -notlike "*_Classes")) {
$UserRegPath = "HKU:\" + $Profile.PSChildName + "\Software\Microsoft\Windows\CurrentVersion\Search"
New-ItemProperty -Path $UserRegPath -PropertyType DWord -Name "SearchboxTaskbarMode" -Value 0 -ErrorAction SilentlyContinue
}
}
Remove-PSDrive -Name HKU
51 changes: 27 additions & 24 deletions tasks/distribution/Windows.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
---
# tasks file for itigoag.desktop

- name: "windows : find all users"
- name: 'windows : find all users'
win_find:
paths: "C:\\Users"
file_type: directory
register: register_users

- name: "windows : disable security health austostart"
- name: 'windows : disable security health austostart'
win_regedit:
path: "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\StartupApproved\\Run"
name: "SecurityHealth"
name: 'SecurityHealth'
type: binary
data: "03 00 00 00 00 00 00 00 00 00 00 00"
data: '03 00 00 00 00 00 00 00 00 00 00 00'

- name: "windows : add shortcuts for all computers"
- name: 'windows : add shortcuts for all computers'
win_regedit:
path: "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\HideDesktopIcons\\NewStartPanel"
name: "{{ item.name }}"
name: '{{ item.name }}'
type: dword
data: "{{ item.data }}"
data: '{{ item.data }}'
with_items:
- "{{ desktop_explorer_shortcuts }}"
- '{{ desktop_explorer_shortcuts }}'

- name: "windows : create startlayouts"
- name: 'windows : create startlayouts'
win_template:
src: "StartLayouts.xml.j2"
src: 'StartLayouts.xml.j2'
dest: "{{ desktop_root_directory }}\\xml.d\\StartLayouts.xml"
register: register_startlayouts

- name: "windows : import startlayouts"
- name: 'windows : import startlayouts'
win_shell: "Import-StartLayout -LayoutPat {{ desktop_root_directory }}\\xml.d\\startlayouts.xml -MountPath $env:SystemDrive\\"
when: register_startlayouts.changed

- name: "windows : remove edge icon"
- name: 'windows : remove edge icon'
win_file:
path: "{{ item.path }}\\Desktop\\Microsoft Edge.lnk"
state: absent
with_items:
- "{{ register_users.files }}"
- '{{ register_users.files }}'

# http://www.winfaq.de/faq_html/Content/tip2000/onlinefaq.php?h=tip2103.htm
- name: "windows : hide inactive icons from the systray"
# https://www.winfaq.de/faq_html/Content/tip2000/onlinefaq.php?h=tip2103.htm
- name: 'windows : hide inactive icons from the systray'
win_regedit:
path: HKLM:\Software\Microsoft\Windows\CurrentVersion\Explorer
name: EnableAutoTray
data: "{{ '00000001' if desktop_auto_tray_enabled else '00000000' }}"
type: dword

# https://www.tenforums.com/tutorials/2853-hide-show-task-view-button-taskbar-windows-10-a.html
- name: "windows : hide or show task view button on taskbar"
- name: 'windows : hide or show task view button on taskbar'
win_regedit:
path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced
name: ShowTaskViewButton
data: "{{ '00000001' if desktop_task_view_button_enabled else '00000000' }}"
type: dword

# https://getadmx.com/?Category=Windows_10_2016&Policy=Microsoft.Policies.WindowsLogon::EnableFirstLogonAnimation
- name: "windows : show first sign-in animation"
- name: 'windows : show first sign-in animation'
win_regedit:
path: "{{ item }}"
path: '{{ item }}'
name: EnableFirstLogonAnimation
data: "{{ '00000001' if desktop_first_logon_animation_enabled else '00000000' }}"
type: dword
Expand All @@ -70,23 +70,23 @@
# https://tree.taiga.io/project/freeminded-team/us/549?kanban-status=1531845
# https://www.antary.de/2016/05/23/windows-10-werbe-apps-im-startmenue-entfernen/
# https://getadmx.com/?Category=Windows_10_2016&Policy=Microsoft.Policies.CloudContent::DisableWindowsConsumerFeatures&Language=de-de
- name: "windows : turn off microsoft consumer experiences"
- name: 'windows : turn off microsoft consumer experiences'
win_regedit:
path: HKLM:\Software\Policies\Microsoft\Windows\CloudContent
name: DisableWindowsConsumerFeatures
data: "{{ '00000000' if desktop_windowsconsumerfeatures_enabled else '00000001' }}"
type: dword

# https://www.sevenforums.com/tutorials/10570-file-extensions-hide-show.html
- name: "windows : how to hide or show known file type extensions"
- name: 'windows : how to hide or show known file type extensions'
win_regedit:
path: HKLM:\ANSIBLE\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
name: HideFileExt
data: "{{ '00000000' if desktop_file_ext_enabled else '00000001' }}"
type: dword
hive: C:\Users\Default\NTUSER.dat

- name: "windows : remove the people bar from the taskbar"
- name: 'windows : remove the people bar from the taskbar'
win_regedit:
path: HKLM:\ANSIBLE\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People
name: PeopleBand
Expand All @@ -95,20 +95,23 @@
hive: C:\Users\Default\NTUSER.dat

# https://www.tenforums.com/tutorials/105486-enable-disable-notifications-windows-defender-security-center.html
- name: "windows : hide all windows defender security center notifications"
- name: 'windows : hide all windows defender security center notifications'
win_regedit:
path: HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Notifications
name: DisableEnhancedNotifications
data: "{{ '00000000' if desktop_defender_security_notifications_enabled else '00000001' }}"
type: dword

# https://getadmx.com/?Category=Windows_10_2016&Policy=Microsoft.Policies.InternetExplorer::NoFirstRunCustomise
- name: "windows : rrevent running first run wizard"
- name: 'windows : revent running first run wizard'
win_regedit:
path: HKLM:\Software\Policies\Microsoft\Internet Explorer\Main
name: DisableFirstRunCustomize
data: "{{ '00000000' if desktop_ie_first_run_wizard_enabled else '00000001' }}"
type: dword

- name: "windows : Invoke Remove Builtin Apps"
- name: 'windows : Invoke Remove Builtin Apps'
script: scripts/Invoke-RemoveBuiltinApps.ps1

- nmae: 'windows : small search Icon'
script: scripts/search-Bar.ps1

0 comments on commit 9b87466

Please sign in to comment.