Skip to content

Commit

Permalink
updated win7entx86
Browse files Browse the repository at this point in the history
  • Loading branch information
hh committed Jan 5, 2012
1 parent 1ff67f6 commit 86c1825
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 74 deletions.
6 changes: 3 additions & 3 deletions templates/windows-7-enterprise-i386/Autounattend.xml
Expand Up @@ -43,8 +43,8 @@
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>2</Order>
<CommandLine>cmd.exe /c a:install-chefclient.bat</CommandLine>
<Description>Install chefclient</Description>
<CommandLine>cmd.exe /c a:install-cygwin-sshd.bat</CommandLine>
<Description>Install Cygwin SSHD</Description>
<RequiresUserInput>false</RequiresUserInput>
</SynchronousCommand>
</FirstLogonCommands>
Expand Down Expand Up @@ -94,7 +94,7 @@
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME</Key>
<Value>Windows 7 ULTIMATE</Value>
<Value>Windows 7 ENTERPRISE</Value>
</MetaData>
</InstallFrom>
<InstallTo>
Expand Down
Binary file not shown.
16 changes: 6 additions & 10 deletions templates/windows-7-enterprise-i386/definition.rb
Expand Up @@ -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_x86fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENEVAL_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_x86fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENEVAL_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_x86fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENEVAL_EN_DVD.iso",
:iso_md5 => "62675A3B76D21815367F372961B71A56",
:iso_download_timeout => "10000",
:iso_download_timeout => "100000",

:cpu_count => '1',
:memory_size=> '512',
Expand All @@ -19,26 +19,22 @@
"Autounattend.xml",
"install-winrm.bat",
"install-cygwin-sshd.bat",
"cygwin-setup.exe",
"oracle-cert.cer"
],

:boot_wait => "660", #ten minutes, ten seconds
:boot_cmd_sequence => [
'<Tab><Spacebar><Tab><Tab><Tab><Spacebar>'
],

:boot_wait => "1", #ten minutes, ten seconds
:boot_cmd_sequence => [''],

:ssh_login_timeout => "10000",
# Actively attempt to winrm (no ssh on base windows) in for 10000 seconds
:ssh_user => "vagrant", :ssh_password => "vagrant", :ssh_key => "",
:ssh_host_port => "59857", :ssh_guest_port => "22",
:ssh_host_port => "59867", :ssh_guest_port => "22",
# And run postinstall.sh for up to 10000 seconds
:postinstall_timeout => "10000",
:postinstall_files => ["postinstall.sh"],
# No sudo on windows
:sudo_cmd => "sh '%f'",
# Shutdown is different as well
#:shutdown_cmd => "shutdown /s /t 0 /d P:4:1 /c \"Vagrant Shutdown\"",
:shutdown_cmd => "shutdown /p /t 60 /c \"Vagrant Shutdown\" /f /d p:4:1",
:shutdown_cmd => "shutdown /p /t 0 /c \"Vagrant Shutdown\" /f /d p:4:1",
})
44 changes: 0 additions & 44 deletions templates/windows-7-enterprise-i386/install-chefclient.bat

This file was deleted.

7 changes: 3 additions & 4 deletions templates/windows-7-enterprise-i386/install-cygwin-sshd.bat
Expand Up @@ -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'

Expand Down Expand Up @@ -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
3 changes: 3 additions & 0 deletions templates/windows-7-enterprise-i386/install-winrm.bat
Expand Up @@ -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
10 changes: 5 additions & 5 deletions templates/windows-7-enterprise-i386/postinstall.sh
Expand Up @@ -20,23 +20,23 @@ chmod +x apt-cyg
mv apt-cyg /usr/local/bin/

# 7zip will allow us to extract a file from an ISO
wget http://downloads.sourceforge.net/sevenzip/7z920-x64.msi
msiexec /qb /i 7z920-x64.msi
wget http://downloads.sourceforge.net/sevenzip/7z922.msi
msiexec /qb /i 7z922.msi

# Download Virtualbox Additions
VBOX_VERSION="4.1.8" #"4.0.8"
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso

# Extract the installer from the ISO (WHY WHY WHY isn't this available not bundled within an ISO)
/cygdrive/c/Program\ Files/7-Zip/7z.exe x VBoxGuestAdditions_$VBOX_VERSION.iso VBoxWindowsAdditions-amd64.exe
/cygdrive/c/Program\ Files/7-Zip/7z.exe x VBoxGuestAdditions_$VBOX_VERSION.iso VBoxWindowsAdditions-x86.exe

# Mark Oracle as a trusted installer
#http://blogs.msdn.com/b/steverac/archive/2009/07/09/adding-certificates-to-the-local-certificates-store-and-setting-local-policy-using-a-command-line-system-center-updates-publisher-example.aspx

certutil -addstore -f "TrustedPublisher" a:oracle-cert.cer

# Install the Virtualbox Additions
./VBoxWindowsAdditions-amd64.exe /S
./VBoxWindowsAdditions-x86.exe /S


#Rather than do the manual install of ruby and chef, just use the opscode msi
Expand Down Expand Up @@ -70,5 +70,5 @@ net.exe use '\\vboxsvr\veewee-validation'

# Reboot
# http://www.techrepublic.com/blog/datacenter/restart-windows-server-2003-from-the-command-line/245
shutdown.exe /r /t 0 /d p:2:4 /c "Vagrant initial reboot"
shutdown.exe /s /t 0 /d p:2:4 /c "Vagrant initial reboot"

8 changes: 0 additions & 8 deletions templates/windows-7-enterprise-i386/winrm.rb

This file was deleted.

0 comments on commit 86c1825

Please sign in to comment.