Propchange: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/VCLprepare.cmd
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/VCLrcboot.cmd
URL: 
http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/VCLrcboot.cmd?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/VCLrcboot.cmd 
(added)
+++ incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/VCLrcboot.cmd Fri 
Dec 12 10:20:10 2008
@@ -0,0 +1,17 @@
+...@echo off
+
+copy "C:\Documents and Settings\root\Application Data\VCL\VCLprepare.cmd" 
C:\WINDOWS\system32\GroupPolicy\User\Scripts\Logon\
+
+del C:\WINDOWS\system32\GroupPolicy\User\Scripts\Logoff\VCLcleanup.cmd
+
+cd %APPDATA%/vcl
+
+%SystemRoot%\system32\cmd.exe /c C:\WINDOWS\regedit.exe /s nodyndns.reg
+
+%SystemRoot%\system32\cmd.exe /c wsname.exe /N:$DNS /MCN
+
+%SystemRoot%\system32\cmd.exe /c C:\WINDOWS\system32\ping.exe 1.1.1.1 %-n 1 -w 
5000 > NUL
+
+%SystemRoot%\system32\cmd.exe /c newsid.exe /a /d 6
+
+del C:\WINDOWS\system32\GroupPolicy\User\Scripts\Logon\VCLrcboot.cmd 

Propchange: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/VCLrcboot.cmd
------------------------------------------------------------------------------
    svn:executable = 

Added: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/VCLstartimage.vbs
URL: 
http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/VCLstartimage.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/VCLstartimage.vbs 
(added)
+++ incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/VCLstartimage.vbs 
Fri Dec 12 10:20:10 2008
@@ -0,0 +1,42 @@
+On Error Resume Next
+
+Set oWshShell = CreateObject("WScript.Shell")
+Set oWshEnvironment = oWshShell.Environment("Process")
+Set oFileSystem = CreateObject("Scripting.FileSystemObject")
+Set WshNetwork = WScript.CreateObject("WScript.Network")
+sTempDir = oWshEnvironment("TEMP")
+Dim oExec
+Dim GuiAnswer
+strComputer = "."
+
+'copy VCLrcboot.cmd to Logon
+oFileSystem.CopyFile "C:/cygwin/home/root/VCLrcboot.vbs", 
"C:\WINDOWS\system32\GroupPolicy\User\Scripts\Logon\",true
+WScript.Echo "copied VCLrcboot"
+
+'set autologin
+' setup DefaultUserName as root
+oWshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\Winlogon\DefaultUserName", "root"
+
+' setup DefaultPassword
+oWshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\Winlogon\DefaultPassword", "cl0udy"
+
+' Turn on auto-login
+oWshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\Winlogon\AutoAdminLogon", "1"
+
+WScript.Echo "set autologin for root account"
+
+'shutdown
+Set objWMIService = GetObject("winmgmts:" _
+    & "{impersonationLevel=impersonate,(Shutdown)}!\\" & MyName & 
"\root\cimv2")
+Set colOperatingSystems = objWMIService.ExecQuery _
+    ("Select * from Win32_OperatingSystem")
+For Each objOperatingSystem in colOperatingSystems
+    intreturn = ObjOperatingSystem.Win32Shutdown(5)
+    if intreturn = 0 Then
+       WScript.echo "createimage shutdown"
+     Else
+       Wscript.echo "shutdown failed error code " & intreturn
+     End If 
+Next
+
+WScript.Quit

Propchange: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/VCLstartimage.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/auto_create_image_new.vbs
URL: 
http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/auto_create_image_new.vbs?rev=726079&view=auto
==============================================================================
--- 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/auto_create_image_new.vbs
 (added)
+++ 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/auto_create_image_new.vbs
 Fri Dec 12 10:20:10 2008
@@ -0,0 +1,97 @@
+On Error Resume Next
+
+Set oWshShell = CreateObject("WScript.Shell")
+Set oWshEnvironment = oWshShell.Environment("Process")
+Set oFileSystem = CreateObject("Scripting.FileSystemObject")
+Set WshNetwork = WScript.CreateObject("WScript.Network")
+sTempDir = oWshEnvironment("TEMP")
+sAppDataDir = oWshEnvironment("APPDATA")
+Dim oExec
+Dim GuiAnswer
+strComputer = "."
+MyName = lcase(WshNetwork.ComputerName)
+
+Const ForAppending = 8
+
+
+' clean up %TEMP% directory from .log files
+oWshShell.Run "cmd.exe /C del /Q " & sTempDir & "\*.log", 0, TRUE
+
+' open log file to record all actions taken
+set objFSO = CreateObject("Scripting.FileSystemObject")
+Set objTextFile = objFSO.OpenTextFile _
+    (sTempDir & "\VCLprepare.log", ForAppending, True)
+objTextFile.WriteLine("========================================================================")
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : script started")
+
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : cleaned up " & 
sTempDir & " directory from .log files")
+
+
+' check that WAN network interface is enabled, if not - enable it
+''WScript.Echo "Enabling WAN interface..."
+''objTextFile.WriteLine(Now & " : auto_create_image.vbs : Enable WAN 
interface")
+''oWshShell.Run "cscript.exe " & sTempDir & "\vcl\enWAN.vbs", 0, TRUE
+''WScript.Echo "Done!"
+''objTextFile.WriteLine(Now & " : auto_create_image.vbs : WAN interface 
enabled")
+
+
+' setup to run prepare_for_image.vbs script after reboot
+'objTextFile.WriteLine(Now & " : auto_create_image.vbs : setup RunOnce 
'auto_prepare_for_image.vbs' after reboot")
+'oWshShell.RegWrite 
"HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\step0", "cmd.exe /c 
cscript.exe " & sTempDir & "\vcl\auto_prepare_for_image.vbs"
+
+'check = 
oWshShell.RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\step0")
+'objTextFile.WriteLine(Now & " : CHECK (RunOnce registry entry): " & check)
+
+' enable AutoLogon after reboot
+'objTextFile.WriteLine(Now & " : auto_create_image.vbs : enable Auto-Logon 
after reboot")
+'oWshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\Winlogon\AutoAdminLogon", "1"
+'oWshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\Winlogon\DefaultUserName", "root"
+
+'check = oWshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\Winlogon\AutoAdminLogon")
+'objTextFile.WriteLine(Now & " : CHECK (AutoAdminLogon registry entry): " & 
check & " (should be 1)")
+
+
+' disable pagefile
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : disable page file")
+strCommand = "reg.exe add " & Chr(34) & _
+  "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" & 
Chr(34) &_
+  " /v PagingFiles /d " & Chr(34) & "" & Chr(34) & " /t REG_MULTI_SZ /f"
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+   WScript.Sleep 100
+Loop
+''strCommand = sTempDir & "\vcl\movefile.exe " & Chr(34) & "c:\pagefile.sys" & 
Chr(34) & " " & Chr(34) & Chr(34)
+strCommand = sAppDataDir & "\vcl\movefile.exe " & Chr(34) & "c:\pagefile.sys" 
& Chr(34) & " " & Chr(34) & Chr(34)
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+   WScript.Sleep 100
+Loop
+
+
+'check = oWshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session 
Manager\Memory Management\PagingFiles")
+'objTextFile.WriteLine(Now & " : CHECK (PagingFiles registry entry): '" & 
check(0) & "' (should be empty)")
+
+
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : script finished, 
rebooting computer")
+objTextFile.WriteLine("========================================================================")
+'close log file handler
+objTextFile.Close
+
+
+'reboot computer to make changes effective
+
+Set objWMIService = GetObject("winmgmts:" _
+    & "{impersonationLevel=impersonate,(Shutdown)}!\\" & MyName & 
"\root\cimv2")
+Set colOperatingSystems = objWMIService.ExecQuery _
+    ("Select * from Win32_OperatingSystem")
+For Each objOperatingSystem in colOperatingSystems
+    intreturn = ObjOperatingSystem.Win32Shutdown(6)
+    if intreturn = 0 Then
+      WScript.echo "createimage reboot"
+    Else
+      Wscript.echo "reboot failed error code " & intreturn
+    End If 
+Next
+
+WScript.Quit
+

Propchange: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/auto_create_image_new.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/enablepagefile.vbs
URL: 
http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/enablepagefile.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/enablepagefile.vbs 
(added)
+++ incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/enablepagefile.vbs 
Fri Dec 12 10:20:10 2008
@@ -0,0 +1,11 @@
+On Error Resume Next
+Set oWshShell = CreateObject("WScript.Shell")
+
+' turn back on pagefile
+strCommand = "reg.exe add " & Chr(34) & _
+  "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" & 
Chr(34) &_
+  " /v PagingFiles /d " & Chr(34) & "c:\pagefile.sys 0 0" & Chr(34) & " /t 
REG_MULTI_SZ /f"
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+   WScript.Sleep 100
+Loop

Propchange: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/enablepagefile.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/networkinfo.bat
URL: 
http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/networkinfo.bat?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/networkinfo.bat 
(added)
+++ incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/networkinfo.bat 
Fri Dec 12 10:20:10 2008
@@ -0,0 +1,115 @@
+...@echo off
+
+FOR /f "skip=1 tokens=2,15 " %%a in ('IPCONFIG') do (
+  if %%a==Address. (
+    SET FIRST_IP=%%b 
+    GOTO CONTINUE
+  )
+)
+
+:CONTINUE
+
+FOR /f "skip=10 tokens=2,15 " %%a in ('IPCONFIG') do (
+  if %%a==Address. (
+    SET SECOND_IP=%%b 
+  )
+)
+
+REM echo FIRST_IP = %FIRST_IP%
+REM echo SECOND_IP = %SECOND_IP%
+
+FOR /f "skip=1 tokens=1,2* " %%a in ('IPCONFIG') do (
+  if %%b==adapter (
+    SET FIRST_NAME=%%c
+    GOTO CONTINUE2
+  )
+)
+
+:CONTINUE2
+
+FOR /f "skip=10 tokens=1,2* " %%a in ('IPCONFIG') do (
+  if %%b==adapter (
+    SET SECOND_NAME=%%c
+  )
+)
+
+FOR /f "tokens=1 delims=:" %%a in ('echo %FIRST_NAME%') do (
+    SET FIRST_NAME=%%a
+)
+
+FOR /f "tokens=1 delims=:" %%a in ('echo %SECOND_NAME%') do (
+    SET SECOND_NAME=%%a
+)
+
+FOR /f "skip=1 tokens=2,13 " %%a in ('IPCONFIG') do (
+  if %%a==Gateway (
+    SET FIRST_GW=%%b 
+    GOTO CONTINUE3
+  )
+)
+
+:CONTINUE3
+
+FOR /f "skip=10 tokens=2,13 " %%a in ('IPCONFIG') do (
+  if %%a==Gateway (
+    SET SECOND_GW=%%b 
+  )
+)
+
+REM echo FIRST_IP = %FIRST_IP%
+REM echo FIRST_NAME = %FIRST_NAME%
+REM echo SECOND_IP = %SECOND_IP%
+REM echo SECOND_NAME = %SECOND_NAME%
+
+FOR /f "tokens=1,5 delims=. " %%a in ('echo %FIRST_IP%%SECOND_IP%') do (
+    if %%a==10 (
+      if %%b==152 (
+        SET INTERNAL_IP=%FIRST_IP%
+        SET INTERNAL_NAME=%FIRST_NAME%
+        SET INTERNAL_GW=%FIRST_GW%
+        SET EXTERNAL_IP=%SECOND_IP%
+        SET EXTERNAL_NAME=%SECOND_NAME%
+        SET EXTERNAL_GW=%SECOND_GW%
+      ) else (
+        SET INTERNAL_IP=%FIRST_IP%
+        SET INTERNAL_NAME=%FIRST_NAME%
+        SET INTERNAL_GW=%FIRST_GW%
+        SET EXTERNAL_IP=NA
+        SET EXTERNAL_NAME=NA
+        SET EXTERNAL_GW=NA
+      )
+    ) else (
+      if %%a==152 (
+        if %%b==10 (
+          SET EXTERNAL_IP=%FIRST_IP%
+          SET EXTERNAL_NAME=%FIRST_NAME%
+          SET EXTERNAL_GW=%FIRST_GW%
+          SET INTERNAL_IP=%SECOND_IP%
+          SET INTERNAL_NAME=%SECOND_NAME%
+          SET INTERNAL_GW=%SECOND_GW%
+        ) else (
+          SET EXTERNAL_IP=%FIRST_IP%
+          SET EXTERNAL_NAME=%FIRST_NAME%
+          SET EXTERNAL_GW=%FIRST_GW%
+          SET INTERNAL_IP=NA
+          SET INTERNAL_NAME=NA
+          SET INTERNAL_GW=NA
+        )
+      ) else (
+        SET INTERNAL_IP=NA
+        SET INTERNAL_NAME=NA
+        SET INTERNAL_GW=NA
+        SET EXTERNAL_IP=NA
+        SET EXTERNAL_NAME=NA
+        SET EXTERNAL_GW=NA
+      )
+    )
+)
+
+REM echo INTERNAL_IP = %INTERNAL_IP%
+REM echo INTERNAL_NAME = %INTERNAL_NAME%
+REM echo INTERNAL_GW = %INTERNAL_GW%
+
+REM echo EXTERNAL_IP = %EXTERNAL_IP%
+REM echo EXTERNAL_NAME = %EXTERNAL_NAME%
+REM echo EXTERNAL_GW = %EXTERNAL_GW%

Propchange: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/networkinfo.bat
------------------------------------------------------------------------------
    svn:executable = 

Added: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/networkinfosetfw.vbs
URL: 
http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/networkinfosetfw.vbs?rev=726079&view=auto
==============================================================================
--- 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/networkinfosetfw.vbs 
(added)
+++ 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/networkinfosetfw.vbs 
Fri Dec 12 10:20:10 2008
@@ -0,0 +1,120 @@
+On Error Resume Next
+ 
+Dim objWMIService, objItem, objService
+Dim colListOfServices, strComputer, strService, intSleep
+Dim colNicConfigs,colNicAdapter,strDescription,strMAC
+Dim strIPAddresses,strGWAddress
+
+strComputer = "."
+ 
+Set objWMIService = GetObject("winmgmts:" _
+ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
+Set colNicConfigs = objWMIService.ExecQuery _
+ ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
+Set colNicAdapter = objWMIService.ExecQuery _
+ ("SELECT * FROM Win32_NetworkAdapter")
+ 
+For Each objNicConfig In colNicConfigs
+   strDescription = objNicConfig.Description
+   strMAC = objNicConfig.MACAddress
+ If InStr(strDescription, "Broadcom") Then
+   strIPAddresses = ""
+   If Not IsNull(objNicConfig.IPAddress) Then
+      For Each strIPAddress In objNicConfig.IPAddress
+          If Not strIPAddress = "" Then
+               strIPAddresses = strIPAddresses & strIPAddress
+          End If
+      Next
+   End If
+   strGWAddresses = ""
+   If Not IsNull(objNicConfig.DefaultIPGateway) Then
+      For Each strGWAddress In objNicConfig.DefaultIPGateway
+          If Not strGWAddress = "" Then
+               strGWAddresses = strGWAddresses & strGWAddress
+          End If
+      Next
+   End If
+
+
+' WScript.Echo "IP Address  : " & strIPAddresses & VbCrLf & _
+'              "MAC Address : " & strMAC & VbCrLf & _
+'              "GW Address  : " & strGWAddresses
+ For Each objNicAdapter In colNicAdapter
+   If strMAC = objNicAdapter.MACAddress Then
+     strNetConnectionID = objNicAdapter.NetConnectionID
+     If Not strNetConnectionID = "" Then
+       'WScript.Echo "Name: " & strNetConnectionID & VbCrLf
+ If Left(strIPAddresses,3) = "10." Then
+    INTERNAL_IP = strIPAddresses
+    INTERNAL_NAME = strNetConnectionID
+    INTERNAL_GW = strGWAddresses
+ End If
+
+ If Left(strIPAddresses,4) = "152." Then
+    EXTERNAL_IP = strIPAddresses
+    EXTERNAL_NAME = strNetConnectionID
+    EXTERNAL_GW = strGWAddresses
+ End If
+     End If
+   End If
+ Next
+
+
+ Else
+   strIPAddresses = ""
+   strGWAddresses = ""
+ End If
+
+Next
+
+
+
+'WScript.Echo "INTERNAL_IP = " & INTERNAL_IP
+'WScript.Echo "INTERNAL_NAME = " & INTERNAL_NAME
+'WScript.Echo "INTERNAL_GW = " & INTERNAL_GW
+
+'WScript.Echo "EXTERNAL_IP = " & EXTERNAL_IP
+'WScript.Echo "EXTERNAL_NAME = " & EXTERNAL_NAME
+'WScript.Echo "EXTERNAL_GW = " & EXTERNAL_GW
+
+Set oWshShell = CreateObject("WScript.Shell")
+
+Dim strCMD1,routeCMD,strCMD2,strCMD3
+
+strCMD1 = "netsh firewall set icmpsetting type = 8 mode = enable interface = " 
& Chr(34) & INTERNAL_NAME & Chr(34)
+'oWshShell.run "%SystemRoot%\system32\route.exe -f -p ADD 0.0.0.0 MASK 0.0.0.0 
EXTERNAL_GW METRIC 2",,true
+routeCMD = "route.exe -f -p ADD 0.0.0.0 MASK 0.0.0.0 " & EXTERNAL_GW & " 
METRIC 2"
+'WScript.Echo "setting route" & routeCMD
+oWshShell.run routeCMD,,true
+'WScript.Echo "setting icmpsetting " & strCMD1
+oWshShell.run strCMD1,,true
+strCMD2 = "netsh firewall set portopening protocol = TCP port = 3389 mode = 
disable interface = " & Chr(34) & EXTERNAL_NAME & Chr(34)
+'WScript.Echo "closing 3389 " & strCMD2
+oWshShell.run strCMD2,,true
+strCMD3 = "netsh firewall set portopening protocol = TCP port = 22 name = SSHD 
mode = enable interface = " & Chr(34) & INTERNAL_NAME & Chr(34)
+'WScript.Echo "opening 22 " & strCMD3
+oWshShell.run strCMD3,,true
+
+objWMIService=""
+' update syslog - stop and restart service
+
+strComputer = "."
+intSleep = 1500
+
+'On Error Resume Next
+' NB strService is case sensitive.
+strService = " 'ntsyslog' "
+Set objWMIService = GetObject("winmgmts:" _
+& "{impersonationLevel=impersonate}!\\" _
+& strComputer & "\root\cimv2")
+Set colListOfServices = objWMIService.ExecQuery _
+("Select * from Win32_Service Where Name ="_
+& strService & " ")
+For Each objService in colListOfServices
+objService.StopService()
+WSCript.Sleep intSleep
+oWshShell.run """reg add HKLM\SOFTWARE\SaberNet /v syslog /d INTERNAL_GW 
/f""",,true
+objService.StartService()
+Next
+'WScript.Echo "Your "& strService & " service has Started"
+WScript.Quit

Propchange: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/networkinfosetfw.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/setfw.bat
URL: 
http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/setfw.bat?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/setfw.bat (added)
+++ incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/setfw.bat Fri Dec 
12 10:20:10 2008
@@ -0,0 +1,17 @@
+...@echo off
+
+ipconfig /renew
+
+ping 1.1.1.1 -n 1 -w 10000 > NUL
+
+call "%APPDATA%\VCL\networkinfo.bat"
+
+%SystemRoot%\system32\route.exe -p ADD 0.0.0.0 MASK 0.0.0.0 %EXTERNAL_GW% 
%METRIC 2
+
+netsh firewall set icmpsetting type = 8 mode = enable interface = 
"%INTERNAL_NAME%"
+
+netsh firewall set portopening protocol = TCP port = 3389 mode = enable scope 
= custom addresses = %INTERNAL_GW%
+
+netsh firewall set portopening protocol = TCP port = 3389 mode = disable 
interface = "%EXTERNAL_NAME%"
+
+netsh firewall set portopening protocol = TCP port = 22 name = SSHD mode = 
enable interface = "%INTERNAL_NAME%"

Propchange: incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/setfw.bat
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/setsyslog.bat
URL: 
http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/setsyslog.bat?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/setsyslog.bat 
(added)
+++ incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/setsyslog.bat Fri 
Dec 12 10:20:10 2008
@@ -0,0 +1,37 @@
+...@echo off
+
+call "%APPDATA%\VCL\networkinfo.bat"
+
+sc stop ntsyslog
+
+:WAIT
+FOR /f "skip=1 tokens=1,4 " %%a in ('sc query ntsyslog') do (
+  if %%a==STATE (
+    if %%b==STOPPED (
+      GOTO CONTINUE
+    ) else (
+      ping 1.1.1.1 -n 1 -w 1000 > NUL
+      GOTO WAIT
+    )
+  )
+)
+
+:CONTINUE
+
+reg add HKLM\SOFTWARE\SaberNet /v Syslog /d %INTERNAL_GW% /f
+
+sc start ntsyslog
+
+:WAIT2
+FOR /f "skip=1 tokens=1,4 " %%a in ('sc query ntsyslog') do (
+  if %%a==STATE (
+    if %%b==RUNNING (
+      GOTO END
+    ) else (
+      ping 1.1.1.1 -n 1 -w 1000 > NUL
+      GOTO WAIT2
+    )
+  )
+)
+
+:END
\ No newline at end of file

Propchange: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/setsyslog.bat
------------------------------------------------------------------------------
    svn:executable = 

Added: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/unsetautologon.vbs
URL: 
http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/unsetautologon.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/unsetautologon.vbs 
(added)
+++ incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/unsetautologon.vbs 
Fri Dec 12 10:20:10 2008
@@ -0,0 +1,8 @@
+On Error Resume Next
+
+Set oWshShell = CreateObject("WScript.Shell")
+
+' Turn off auto-login
+oWshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\Winlogon\AutoAdminLogon", "0"
+
+WScript.Quit

Propchange: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/unsetautologon.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/updatecygwin.vbs
URL: 
http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/updatecygwin.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/updatecygwin.vbs 
(added)
+++ incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/updatecygwin.vbs 
Fri Dec 12 10:20:10 2008
@@ -0,0 +1,33 @@
+Set oWshShell = CreateObject("WScript.Shell")
+
+' create new "passwd" and "group" files for cygwin, because SID was changed 
+oWshShell.Run "cmd.exe /C del " & "c:\cygwin\etc\group", 0, TRUE
+WScript.Sleep 1000
+oWshShell.Run "cmd.exe /C del " & "c:\cygwin\etc\passwd", 0, TRUE
+WScript.Sleep 1000
+oWshShell.Run "cmd.exe /C " & "c:\cygwin\bin\mkgroup.exe -l" & " > 
c:\cygwin\etc\group", 0, TRUE
+WScript.Sleep 1000
+oWshShell.Run "cmd.exe /C " & "c:\cygwin\bin\mkpasswd.exe -l" & " > 
c:\cygwin\etc\passwd", 0, TRUE
+WScript.Sleep 1000
+
+' restore ownership of files
+oWshShell.Run "cmd.exe /C " & "c:\cygwin\bin\chown.exe root:None /etc/ssh*", 
0, TRUE
+oWshShell.Run "cmd.exe /C " & "c:\cygwin\bin\chown.exe -R root:None /home/", 
0, TRUE
+oWshShell.Run "cmd.exe /C " & "c:\cygwin\bin\chown.exe root:None /var/empty", 
0, TRUE
+oWshShell.Run "cmd.exe /C " & "c:\cygwin\bin\chown.exe root:None 
/var/log/sshd.log", 0, TRUE
+oWshShell.Run "cmd.exe /C " & "c:\cygwin\bin\chown.exe root:None 
/var/log/lastlog", 0, TRUE
+WScript.Sleep 1000
+
+' regenerate ssh keys
+' first delete old ones
+oWshShell.Run "cmd.exe /C del " & "c:\cygwin\etc\ssh_host_*", 0, TRUE
+
+oWshShell.Run "cmd.exe /C " & "c:\cygwin\bin\ssh-keygen.exe -q -t rsa1 -f 
/etc/ssh_host_key -N " & Chr(34) & Chr(34), 0, TRUE
+oWshShell.Run "cmd.exe /C " & "c:\cygwin\bin\ssh-keygen.exe -q -t rsa -f 
/etc/ssh_host_rsa_key -N " & Chr(34) & Chr(34), 0, TRUE
+oWshShell.Run "cmd.exe /C " & "c:\cygwin\bin\ssh-keygen.exe -q -t dsa -f 
/etc/ssh_host_dsa_key -N " & Chr(34) & Chr(34), 0, TRUE
+
+' start SSH Daemon
+oWshShell.Run "cmd.exe /C " & "c:\cygwin\bin\cygrunsrv.exe -S sshd", 0, TRUE
+'WScript.Sleep 1000
+
+WScript.Quit

Propchange: 
incubator/vcl/tags/import/managementnode/vbs_scripts/VCL/updatecygwin.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/vbs_scripts/add_user.vbs
URL: 
http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/vbs_scripts/add_user.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/vbs_scripts/add_user.vbs (added)
+++ incubator/vcl/tags/import/managementnode/vbs_scripts/add_user.vbs Fri Dec 
12 10:20:10 2008
@@ -0,0 +1,35 @@
+Dim UserAccount
+Dim UserPasswd
+ 
+If WScript.Arguments.Count = 2 Then
+   UserAccount = WScript.Arguments.Item(0)
+   UserPasswd = WScript.Arguments.Item(1)
+Else
+   WScript.Echo "Usage: add_user.vbs <user_name> <user_passwd>"
+   WScript.Quit
+End If
+
+strComputer = "."
+Set colAccounts = GetObject("WinNT://" & strComputer & "")
+Set objUser = colAccounts.Create("user", UserAccount)
+objUser.SetPassword UserPasswd
+objUser.SetInfo
+
+Set net = WScript.CreateObject("WScript.Network") 
+local = net.ComputerName 
+set group = GetObject("WinNT://"& local &"/Administrators") 
+set group1 = GetObject("WinNT://"& local &"/Remote Desktop Users") 
+on error resume next 
+group.Add "WinNT://"& UserAccount &""
+group1.Add "WinNT://"& UserAccount &""
+CheckError 
+
+sub CheckError 
+  if not err.number=0 then 
+    WScript.Echo err.Number
+    vbCritical err.clear 
+'  else WScript.Echo "Done!" 
+  end if 
+end sub
+
+WScript.sleep 1000
\ No newline at end of file

Propchange: incubator/vcl/tags/import/managementnode/vbs_scripts/add_user.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: 
incubator/vcl/tags/import/managementnode/vbs_scripts/auto_create_image.vbs
URL: 
http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/vbs_scripts/auto_create_image.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/vbs_scripts/auto_create_image.vbs 
(added)
+++ incubator/vcl/tags/import/managementnode/vbs_scripts/auto_create_image.vbs 
Fri Dec 12 10:20:10 2008
@@ -0,0 +1,66 @@
+On Error Resume Next
+
+Set oWshShell = CreateObject("WScript.Shell")
+Set oWshEnvironment = oWshShell.Environment("Process")
+Set oFileSystem = CreateObject("Scripting.FileSystemObject")
+Set WshNetwork = WScript.CreateObject("WScript.Network")
+sTempDir = oWshEnvironment("TEMP")
+sAppDataDir = oWshEnvironment("APPDATA")
+Dim oExec
+Dim GuiAnswer
+strComputer = "."
+MyName = lcase(WshNetwork.ComputerName)
+
+Const ForAppending = 8
+
+
+' clean up %TEMP% directory from .log files
+oWshShell.Run "cmd.exe /C del /Q " & sTempDir & "\*.log", 0, TRUE
+
+' open log file to record all actions taken
+set objFSO = CreateObject("Scripting.FileSystemObject")
+Set objTextFile = objFSO.OpenTextFile _
+    (sTempDir & "\VCLprepare.log", ForAppending, True)
+objTextFile.WriteLine("========================================================================")
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : script started")
+
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : cleaned up " & 
sTempDir & " directory from .log files")
+
+
+' disable pagefile
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : disable page file")
+strCommand = "reg.exe add " & Chr(34) & _
+  "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" & 
Chr(34) &_
+  " /v PagingFiles /d " & Chr(34) & "" & Chr(34) & " /t REG_MULTI_SZ /f"
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+   WScript.Sleep 100
+Loop
+strCommand = sAppDataDir & "\vcl\movefile.exe " & Chr(34) & "c:\pagefile.sys" 
& Chr(34) & " " & Chr(34) & Chr(34)
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+   WScript.Sleep 100
+Loop
+
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : script finished, 
rebooting computer")
+objTextFile.WriteLine("========================================================================")
+'close log file handler
+objTextFile.Close
+
+'reboot computer to make changes effective
+
+Set objWMIService = GetObject("winmgmts:" _
+    & "{impersonationLevel=impersonate,(Shutdown)}!\\" & MyName & 
"\root\cimv2")
+Set colOperatingSystems = objWMIService.ExecQuery _
+    ("Select * from Win32_OperatingSystem")
+For Each objOperatingSystem in colOperatingSystems
+    intreturn = ObjOperatingSystem.Win32Shutdown(6)
+    if intreturn = 0 Then
+      WScript.echo "createimage reboot"
+    Else
+      Wscript.echo "reboot failed error code " & intreturn
+    End If 
+Next
+
+WScript.Quit
+

Propchange: 
incubator/vcl/tags/import/managementnode/vbs_scripts/auto_create_image.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/vbs_scripts/del_user.vbs
URL: 
http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/vbs_scripts/del_user.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/vbs_scripts/del_user.vbs (added)
+++ incubator/vcl/tags/import/managementnode/vbs_scripts/del_user.vbs Fri Dec 
12 10:20:10 2008
@@ -0,0 +1,14 @@
+Dim UserAccount
+ 
+If WScript.Arguments.Count = 1 Then
+   UserAccount = WScript.Arguments.Item(0)
+Else
+   WScript.Echo "Usage: del_user.vbs <user_name>"
+   WScript.Quit
+End If
+
+strComputer = "."
+Set objComputer = GetObject("WinNT://" & strComputer & ",computer")
+objComputer.Delete "user", UserAccount
+
+WScript.sleep 1000
\ No newline at end of file

Propchange: incubator/vcl/tags/import/managementnode/vbs_scripts/del_user.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/vbs_scripts/list_users.vbs
URL: 
http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/vbs_scripts/list_users.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/vbs_scripts/list_users.vbs (added)
+++ incubator/vcl/tags/import/managementnode/vbs_scripts/list_users.vbs Fri Dec 
12 10:20:10 2008
@@ -0,0 +1,7 @@
+Set objNetwork = CreateObject("Wscript.Network")
+strComputer = objNetwork.ComputerName
+Set colAccounts = GetObject("WinNT://" & strComputer & "")
+colAccounts.Filter = Array("user")
+For Each objUser In colAccounts
+    Wscript.Echo objUser.Name
+Next
\ No newline at end of file

Propchange: incubator/vcl/tags/import/managementnode/vbs_scripts/list_users.vbs
------------------------------------------------------------------------------
    svn:executable = 


Reply via email to