From patchwork Sun Aug 9 16:51:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 40275 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n79Gn023002758 for ; Sun, 9 Aug 2009 16:49:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751991AbZHIQs5 (ORCPT ); Sun, 9 Aug 2009 12:48:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751957AbZHIQs4 (ORCPT ); Sun, 9 Aug 2009 12:48:56 -0400 Received: from mx2.redhat.com ([66.187.237.31]:45713 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751941AbZHIQsz (ORCPT ); Sun, 9 Aug 2009 12:48:55 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n79GmtGe025810; Sun, 9 Aug 2009 12:48:55 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n79GmtxQ000502; Sun, 9 Aug 2009 12:48:55 -0400 Received: from localhost.localdomain (dhcp-1-31.tlv.redhat.com [10.35.1.31]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n79GmoCK022741; Sun, 9 Aug 2009 12:48:53 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 2/7] KVM test: Batch script that prepares a Windows guest for remote access Date: Sun, 9 Aug 2009 19:51:27 +0300 Message-Id: <8ba0c835ecadb68d1f444e7cbb32a01d9c6dca3c.1249835925.git.mgoldish@redhat.com> In-Reply-To: References: <1249836692-18292-1-git-send-email-mgoldish@redhat.com> In-Reply-To: References: X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org setuprss.bat copies rss.exe to C:\, makes it run at startup, disables the firewall, sets a known password for the administrator account, makes it logon automatically, and does some Vista/2008 specific things. The script requires administrator privileges. Usage: setuprss.bat [full path to executable] e.g.: setuptrss.bat D:\rss.exe If used without parameters, rss.exe will be copied from the directory in which setuprss.bat resides. Signed-off-by: Michael Goldish --- client/tests/kvm/deps/rss.reg | 15 +++++++++++++++ client/tests/kvm/deps/setuprss.bat | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+), 0 deletions(-) create mode 100644 client/tests/kvm/deps/rss.reg create mode 100644 client/tests/kvm/deps/setuprss.bat diff --git a/client/tests/kvm/deps/rss.reg b/client/tests/kvm/deps/rss.reg new file mode 100644 index 0000000..b285d40 --- /dev/null +++ b/client/tests/kvm/deps/rss.reg @@ -0,0 +1,15 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run] +"Remote Shell Server"="C:\\rss.exe 22" + +[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\winlogon] +"AutoAdminLogon"="1" +"DefaultUserName"="Administrator" +"DefaultPassword"="1q2w3eP" + +[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System] +"EnableLUA"=dword:00000000 + +[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Reliability] +"ShutdownReasonOn"=dword:00000000 diff --git a/client/tests/kvm/deps/setuprss.bat b/client/tests/kvm/deps/setuprss.bat new file mode 100644 index 0000000..1e4b5a7 --- /dev/null +++ b/client/tests/kvm/deps/setuprss.bat @@ -0,0 +1,19 @@ +set rsspath=%1 +if [%1]==[] set rsspath=%~dp0\rss.exe +copy %rsspath% C:\rss.exe + +net user Administrator /active:yes +net user Administrator 1q2w3eP +netsh firewall set opmode disable + +reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Run" /v "Remote Shell Server" /d "C:\rss.exe 22" /t REG_SZ /f +reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\winlogon" /v "AutoAdminLogon" /d "1" /t REG_SZ /f +reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\winlogon" /v "DefaultUserName" /d "Administrator" /t REG_SZ /f +reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\winlogon" /v "DefaultPassword" /d "1q2w3eP" /t REG_SZ /f +reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /d "0" /t REG_DWORD /f +reg add "HKLM\Software\Policies\Microsoft\Windows NT\Reliability" /v "ShutdownReasonOn" /d "0" /t REG_DWORD /f + +rem Just in case reg.exe is missing (e.g. Windows 2000): +regedit /s %~dp0\rss.reg + +start /B C:\rss.exe