diff --git a/templates/windows-7-enterprise-amd64/README.md b/templates/windows-7-enterprise-amd64/README.md
index 7fbc88a8..728ee15b 100644
--- a/templates/windows-7-enterprise-amd64/README.md
+++ b/templates/windows-7-enterprise-amd64/README.md
@@ -20,79 +20,18 @@ Size : 11,913,037,777 bytes
The operation completed successfully.
'''
-Though I have also used "Windows 7 7600 AIO.ISO" from MSDN
-file: Windows 7 7600 AIO.ISO
-md5sum: ace6c61269613bf515fd59c62185bbcf
-
-
-'''
-PS C:\Users\Administrator> Dism /Get-WIMInfo /WimFile:d:\sources\install.wim
-
-Deployment Image Servicing and Management tool
-Version: 6.1.7600.16385
-
-Details for image : d:\sources\install.wim
-
-Index : 1
-Name : Windows 7 STARTER
-Description : Windows 7 STARTER
-Size : 7,936,340,784 bytes
-
-Index : 2
-Name : Windows 7 HOMEBASIC
-Description : Windows 7 HOMEBASIC
-Size : 7,992,394,907 bytes
-
-Index : 3
-Name : Windows 7 HOMEPREMIUM
-Description : Windows 7 HOMEPREMIUM
-Size : 8,432,859,356 bytes
-
-Index : 4
-Name : Windows 7 PROFESSIONAL
-Description : Windows 7 PROFESSIONAL
-Size : 8,313,318,889 bytes
-
-Index : 5
-Name : Windows 7 ULTIMATE
-Description : Windows 7 ULTIMATE
-Size : 8,471,060,645 bytes
-
-Index : 6
-Name : Windows 7 Home Basic X64
-Description : Windows 7 HOMEBASIC
-Size : 11,500,789,302 bytes
-
-Index : 7
-Name : Windows 7 Home Premium X64
-Description : Windows 7 HOMEPREMIUM
-Size : 12,012,660,212 bytes
-
-Index : 8
-Name : Windows 7 Home Professional X64
-Description : Windows 7 PROFESSIONAL
-Size : 11,910,752,928 bytes
-
-Index : 9
-Name : Windows 7 Home Ultimate X64
-Description : Windows 7 ULTIMATE
-Size : 12,070,211,908 bytes
-
-The operation completed successfully.
-'''
-
- place it in a directory called iso
-The installation uses the Standard way for Windows Unattended installation. The XML file was created using the Windows AIK kit, but the file can also be edited by hand.
+The installation uses the Standard way for Windows Unattended installation.
+The XML file was created using the Windows AIK kit, but the file can also be edited by hand.
To edit the Autounattend.xml and validate it:
+
You can download The Windows® Automated Installation Kit (AIK) for Windows® 7:
url: http://www.microsoft.com/download/en/details.aspx?id=5753
file: KB3AIK_EN.iso
md5sum: 1e73b24a89eceab9d50585b92db5482f
-
-
- Building the machine creates a floppy that contains:
- AutoUnattend.xml (that will configure the windows)
- winrm-install.bat (activates the http and https listener + punches the firewall hole)
@@ -102,68 +41,12 @@ AIK also includes dism, which will allow you to choose a specific version:
If you want to install a different version, edit Autoattended.xml and replace the /IMAGE/NAME value with
one of the names listed in the sources/install.wim on the install DVD .iso
- #
- #
- # /IMAGE/NAME
- # Windows Server 2008 R2 SERVERSTANDARD
- #
- #
-
-
-This gets us nearly there, but we still need a winrm provisioner, as I don't like having to install cygwin.
-
-Expose the winrm port:
-
-
-$ gem install chef
-$ gem install knife-windows
-#Create a tunnel
-$ ssh -p 7222 -L5985:localhost:5985 vagrant@localhost
-$ knife bootstrap windows winrm localhost -x Administrator -P 'vagrant'
-
-
-
-- http://wiki.opscode.com/display/chef/Knife+Windows+Bootstrap
-- https://github.com/opscode/knife-windows/blob/master/lib/chef/knife/bootstrap/windows-shell.erb
-
-- https://github.com/zenchild/WinRM
-
-- http://devopscloud.net/2011/04/17/managing-chef-from-windows-7/
-- http://devopscloud.net/2011/04/28/powershell-userdata-to-start-a-chef-run/
-- http://devopscloud.net/2011/03/23/dissection-of-a-chef-recipe-or-two-for-windows/
-- https://github.com/pmorton/chef-windows-installer
-
-==
-https://github.com/zenchild/WinRM/issues/unreads#issue/1
-http -> requires unencryptedwinrm quickconfig (said yes to enable firewall)
-winrm p winrm/config/service @{AllowUnencrypted="true"}
-winrm set winrm/config/service/auth @{Basic="true"}netsh advfirewall firewall set rule group="remote administration" new enable=yes
-
-- http://forums.citrix.com/thread.jspa?messageID=1535826
-- http://support.microsoft.com/kb/2019527
-
-winrm get winrm/config
-
-The purpose of configuring WinRM for HTTPS is to encrypt the data being sent across the wire.
-
-WinRM HTTPS requires a local computer "Server Authentication" certificate with a CN matching the hostname, that is not expired, revoked, or self-signed to be installed.
-
-To install or view certificates for the local computer:
-
-- click Start, run, MMC, "File" menu, "Add or Remove Snap-ins" select "Certificates" and click "Add". Go through the wizard selecting "Computer account".
-
-- Install or view the certificates under:
-Certificates (Local computer)
- Personal
- Certificates
-
-If you do not have a Sever Authenticating certificate consult your certicate administrator. If you have a microsoft Certificate server you may be abel to request a certificate using the web certificate template from HTTPS:///certsrv
-
-Once the certificate is installed type the following to configure WINRM to listen on HTTPS:
-
-winrm quickconfig -transport:https
-
- If you do not have an appropriate certificate you can run the following with the authentication methods configured for WinRM however the data will not be encrypted.
-winrm quickconfig
+# Use the Name : from 'Dism.exe /Get-WIMInfo /WimFile:d:\sources\install.wim'
+#
+#
+# /IMAGE/NAME
+# Windows 7 ENTERPRISE
+#
+#
diff --git a/templates/windows-7-enterprise-amd64/cygwin-setup.exe b/templates/windows-7-enterprise-amd64/cygwin-setup.exe
deleted file mode 100644
index b2c5a583..00000000
Binary files a/templates/windows-7-enterprise-amd64/cygwin-setup.exe and /dev/null differ
diff --git a/templates/windows-7-enterprise-amd64/definition.rb b/templates/windows-7-enterprise-amd64/definition.rb
index 7a3eeca9..ec1ba766 100644
--- a/templates/windows-7-enterprise-amd64/definition.rb
+++ b/templates/windows-7-enterprise-amd64/definition.rb
@@ -7,9 +7,9 @@
# The 90-day Trial is offered for a limited time and in limited quantity.
# The download will be available through June 30th, 2012, while supplies last.
:iso_file => "7600.16385.090713-1255_x64fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENXEVAL_EN_DVD.iso",
- :iso_src => "http://wb.dlservice.microsoft.com/dl/download/release/Win7/3/b/a/3bac7d87-8ad2-4b7a-87b3-def36aee35fa/7600.16385.090713-1255_x64fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENXEVAL_EN_DVD.iso?lcid=1033",
+ :iso_src => "http://wb.dlservice.microsoft.com/dl/download/release/Win7/3/b/a/3bac7d87-8ad2-4b7a-87b3-def36aee35fa/7600.16385.090713-1255_x64fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENXEVAL_EN_DVD.iso",
:iso_md5 => "1d0d239a252cb53e466d39e752b17c28",
- :iso_download_timeout => "10000",
+ :iso_download_timeout => "100000",
:cpu_count => '1',
:memory_size=> '512',
@@ -18,14 +18,13 @@
:floppy_files => [
"Autounattend.xml",
"install-winrm.bat",
- "install-chefclient.bat"
+ "oracle-cert.cer",
+ "install-cygwin-sshd.bat"
],
- :boot_wait => "660", #ten minutes, ten seconds
- :boot_cmd_sequence => [
- ''
- ],
+ :boot_wait => "1", #12 minutes
+ :boot_cmd_sequence => [''],
:ssh_login_timeout => "10000",
@@ -38,5 +37,5 @@
# No sudo on windows
:sudo_cmd => "sh '%f'",
# Shutdown is different as well
- :shutdown_cmd => "shutdown /p /t 60 /c \"Vagrant Shutdown\" /f /d p:4:1",
+ :shutdown_cmd => "shutdown /s /t 60 /c \"Vagrant Shutdown\" /f /d p:4:1",
})
diff --git a/templates/windows-7-enterprise-amd64/install-chefclient.bat b/templates/windows-7-enterprise-amd64/install-chefclient.bat
deleted file mode 100644
index b7b5022a..00000000
--- a/templates/windows-7-enterprise-amd64/install-chefclient.bat
+++ /dev/null
@@ -1,44 +0,0 @@
-mkdir C:\chef
-
-> C:\chef\wget.vbs (
-echo.url = WScript.Arguments.Named^("url"^)
-echo.path = WScript.Arguments.Named^("path"^)
-echo.Set objXMLHTTP = CreateObject^("MSXML2.ServerXMLHTTP"^)
-echo.Set wshShell = CreateObject^( "WScript.Shell" ^)
-echo.Set objUserVariables = wshShell.Environment^("USER"^)
-echo.
-echo.'http proxy is optional
-echo.'attempt to read from HTTP_PROXY env var first
-echo.On Error Resume Next
-echo.
-echo.If NOT ^(objUserVariables^("HTTP_PROXY"^) = ""^) Then
-echo.objXMLHTTP.setProxy 2, objUserVariables^("HTTP_PROXY"^)
-echo.
-echo.'fall back to named arg
-echo.ElseIf NOT ^(WScript.Arguments.Named^("proxy"^) = ""^) Then
-echo.objXMLHTTP.setProxy 2, WScript.Arguments.Named^("proxy"^)
-echo.End If
-echo.
-echo.On Error Goto 0
-echo.
-echo.objXMLHTTP.open "GET", url, false
-echo.objXMLHTTP.send^(^)
-echo.If objXMLHTTP.Status = 200 Then
-echo.Set objADOStream = CreateObject^("ADODB.Stream"^)
-echo.objADOStream.Open
-echo.objADOStream.Type = 1
-echo.objADOStream.Write objXMLHTTP.ResponseBody
-echo.objADOStream.Position = 0
-echo.Set objFSO = Createobject^("Scripting.FileSystemObject"^)
-echo.If objFSO.Fileexists^(path^) Then objFSO.DeleteFile path
-echo.Set objFSO = Nothing
-echo.objADOStream.SaveToFile path
-echo.objADOStream.Close
-echo.Set objADOStream = Nothing
-echo.End if
-echo.Set objXMLHTTP = Nothing
-)
-
-@rem Install Chef using chef-client MSI installer
-cscript /nologo C:\chef\wget.vbs /url:http://www.opscode.com/chef/install.msi /path:%TEMP%\chef-client-latest.msi
-msiexec /qb /i %TEMP%\chef-client-latest.msi
diff --git a/templates/windows-7-enterprise-amd64/install-cygwin-sshd.bat b/templates/windows-7-enterprise-amd64/install-cygwin-sshd.bat
index 0f4d79fc..4be96485 100644
--- a/templates/windows-7-enterprise-amd64/install-cygwin-sshd.bat
+++ b/templates/windows-7-enterprise-amd64/install-cygwin-sshd.bat
@@ -2,13 +2,14 @@ REM http://webcache.googleusercontent.com/search?q=cache:SjoPPpuQxuoJ:www.tcm.ph
REM create the cygwin directory
cmd /c mkdir %SystemDrive%\cygwin
-copy a:\cygwin-setup.exe %SystemDrive%\cygwin
+
+cmd /c bitsadmin /transfer CygwinSetupExe /download /priority normal http://www.cygwin.com/setup.exe %SystemDrive%\cygwin\cygwin-setup.exe
REM goto a temp directory
cd %SystemDrive%\windows\temp
REM run the installation
-cmd /c a:/cygwin-setup.exe -q -R %SystemDrive%\cygwin -P openssh,openssl,curl,cygrunsrv,wget,rebase,vim -s http://cygwin.mirrors.pair.com
+cmd /c %SystemDrive%\cygwin\cygwin-setup.exe -q -R %SystemDrive%\cygwin -P openssh,openssl,curl,cygrunsrv,wget,rebase,vim -s http://cygwin.mirrors.pair.com
%SystemDrive%\cygwin\bin\bash -c 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin cygrunsrv -R sshd'
@@ -37,5 +38,3 @@ net start sshd
# http://www.winhelponline.com/blog/fix-corrupted-recycle-bin-windows-7-vista/
cmd /c rd /s /q c:\$Recycle.bin
-copy a:\sudo %SystemDrive%\cygwin\usr\local\bin
-cmd /c %SystemDrive%\cygwin\bin\chmod 755 %SystemDrive%\cygwin\usr\local\bin\sudo
diff --git a/templates/windows-7-enterprise-amd64/install-winrm.bat b/templates/windows-7-enterprise-amd64/install-winrm.bat
index 2fce449d..4276df47 100644
--- a/templates/windows-7-enterprise-amd64/install-winrm.bat
+++ b/templates/windows-7-enterprise-amd64/install-winrm.bat
@@ -9,3 +9,6 @@ cmd /c netsh advfirewall firewall set rule group="remote administration" new ena
cmd /c netsh firewall add portopening TCP 5985 "Port 5985"
cmd /c net stop winrm
cmd /c net start winrm
+
+cmd /c reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveActive /t REG_SZ /d 0 /f
+cmd /c reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveIsSecure /t REG_SZ /d 0 /f
diff --git a/templates/windows-7-enterprise-amd64/postinstall.sh b/templates/windows-7-enterprise-amd64/postinstall.sh
index d5da91f5..3dec90c2 100644
--- a/templates/windows-7-enterprise-amd64/postinstall.sh
+++ b/templates/windows-7-enterprise-amd64/postinstall.sh
@@ -67,8 +67,6 @@ chmod 755 /bin/sudo
# Mounting a directory
net.exe use '\\vboxsvr\veewee-validation'
-reg add "HKEY_CURRENT_USER\Control Panel\Desktop" ScreenSaveActive /t REG_SZ /d 0 /f
-reg add "HKEY_CURRENT_USER\Control Panel\Desktop" ScreenSaveIsSecure /t REG_SZ /d 0 /f
# Reboot
# http://www.techrepublic.com/blog/datacenter/restart-windows-server-2003-from-the-command-line/245