ソース掲示板




すべてから検索

キーワード   条件 表示 現行ログ 過去ログ トピックス 名前 本文

  メンテナンス 前画面に戻る

対象スレッド 件名: Microsoft SQL Server Desktop Engine 2000 のアンインストール・インストール
名前: lightbox
処理選択
パスワード

件名 Microsoft SQL Server Desktop Engine 2000 のアンインストール・インストール
名前 lightbox
コメント
@DIV
<JOB>
<COMMENT>
************************************************************
 WEB WSH 実行スケルトン
************************************************************
</COMMENT>

<COMMENT>
************************************************************
 外部スクリプト定義
************************************************************
</COMMENT>
<SCRIPT
	language="VBScript"
	src="http://lightbox.in.coocan.jp/laylaClass.vbs">
</SCRIPT>

<SCRIPT language=VBScript>
' ***********************************************************
' 処理開始
' ***********************************************************
Call laylaFunctionTarget( "http://lightbox.in.coocan.jp/" )
Call laylaLoadFunction( "baseFunction.vbs" )
Call laylaLoadFunction( "wmiReg.vbs" )

GetWshShell

TargetPath = ""
strPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
if WMIRegEnumKey( HKEY_LOCAL_MACHINE, strPath, aKeys ) then
	For Each strKey in aKeys
		strPath2 = strPath & "\" & strKey
		if WMIRegGetStringValue( HKEY_LOCAL_MACHINE, strPath2, "DisplayName", strValue ) then
			if Instr( strValue, "Microsoft SQL Server Desktop Engine" ) > 0 then
				if TargetPath <> "" then
					TargetPath = TargetPath & ","
				end if
				TargetPath = TargetPath & strPath2
			end if
		end if
	Next
end if

if TargetPath <> "" then
	if YesNo( "既に MSDE はインストールされています。アンインストールしますか?" ) then
		aPath = Split( TargetPath, "," )
		For I = 0 to Ubound( aPath )
			Call WMIRegGetStringValue( HKEY_LOCAL_MACHINE, aPath(I), "UninstallString", strValue )
			Call WshShell.Run( strValue, , True )
		Next
		MsgOk( "MSDE のアンインストールが終了しました" )
	else
		Wscript.Quit
	end if
end if

if YesNo("MSDE のインストールを開始しますか?") then
	@C:green(WshShell.CurrentDirectory = ScriptDir)
	Call WshShell.Run( "cmd.exe /c install.bat", , True )
end if


</SCRIPT>
</JOB>
@END


[[以下は install.bat]]
MSDE2000 のパッケージを解凍してできる @C:red(MSDESetup) ディレクトリの中に
上記 .wsf と install.bat を入れて、wsf を実行。

@DIV
setup SAPWD="password" SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0 INSTANCENAME="MSDE2000" TARGETDIR="c:\mssql2000\" /L*v C:/MSDELog.log
@END

※ 接続は、サーバを コンピュータID\MSDE2000 で