diff --git a/dmsctl.vbs b/dmsctl.vbs new file mode 100644 index 0000000..8f63aaa --- /dev/null +++ b/dmsctl.vbs @@ -0,0 +1,25 @@ +' This script should only be invoked for Vista and Windows 7 + +'Detecting current OS +strComputer = "." +currOS = "" +doRunAs = false + +Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") +Set colOperatingSystems = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") + +For Each objOperatingSystem in colOperatingSystems + currOS = objOperatingSystem.Caption & " " & objOperatingSystem.Version + currOS = trim(currOS) +Next + +If left(currOS, 19) = "Microsoft Windows 7" Then + doRunAs = true +End If + +If doRunAs = true Then + Set objShell = CreateObject("Shell.Application") + Set objFolder = objShell.Namespace("C:\Program Files (x86)\Zend\ktdms\knowledgetree") + Set objFolderItem = objFolder.ParseName("dmsctl_install.bat") + objFolderItem.InvokeVerb "runas" +End If \ No newline at end of file diff --git a/dmsctl_install.bat b/dmsctl_install.bat new file mode 100644 index 0000000..112b1f1 --- /dev/null +++ b/dmsctl_install.bat @@ -0,0 +1,3 @@ +rem KnowledgeTree UAC Run installer as Administrator for Windows 7 and Vista +@echo off +call dmsctl.bat install \ No newline at end of file