From ec44b6c10bbef6a69b866cf7fdf543ae3b2ee985 Mon Sep 17 00:00:00 2001 From: Daniel Covington Date: Wed, 1 May 2024 13:35:52 -0400 Subject: [PATCH] Added service setup --- ImportService/TrackingDataImport.vbs | 10 ++++++++-- InstallService.vbs | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 InstallService.vbs diff --git a/ImportService/TrackingDataImport.vbs b/ImportService/TrackingDataImport.vbs index f25b34a..bfd076b 100644 --- a/ImportService/TrackingDataImport.vbs +++ b/ImportService/TrackingDataImport.vbs @@ -1,5 +1,6 @@ Option Explicit Dim dev:dev = True +Dim WaitTime:WaitTime = 15000 Dim DataDirectory Dim ConnectionString Dim glob:set glob = CreateObject("Chilkat_9_5_0.Global") @@ -20,9 +21,14 @@ Dim WorkingDirectory:WorkingDirectory = Replace(WScript.ScriptFullName,WScript.S ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source=C:\inetpub\Data\webdata - Copy.mdb;" End If + +Do - -CheckForFiles + CheckForFiles + WScript.Sleep WaitTime + +Loop + Function CheckForFiles() Dim objFSO:Set objFSO = CreateObject("Scripting.FileSystemObject") diff --git a/InstallService.vbs b/InstallService.vbs new file mode 100644 index 0000000..f366177 --- /dev/null +++ b/InstallService.vbs @@ -0,0 +1,4 @@ +Set oShell = CreateObject ("WScript.Shell") + +oShell.Run Replace(WScript.ScriptFullName,WScript.ScriptName,"") & "Dependancies\nssm install" & " TrackingImport C:\Windows\System32\cscript.exe " &_ + Replace(WScript.ScriptFullName,WScript.ScriptName,"") & "ImportService\TrackingDataImport.vbs" \ No newline at end of file