Untested script to run keygen batch file.
[shibboleth/sp.git] / msi / scripts / shib_keygen.vbs
1 Dim ConvertedDir, InstallDir, ScriptName, WshShell\r
2 \r
3 On Error Resume Next\r
4 Set WshShell = CreateObject("WScript.Shell")\r
5 If (Err = 0) then\r
6   'Get the INSTALLDIR value via CustomActionData\r
7   InstallDir = Session.Property("CustomActionData")\r
8 \r
9   'Remove all trailing backslashes to normalize\r
10   Do While (Mid(InstallDir,Len(InstallDir),1) = "\")\r
11     InstallDir = mid(InstallDir,1,Len(InstallDir)-1)\r
12   Loop\r
13   ConvertedDir = Replace(InstallDir, "\", "/")\r
14   ScriptName = ConvertedDir & "\etc\shibboleth\keygen.bat"\r
15   \r
16   WshShell.Exec(ScriptName)\r
17 End If\r