Skip to content

Commit 47d1d1f

Browse files
committed
added ie and domain controller
1 parent 88407f7 commit 47d1d1f

File tree

4 files changed

+164
-0
lines changed

4 files changed

+164
-0
lines changed

Vagrantfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Vagrant::Config.run do |config|
2121
chef.add_recipe("windows-fromscratch::_annoyances")
2222
chef.add_recipe("windows-fromscratch::sysinternals")
2323
chef.add_recipe("windows-fromscratch::bginfo")
24+
chef.add_recipe("windows-fromscratch::_ie_annoyances")
25+
chef.add_recipe("windows-fromscratch::domain_controller")
2426
end
2527

2628
end

cookbooks/windows-fromscratch/metadata.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
description "Installs/Configures windows-fromscratch"
55
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
66
version "0.1.0"
7+
depends 'windows'
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# http://technet.microsoft.com/en-us/library/cc732131.aspx
2+
# Look upnder Registry settings
3+
4+
5+
# (see http://support.microsoft.com/kb/182569/#letmefixit)
6+
insecure_zone = {
7+
'1001' => 0,
8+
'1004' => 0,
9+
'1200' => 0,
10+
'1201' => 0,
11+
'1400' => 0,
12+
'1402' => 0,
13+
'1405' => 0,
14+
'1406' => 0,
15+
'1601' => 0,
16+
'1604' => 0,
17+
'1609' => 0,
18+
'1605' => 0,
19+
'1607' => 0,
20+
'1809' => 3,
21+
'2101' => 0,
22+
'2102' => 0,
23+
'2105' => 0,
24+
'2301' => 3,
25+
'2500' => 0,
26+
'CurrentLevel' => 10500,
27+
"WarnOnHTTPSToHTTPRedirect" => 0,
28+
"WarnOnPost" => 0,
29+
"WarnOnPostRedirect" => 0,
30+
"WarnOnZoneCrossing" => 0,
31+
"WarnonBadCertRecving" => 0
32+
}
33+
34+
{
35+
'HKCU\Software\Microsoft\Internet Explorer\InformationBar' => {'FirstTime' => 0},
36+
'HKCU\Software\Microsoft\Internet Explorer\Security' => {'DisableSecuritySettingsCheck' => 1},
37+
'HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1' => insecure_zone,
38+
'HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2' => insecure_zone,
39+
'HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3' => insecure_zone,
40+
'HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\tips' => {'Show' => 0},
41+
'HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' => {
42+
"StartButtonBalloonTip" => 0,
43+
"ShowInfoTip" => 0,
44+
"EnableBalloonTips" => 0,
45+
"FolderContentsInfoTip" => 0
46+
},
47+
'HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' => {'NoSMBalloonTip' => 0},
48+
# Force IE to open Selenium in a window and not a tab
49+
'HKCU\Software\Microsoft\Internet Explorer\TabbedBrowsing' => {
50+
"Enabled" => 1,
51+
"WarnOnClose" => 0,
52+
"OpenInForeground" => 0,
53+
"PopupsUseNewWindow" => 1
54+
},
55+
# Bump IE 6 and 7 max synchronous requests
56+
'HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings' => {
57+
"MaxConnectionsPer1_0Server" => 15,
58+
"MaxConnectionsPerServer" => 15,
59+
# Disable HTTPS->HTTP warning dialogue in IE on POST redirect
60+
# (see http://ie7triage.spaces.live.com/blog/cns!3B6634EF5458F389!240.entry)
61+
"WarnOnPostRedirect" => 0,
62+
"WarnOnIntranet" => 0,
63+
"WarnOnPost" => 0,
64+
"WarnonZoneCrossing" => 0,
65+
"WarnonBadCertRecving" => 0,
66+
"WarnOnPostRedirect" => 0,
67+
"DisableCachingOfSSLPages" => 0,
68+
},
69+
70+
'HKCU\Software\Microsoft\Internet Explorer\Main' => {
71+
"Check_Associations" => "no", # Disable default browser check
72+
"Start Page" => "about:blank", # Setting start page
73+
"FormSuggest Passwords" => "no",
74+
"FormSuggest PW Ask" => "no",
75+
"Use FormSuggest" => "no"
76+
},
77+
78+
'HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\WindowsSearch' => {
79+
"AutoCompleteGroups" => 1,
80+
"EnabledScopes" => 1
81+
},
82+
83+
'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoComplete' => {
84+
"AutoSuggest"=>"yes"
85+
},
86+
87+
'HKLM\Software\Policies\Microsoft\Internet Explorer\Main' => {
88+
'DisableFirstRunCustomize' => 1
89+
},
90+
'HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}' => {
91+
'IsInstalled' => 0
92+
},
93+
'HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}' => {
94+
'IsInstalled' => 0
95+
}
96+
#Disable taskbar/system tray/start menu stuff
97+
# 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer' => {
98+
# "NoTrayItemsDisplay" => 1,
99+
# "NoStartMenuPinnedList" => 1,
100+
# "NoStartMenuMFUprogramsList" => 1,
101+
# "NoStartMenuMorePrograms" => 1,
102+
# "NoCommonGroups" => 1,
103+
# "GreyMSIAds" => 1,
104+
# "NoWindowsUpdate" => 1,
105+
# "NoStartMenuMyMusic" => 1,
106+
# "NoSMMyPictures" => 1,
107+
# "NoFavoritesMenu" => 1,
108+
# "NoRecentDocsMenu" => 1,
109+
# "DisableMyPicturesDirChange" => 1,
110+
# "DisableMyMusicDirChange" => 1,
111+
# "DisableFavoritesDirChange" => 1,
112+
# "NoSMMyDocs" => 1,
113+
# "DisablePersonalDirChange" => 1,
114+
# "NoRecentDocsMenu" => 1,
115+
# "NoFavoritesMenu" => 1,
116+
# "NoNetworkConnections" => 1,
117+
# "NoStartMenuNetworkPlaces" => 1,
118+
# "NoRecentDocsNetHood" => 1,
119+
# "NoSMHelp" => 1,
120+
# "NoFind" => 1,
121+
# "NoRun" => 1,
122+
# "NoResolveSearch" => 1,
123+
# "NoResolveTrack" => 1,
124+
# "StartMenuLogoff" => 1,
125+
# "NoClose" => 1,
126+
# "NoStartMenuEjectPC" => 1,
127+
# "NoChangeStartMenu" => 1,
128+
# "NoSetTaskbar" => 1,
129+
# "NoUserNameInStartMenu" => 1
130+
# }
131+
}.each do |regpath,entries|
132+
windows_registry regpath do
133+
values entries
134+
end
135+
end
136+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
windows_feature "NetFx3"
2+
windows_feature "DirectoryServices-DomainController"
3+
windows_feature "DirectoryServices-DomainController-Tools"
4+
5+
file 'c:\dcunattended.txt' do
6+
content <<-EOC
7+
[DCINSTALL]
8+
InstallDNS=Yes
9+
DomainNetBiosName=vagrant
10+
NewDomainDNSName=vagrant.training
11+
SiteName=DefaultSite
12+
ReplicaOrNewDomain=domain
13+
NewDomain=forest
14+
ForestLevel=4
15+
DomainLevel=4
16+
SafeModeAdminPassword=Testing123!
17+
RebootOnSuccess=Yes
18+
EOC
19+
end
20+
21+
# our ruby is 32bit, making file locations... interesting
22+
# http://en.wikipedia.org/wiki/WoW64#Registry_and_file_system
23+
dcpromo = 'c:\windows\sysnative\dcpromo.exe'
24+
# This command will reboot before it returns... chef-client ends here
25+
execute "#{dcpromo} /unattend:c:\\dcunattended.txt"

0 commit comments

Comments
 (0)