Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
'==========================================================================
'
' NAME: AppEnablerCreateODBC.vbs
'
' AUTHOR: Mark D. MacLachlan, The Spider's Parlor
' URL: http;//[URL unfurl="true"]www.thespidersparlor.com[/URL]
' DATE : 11/3/2005
'
' COMMENT: Script will check to see if it has been run on computer previously
' If it has, it will not run. Script adds desktop icon For
' App Enabler on Desktop and Startup folder. Also sets ODBC settings
' so App Enabler can work. Also copies file to link with Active
' Directory. Adds Registry key HKLM\Software\MYCOMPANY\Installs\AppEnabler\1
'==========================================================================
Set WshShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next
regpath = "HKLM\SOFTWARE\MYCOMPANY\Installs\"
NautInstall = (WSHShell.Regread(regpath & "AppEnabler"))
If NautInstall = "1" Then
WScript.Quit
Else
Dim DataSourceName
Dim DatabaseName
Dim dbDescription
Dim DriverPath
Dim DriverName
Dim LastUser
Dim Regional
Dim Server
Const SystemFolder= 1
Dim fso
Dim SysFolder
Dim SysFolderPath
Set fso = wscript.CreateObject("Scripting.FileSystemObject")
Set SysFolder =fso.GetSpecialFolder(SystemFolder)
SysFolderPath= SysFolder.Path
'Specify the DSN parameters.
DataSourceName = "Temp1"
DatabaseName = "Temp1"
dbDescription = ""
DriverPath = SysFolderPath & "\sqlsrv32.dll"
Server = "Temp2"
LastUser = "DBUser"
DriverName = "SQL Server"
Dim RegEdPath
RegEdPath= "HKLM\SOFTWARE\ODBC\ODBC.INI\" & DataSourceName & "\"
WshShell.RegWrite RegEdPath , ""
WshShell.RegWrite RegEdPath & "Database" , DatabaseName
WshShell.RegWrite RegEdPath & "Description" , dbDescription
WshShell.RegWrite RegEdPath & "Driver" , DriverPath
WshShell.RegWrite RegEdPath & "LastUser" , LastUser
WshShell.RegWrite RegEdPath & "Server" , Server
WshShell.RegWrite "HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\" & DataSourceName , DriverName
WshShell.Run("odbcad32.exe")
WshShell.AppActivate "Microsoft ODBC Administrator"
WScript.Sleep 10
WshShell.Sendkeys "+{tab}"
WshShell.AppActivate "Microsoft ODBC Administrator"
WshShell.Sendkeys "{right}"
WshShell.AppActivate "Microsoft ODBC Administrator"
WshShell.Sendkeys "{tab}"
WshShell.AppActivate "Microsoft ODBC Administrator"
WshShell.Sendkeys "Temp1"
WshShell.AppActivate "Microsoft ODBC Administrator"
WshShell.Sendkeys "%c"
WshShell.AppActivate "Microsoft ODBC Administrator"
WshShell.Sendkeys "%n"
WshShell.AppActivate "Microsoft ODBC Administrator"
WshShell.Sendkeys "%p"
WshShell.AppActivate "Microsoft ODBC Administrator"
WshShell.Sendkeys "DBPassword"
WshShell.AppActivate "Microsoft ODBC Administrator"
WshShell.Sendkeys "%n"
WshShell.AppActivate "Microsoft ODBC Administrator"
WshShell.Sendkeys "%n"
WshShell.AppActivate "Microsoft ODBC Administrator"
WshShell.Sendkeys "{enter}"
WshShell.AppActivate "Microsoft ODBC Administrator"
WshShell.Sendkeys "{right}"
WshShell.AppActivate "Microsoft ODBC Administrator"
WshShell.Sendkeys "{enter}"
WshShell.AppActivate "Microsoft ODBC Administrator"
WshShell.Sendkeys "{enter}"
Call WSHShell.Run("cmd.exe /C copy \\bedrock\shared\DMLogin.htm C:\Progra~\Hyland\Desktop\Forms\ /y")
strFavs = WshShell.SpecialFolders("AllUsersDesktop")
strshortcut = strFavs & "\App Enabler.lnk"
If Not fso.FileExists(strshortcut) Then
SET oUrlLink = WshShell.CreateShortcut(strshortcut)
exePath = "C:\Program Files\Hyland\Application Enabler\AEClient.exe"
oUrlLink.TargetPath = exePath
oUrlLink.Arguments = Chr(34) & "\\bedrock\imagesoft$\AppEnabler.xml" & Chr(34)
oUrlLink.WorkingDirectory = ""
oUrlLink.Save
End If
strFavs = WshShell.SpecialFolders("AllUsersStartup")
strshortcut = strFavs & "\App Enabler.lnk"
If Not fso.FileExists(strshortcut) Then
SET oUrlLink = WshShell.CreateShortcut(strshortcut)
exePath = "C:\Program Files\Hyland\Application Enabler\AEClient.exe"
oUrlLink.TargetPath = exePath
oUrlLink.Arguments = Chr(34) & "\\bedrock\imagesoft$\AppEnabler.xml" & Chr(34)
oUrlLink.WorkingDirectory = ""
oUrlLink.Save
End If
WSHShell.RegWrite regpath & "AppEnabler","1","REG_DWORD"
End If