diff --git a/SetupWIXVS19/Config.wxi b/SetupWIXVS19/Config.wxi new file mode 100644 index 0000000..449c4be --- /dev/null +++ b/SetupWIXVS19/Config.wxi @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SetupWIXVS19/Product.wxs b/SetupWIXVS19/Product.wxs new file mode 100644 index 0000000..29d3f37 --- /dev/null +++ b/SetupWIXVS19/Product.wxs @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DISABLE_DESKTOP_ICON + + + + + DISABLE_STARTMENU_ICON + + + + + + + + + + + + 1 + 1 + 1 + 1 + 1 + + + diff --git a/SetupWIXVS19/SetupWIXVS19.wixproj b/SetupWIXVS19/SetupWIXVS19.wixproj new file mode 100644 index 0000000..bdef435 --- /dev/null +++ b/SetupWIXVS19/SetupWIXVS19.wixproj @@ -0,0 +1,65 @@ + + + + Debug + x86 + 3.10 + 3c1b87f6-cde9-49af-81bb-f697d8bc7d0e + 2.0 + SetupWIXVS19 + Package + + + bin\$(Configuration)\ + obj\$(Configuration)\ + Debug + de-DE + + -b "$(SolutionDir)WIDigConsoleApp\bin\$(Configuration)" + -b "$(SolutionDir)WIDigForm\bin\$(Configuration)" + + + + bin\$(Configuration)\ + obj\$(Configuration)\ + + + + + + + + + + C:\Program Files (x86)\WiX Toolset v3.14\bin\WixUtilExtension.dll + WixUtilExtension + + + C:\Program Files (x86)\WiX Toolset v3.14\bin\WixUIExtension.dll + WixUIExtension + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SetupWIXVS19/bin/Debug/WIDigConsoleApp-x86-1.2.0.0.msi b/SetupWIXVS19/bin/Debug/WIDigConsoleApp-x86-1.2.0.0.msi new file mode 100644 index 0000000..180e364 Binary files /dev/null and b/SetupWIXVS19/bin/Debug/WIDigConsoleApp-x86-1.2.0.0.msi differ diff --git a/SetupWIXVS19/bin/Debug/WIDigConsoleApp-x86-1.2.0.0.wixpdb b/SetupWIXVS19/bin/Debug/WIDigConsoleApp-x86-1.2.0.0.wixpdb new file mode 100644 index 0000000..aae8057 Binary files /dev/null and b/SetupWIXVS19/bin/Debug/WIDigConsoleApp-x86-1.2.0.0.wixpdb differ diff --git a/SetupWIXVS19/obj/Debug/Product.wixobj b/SetupWIXVS19/obj/Debug/Product.wixobj new file mode 100644 index 0000000..2fc3b03 --- /dev/null +++ b/SetupWIXVS19/obj/Debug/Product.wixobj @@ -0,0 +1 @@ +
112522Installation Database3Beschreibung des Programms4Digital Data5Installer6Kommentar wie Copyright-Hinweis7Intel;10319*14100152192
ApplicationShortcut_StartMenu{8E116EA7-41C4-4E83-AF7C-997F8CB7432D}ApplicationProgramsFolder4reg458575F6EC95912A09BE56F605537B2EApplicationShortcut_Desktop{9100D46D-1576-484A-B467-BC10FFDB21BB}DesktopFolder4reg24CD571387623DE04253DF5804E68BA9MainApplicationExe{195612C2-F0C0-472A-A83E-935BF13CE295}INSTALLDIR0ConsoleApplicationExeDevExpressLibs{A17FA11F-D78F-464E-930E-5FAD7927CE4E}INSTALLDIR0DevExpress.Data.v19.2.dllDigitalDataLibs{940298CA-6934-4E7A-A45B-1246B23622A6}INSTALLDIR0DigitalData.Modules.Config.dllMiscLibs{6A621556-DAC9-48E2-B50C-624191D26845}INSTALLDIR0Interop.WINDREAMLib.dllRegistryKeys{AEEBEA13-8AD6-4F3D-AC4A-ECEA4151DFB0}INSTALLDIR4regEBE0EF17DD558B5B89C0C92D0DB4A62F
DesktopShortcut0DISABLE_DESKTOP_ICONStartmenuShortcut0DISABLE_STARTMENU_ICON
WelcomeDlgNextNewDialogInstallDirDlg12InstallDirDlgBackNewDialogWelcomeDlg12InstallDirDlgNextNewDialogFeaturesDlg12InstallDirDlgChangeFolderNewDialogBrowseDlg12FeaturesDlgBackNewDialogInstallDirDlg12
INSTALLDIRDDDIRgoybbney|Windream Indexer von Digital DataDDDIRProgramFilesFolderraunfgza|Digital DataProgramFilesFolderTARGETDIR.ApplicationProgramsFolderProgramMenuFoldero_j0ngxn|Windream Indexer von Digital DataProgramMenuFolderTARGETDIR.DesktopFolderTARGETDIR.TARGETDIRSourceDir
MainApplicationMain Application210DesktopShortcutDesktop Shortcut410StartmenuShortcutStartmenu Shortcut610
MainApplicationExeMainApplicationExeWIDIG.exe01536MainApplicationExeConfigMainApplicationExet2hhy6j7.con|WIDIG.exe.config01536ConsoleApplicationExeMainApplicationExe5kvmi5uj.exe|WIDigConsoleApp.exe01536ConsoleApplicationExeConfigMainApplicationExerdqxcxpg.con|WIDigConsoleApp.exe.config01536DevExpress.Data.v19.2.dllDevExpressLibshicbj1ol.dll|DevExpress.Data.v19.2.dll01536DevExpress.Pdf.v19.2.Core.dllDevExpressLibstqagdsig.dll|DevExpress.Pdf.v19.2.Core.dll01536DevExpress.Printing.v19.2.Core.dllDevExpressLibsmpommu2_.dll|DevExpress.Printing.v19.2.Core.dll01536DevExpress.Sparkline.v19.2.Core.dllDevExpressLibsl4mtjdvk.dll|DevExpress.Sparkline.v19.2.Core.dll01536DevExpress.Utils.v19.2.dllDevExpressLibs1qzvx-az.dll|DevExpress.Utils.v19.2.dll01536DevExpress.XtraBars.v19.2.dllDevExpressLibsbq0xu8is.dll|DevExpress.XtraBars.v19.2.dll01536DevExpress.XtraEditors.v19.2.dllDevExpressLibss8k5e0xj.dll|DevExpress.XtraEditors.v19.2.dll01536DigitalData.Modules.Config.dllDigitalDataLibswdm7k4y7.dll|DigitalData.Modules.Config.dll01536DigitalData.Modules.Filesystem.dllDigitalDataLibshk8vpnku.dll|DigitalData.Modules.Filesystem.dll01536DigitalData.Modules.Language.dllDigitalDataLibsg1oomob7.dll|DigitalData.Modules.Language.dll01536DigitalData.Modules.Logging.dllDigitalDataLibsroaulrt1.dll|DigitalData.Modules.Logging.dll01536DigitalData.Modules.Windream.dllDigitalDataLibsjax8qms2.dll|DigitalData.Modules.Windream.dll01536Interop.WINDREAMLib.dllMiscLibs-laykutc.dll|Interop.WINDREAMLib.dll01536NLog.dllMiscLibsNLog.dll01536protobufnet.dllMiscLibspaioacj8.dll|protobuf-net.dll01536
AppIcon.exeWIDigConsoleApp.exe
NOT WIX_DOWNGRADE_DETECTEDEine neuere Version von [ProductName] ist bereits installiert. Das Setup wird beendet.
10WIDigConsoleApp#WIDigConsoleApp.cab
ALLUSERS1DiskPromptWIDigConsoleApp InstallPREVIOUSVERSIONSINSTALLEDARPPRODUCTICONAppIconWIXUI_INSTALLDIRINSTALLDIR_BrowsePropertyINSTALLDIR
reg458575F6EC95912A09BE56F605537B2E1Software\[Manufacturer]\[ProductName]installed#1ApplicationShortcut_StartMenureg24CD571387623DE04253DF5804E68BA91Software\[Manufacturer]\[ProductName]installed#1ApplicationShortcut_DesktopregEBE0EF17DD558B5B89C0C92D0DB4A62F2SOFTWARE\[Manufacturer]\[ProductName]Path[INSTALLDIR]RegistryKeysREGKEYINSTALLDIR2SOFTWARE\[Manufacturer]\[ProductName]*RegistryKeys
ApplicationProgramsFolder_StartMenuApplicationShortcut_StartMenuApplicationProgramsFolder2ApplicationProgramsFolder_DesktopApplicationShortcut_DesktopDesktopFolder2
ApplicationStartMenuShortcut_StartMenuApplicationProgramsFolderwri5nge6|Windream Indexer von Digital DataApplicationShortcut_StartMenu[INSTALLDIR]WIDIG.exeINSTALLDIRApplicationStartMenuShortcut_DesktopDesktopFolder9uaft63f|Windream Indexer von Digital DataApplicationShortcut_Desktop[INSTALLDIR]WIDIG.exeINSTALLDIRDesktopShortcutDesktopFoldernaafay8j|Windream Indexer von Digital DataMainApplicationExe{00000000-0000-0000-0000-000000000000}AppIcon.exe0INSTALLDIRStartMenuShortcutProgramMenuFoldergn4b36ij|Windream Indexer von Digital DataMainApplicationExe{00000000-0000-0000-0000-000000000000}AppIcon.exe0INSTALLDIR
{B5F2B6F9-C768-49F9-8440-06579AF5203E}1.2.0.0513WIX_UPGRADE_DETECTED{B5F2B6F9-C768-49F9-8440-06579AF5203E}1.2.0.02WIX_DOWNGRADE_DETECTED{B5F2B6F9-C768-49F9-8440-06579AF5203E}1.0.0.099.0.0.0256PREVIOUSVERSIONSINSTALLED
InstallExecuteSequenceRemoveExistingProductsInstallValidate0
MainApplication1MainApplicationExe10MainApplication1RegistryKeys10MainApplication1DevExpressLibs10MainApplication1DigitalDataLibs10MainApplication1MiscLibs10*5MainApplication20DesktopShortcut1ApplicationShortcut_Desktop10*5DesktopShortcut20StartmenuShortcut1ApplicationShortcut_StartMenu10*5StartmenuShortcut20
RemoveFile
MainApplicationExeINSTALLDIR1WIDIG.exe-100MainApplicationExeConfigINSTALLDIR1WIDIG.exe.config-110ConsoleApplicationExeINSTALLDIR1WIDigConsoleApp.exe-110ConsoleApplicationExeConfigINSTALLDIR1WIDigConsoleApp.exe.config-110DevExpress.Data.v19.2.dllINSTALLDIR1DevExpress.Data.v19.2.dll-110DevExpress.Pdf.v19.2.Core.dllINSTALLDIR1DevExpress.Pdf.v19.2.Core.dll-110DevExpress.Printing.v19.2.Core.dllINSTALLDIR1DevExpress.Printing.v19.2.Core.dll-110DevExpress.Sparkline.v19.2.Core.dllINSTALLDIR1DevExpress.Sparkline.v19.2.Core.dll-110DevExpress.Utils.v19.2.dllINSTALLDIR1DevExpress.Utils.v19.2.dll-110DevExpress.XtraBars.v19.2.dllINSTALLDIR1DevExpress.XtraBars.v19.2.dll-110DevExpress.XtraEditors.v19.2.dllINSTALLDIR1DevExpress.XtraEditors.v19.2.dll-110DigitalData.Modules.Config.dllINSTALLDIR1DigitalData.Modules.Config.dll-110DigitalData.Modules.Filesystem.dllINSTALLDIR1DigitalData.Modules.Filesystem.dll-110DigitalData.Modules.Language.dllINSTALLDIR1DigitalData.Modules.Language.dll-110DigitalData.Modules.Logging.dllINSTALLDIR1DigitalData.Modules.Logging.dll-110DigitalData.Modules.Windream.dllINSTALLDIR1DigitalData.Modules.Windream.dll-110Interop.WINDREAMLib.dllINSTALLDIR1Interop.WINDREAMLib.dll-110NLog.dllINSTALLDIR1NLog.dll-100protobufnet.dllINSTALLDIR1protobuf-net.dll-110
MainApplicationFeatureMainApplicationExeComponentMainApplicationFeatureRegistryKeysComponentMainApplicationFeatureDevExpressLibsComponentMainApplicationFeatureDigitalDataLibsComponentMainApplicationFeatureMiscLibsComponent*ProductMainApplicationFeatureDesktopShortcutFeatureApplicationShortcut_DesktopComponent*ProductDesktopShortcutFeatureStartmenuShortcutFeatureApplicationShortcut_StartMenuComponent*ProductStartmenuShortcutFeature
PREVIOUSVERSIONSINSTALLED4
RemoveApplicationFolderRegistryKeysAPPLICATIONFOLDER2
PropertyManufacturerPropertyProductCodePropertyProductLanguagePropertyProductNamePropertyProductVersionPropertyUpgradeCodePropertyDiskPromptWixActionInstallExecuteSequence/RemoveExistingProductsDirectoryApplicationProgramsFolderDirectoryDesktopFolderDirectoryINSTALLDIRDirectoryDesktopFolderIconAppIcon.exeDirectoryProgramMenuFolderIconAppIcon.exeMedia1Media1Media1Media1Media1Media1Media1Media1Media1Media1Media1Media1Media1Media1Media1Media1Media1Media1Media1CustomActionWixRemoveFoldersExComponentMainApplicationExeComponentRegistryKeysComponentDevExpressLibsComponentDigitalDataLibsComponentMiscLibsComponentApplicationShortcut_DesktopComponentApplicationShortcut_StartMenuWixUIWixUI_FeatureTreeWixUIWixUI_ErrorProgressTextDialogWelcomeDlgDialogInstallDirDlgDialogInstallDirDlgDialogWelcomeDlgDialogInstallDirDlgDialogFeaturesDlgDialogInstallDirDlgDialogBrowseDlgDialogFeaturesDlgDialogInstallDirDlg
ManufacturerDigital Data
ProductCode*
ProductLanguage1031
ProductNameWindream Indexer von Digital Data
ProductVersion1.2.0.0
UpgradeCode{B5F2B6F9-C768-49F9-8440-06579AF5203E}
\ No newline at end of file diff --git a/SetupWIXVS19/obj/Debug/SetupWIXVS19.wixproj.BindBuiltOutputsFileListde-DE.txt b/SetupWIXVS19/obj/Debug/SetupWIXVS19.wixproj.BindBuiltOutputsFileListde-DE.txt new file mode 100644 index 0000000..2a7e663 --- /dev/null +++ b/SetupWIXVS19/obj/Debug/SetupWIXVS19.wixproj.BindBuiltOutputsFileListde-DE.txt @@ -0,0 +1,2 @@ +E:\SchreiberM\Visual Studio\GIT\WIDIG\SetupWIXVS19\bin\Debug\WIDigConsoleApp-x86-1.2.0.0.msi +E:\SchreiberM\Visual Studio\GIT\WIDIG\SetupWIXVS19\bin\Debug\WIDigConsoleApp-x86-1.2.0.0.wixpdb diff --git a/SetupWIXVS19/obj/Debug/SetupWIXVS19.wixproj.BindContentsFileListde-DE.txt b/SetupWIXVS19/obj/Debug/SetupWIXVS19.wixproj.BindContentsFileListde-DE.txt new file mode 100644 index 0000000..86ed874 --- /dev/null +++ b/SetupWIXVS19/obj/Debug/SetupWIXVS19.wixproj.BindContentsFileListde-DE.txt @@ -0,0 +1,19 @@ +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\WIDigConsoleApp.exe +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\WIDigConsoleApp.exe.config +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\DevExpress.Data.v19.2.dll +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\DevExpress.Pdf.v19.2.Core.dll +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\DevExpress.Printing.v19.2.Core.dll +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\DevExpress.Sparkline.v19.2.Core.dll +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\DevExpress.Utils.v19.2.dll +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\DevExpress.XtraBars.v19.2.dll +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\DevExpress.XtraEditors.v19.2.dll +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\DigitalData.Modules.Config.dll +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\DigitalData.Modules.Filesystem.dll +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\DigitalData.Modules.Language.dll +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\DigitalData.Modules.Logging.dll +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\DigitalData.Modules.Windream.dll +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\Interop.WINDREAMLib.dll +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\WIDIG.exe +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigForm\bin\Debug\WIDIG.exe.config +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\NLog.dll +E:\SchreiberM\Visual Studio\GIT\WIDIG\WIDigConsoleApp\bin\Debug\protobuf-net.dll diff --git a/SetupWIXVS19/obj/Debug/SetupWIXVS19.wixproj.BindOutputsFileListde-DE.txt b/SetupWIXVS19/obj/Debug/SetupWIXVS19.wixproj.BindOutputsFileListde-DE.txt new file mode 100644 index 0000000..2a7e663 --- /dev/null +++ b/SetupWIXVS19/obj/Debug/SetupWIXVS19.wixproj.BindOutputsFileListde-DE.txt @@ -0,0 +1,2 @@ +E:\SchreiberM\Visual Studio\GIT\WIDIG\SetupWIXVS19\bin\Debug\WIDigConsoleApp-x86-1.2.0.0.msi +E:\SchreiberM\Visual Studio\GIT\WIDIG\SetupWIXVS19\bin\Debug\WIDigConsoleApp-x86-1.2.0.0.wixpdb diff --git a/SetupWIXVS19/obj/Debug/SetupWIXVS19.wixproj.FileList.txt b/SetupWIXVS19/obj/Debug/SetupWIXVS19.wixproj.FileList.txt new file mode 100644 index 0000000..9474a48 --- /dev/null +++ b/SetupWIXVS19/obj/Debug/SetupWIXVS19.wixproj.FileList.txt @@ -0,0 +1,6 @@ +E:\SchreiberM\Visual Studio\GIT\WIDIG\SetupWIXVS19\bin\Debug\WIDigConsoleApp-x86-1.2.0.0.msi +E:\SchreiberM\Visual Studio\GIT\WIDIG\SetupWIXVS19\bin\Debug\WIDigConsoleApp-x86-1.2.0.0.wixpdb +obj\Debug\Product.wixobj +obj\Debug\SetupWIXVS19.wixproj.BindContentsFileListde-DE.txt +obj\Debug\SetupWIXVS19.wixproj.BindOutputsFileListde-DE.txt +obj\Debug\SetupWIXVS19.wixproj.BindBuiltOutputsFileListde-DE.txt diff --git a/WIDigConsoleApp.sln b/WIDigConsoleApp.sln index a69d529..c4a3c55 100644 --- a/WIDigConsoleApp.sln +++ b/WIDigConsoleApp.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27703.2018 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31005.135 MinimumVisualStudioVersion = 10.0.40219.1 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WIDigConsoleApp", "WIDigConsoleApp\WIDigConsoleApp.vbproj", "{B146A4E7-FD28-4F57-9BE0-C4178A258623}" EndProject @@ -9,6 +9,8 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WIDigForm", "WIDigForm\WIDi EndProject Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SetupWIX", "SetupWIX\SetupWIX.wixproj", "{3943E21A-DD2B-4C74-B06F-9A39CAA70E11}" EndProject +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SetupWIXVS19", "SetupWIXVS19\SetupWIXVS19.wixproj", "{3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -39,6 +41,12 @@ Global {3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Release|Any CPU.ActiveCfg = Release|x86 {3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Release|x86.ActiveCfg = Release|x86 {3943E21A-DD2B-4C74-B06F-9A39CAA70E11}.Release|x86.Build.0 = Release|x86 + {3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Debug|Any CPU.ActiveCfg = Debug|x86 + {3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Debug|x86.ActiveCfg = Debug|x86 + {3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Debug|x86.Build.0 = Debug|x86 + {3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Release|Any CPU.ActiveCfg = Release|x86 + {3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Release|x86.ActiveCfg = Release|x86 + {3C1B87F6-CDE9-49AF-81BB-F697D8BC7D0E}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/WIDigConsoleApp/App.config b/WIDigConsoleApp/App.config index 731f6de..21747b0 100644 --- a/WIDigConsoleApp/App.config +++ b/WIDigConsoleApp/App.config @@ -1,5 +1,12 @@  + + + + + diff --git a/WIDigConsoleApp/Module1.vb b/WIDigConsoleApp/Module1.vb index 1e6b1eb..0a662ec 100644 --- a/WIDigConsoleApp/Module1.vb +++ b/WIDigConsoleApp/Module1.vb @@ -3,15 +3,18 @@ Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Windream Imports DigitalData.Modules.Config Imports System.IO +Imports System.Text.RegularExpressions +Imports DigitalData.Modules.Database + Module Module1 Private _ArgumentLength As Integer + Public _database As MSSQLServer + Public oRegExArg As String Public Function Main(args As String()) As Integer Try ' Console.WriteLine("Starting up WIDig...") Dim opath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) - Dim oLogConfig As New LogConfig(LogConfig.PathType.CustomPath, - opath & "\Digital Data\WIDigDat\Log", - Nothing, + Dim oLogConfig As New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing, "Digital Data", "WIDigCons") @@ -26,27 +29,36 @@ Module Module1 System.Console.WriteLine($"Starting up WIDig...") If Connect2Windream(oUserPW) = True Then System.Console.WriteLine($"Windream initialized!") - Dim oArguments As String() = Environment.GetCommandLineArgs() - If ParseArgs(args) = True Then - System.Console.WriteLine($"Parsed all arguments!") - If StreamIndexFile() = True Then - oErrorImport = False + If InitDatabase() = True Then + Load_DB_DAta() + 'Dim oArguments As String() = Environment.GetCommandLineArgs() + If ParseArgs(args) = True Then + System.Console.WriteLine($"Parsed all arguments!") + If StreamIndexFile() = True Then + oErrorImport = False + Else + System.Console.WriteLine($"###Error in StreamIndexFile!####") + oErrorImport = True + End If Else - System.Console.WriteLine($"###Error in StreamIndexFile!####") - oErrorImport = True + System.Console.WriteLine($"###Error in ParseArgs!####") + System.Console.WriteLine($"### Error in ParseArgs ####") + System.Console.WriteLine(oErrorMessage) + System.Console.WriteLine("### For more information check the log! Press any key to exit! ####") + System.Console.WriteLine($"####################") + Console.ReadKey() End If + + Else - System.Console.WriteLine($"###Error in ParseArgs!####") - System.Console.WriteLine($"### Error in ParseArgs ####") - System.Console.WriteLine(oErrorMessage) - System.Console.WriteLine("### For more information check the log! Press any key to exit! ####") - System.Console.WriteLine($"####################") - Console.ReadKey() + oErrorMessage = "Could not initialize DB" End If + Else oErrorMessage = "Could not initialize windream" End If + If oErrorParse = True Or oErrorImport = True Then System.Console.WriteLine(oErrorMessage) System.Console.WriteLine("### For more information check the log! Press any key to exit! ####") @@ -69,10 +81,39 @@ Module Module1 CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, oUserAppDataPath, System.AppDomain.CurrentDomain.BaseDirectory, oCommonAppDataPath) System.Console.WriteLine($"Config loaded!") LOGGER.Info("Config loaded") - - 'Settings_Load() End Sub + Public Function InitDatabase() As Boolean + If My.Settings.MyECM_ConnectionString = String.Empty Then + Return False + End If + + Try + _database = New MSSQLServer(LOGCONFIG, My.Settings.MyECM_ConnectionString) + If _database.DBInitialized = True Then + Return True + Else + Return False + End If + + Catch ex As Exception + LOGGER.Error(ex) + Return False + End Try + End Function + + Public Function Load_DB_DAta() + Try + Dim oSql = "SELECT [REGEX] FROM [TBDD_FUNCTION_REGEX] WHERE FUNCTION_NAME = 'WM-INDEXER-INDEX_GROUP'" + oRegExArg = _database.GetScalarValue(oSql, 120) + If oRegExArg.Length = 0 Then + oRegExArg = 0 + End If + Catch ex As Exception + LOGGER.Error(ex) + Return False + End Try + End Function Private Function Connect2Windream(oPW As String) Try WINDREAM = New Windream(LOGCONFIG, False, CONFIG.Config.WMDrive, CONFIG.Config.WMRelPath, True, CONFIG.Config.WMServer, CONFIG.Config.WMUsername, oPW, CONFIG.Config.Domain) @@ -104,6 +145,8 @@ Module Module1 End Try End Function Public Function ParseArgs(pArguments As String(), Optional pTest As Boolean = False) + Dim oINDEXInfoStarted As Boolean = False + Dim oINDEXInfotemp As String = "" Try If pArguments.Length <= 3 Then _ArgumentLength = pArguments.Length @@ -166,16 +209,22 @@ Module Module1 WMIndices = WINDREAM.GetIndiciesByObjecttype(oWMObjecttype) End If ElseIf oArg.StartsWith("-index@") Then - Dim oINDEXInfotemp = oArg - oINDEXInfotemp = oINDEXInfotemp.Replace("-index@{", "") - oINDEXInfotemp = oINDEXInfotemp.Replace("}", "") - Dim oSplit() = oINDEXInfotemp.ToString.Split(";") - LOGGER.Debug($" [{oSplit.Length}] Indices transmitted...") - oIndexArr = oSplit + oINDEXInfotemp = oArg + oINDEXInfoStarted = True + oINDEXInfotemp = oINDEXInfotemp.Replace("-index@", "") + Else + If oINDEXInfoStarted Then + oINDEXInfotemp &= " " & oArg + End If End If ocount += 1 Next + + Dim oIndexparts As String() = oINDEXInfotemp.Split(New String() {"#~#"}, StringSplitOptions.RemoveEmptyEntries) + + LOGGER.Info($" [{oIndexparts.Length}] Indices transmitted...") + oIndexArr = oIndexparts Return True Catch ex As Exception LOGGER.Warn("Error in ParseArgs:" & vbNewLine & ex.Message) @@ -205,28 +254,45 @@ Module Module1 If oResult = True Then LOGGER.Info($"File successfully streamed to windream [{oTargetPath}]! Now indexing...") For Each oIndex2 As String In oIndexArr - Dim oIndexInfo() = oIndex2.Split("=") + Dim oIndexInfo() = oIndex2.Split("={") Dim oIndexName = oIndexInfo(0) - Dim oIndexvalue = oIndexInfo(1) - If WMIndex_exists(oIndexName) = True Then - LOGGER.Info($"Setting Index: oIndexName [{oIndexName}] - oIndexvalue [{oIndexvalue}]") - If WINDREAM.SetFileIndex(oTargetPath, oIndexName, oIndexvalue, oWMObjecttype) = False Then - LOGGER.Info($"Index could not be set...") - If WINDREAM.RemoveFile(oTargetPath) = True Then - LOGGER.Info($"File deleted after error!") - End If - oResult = False - Exit For - End If - Else - LOGGER.Warn($"Transmitted index with name [{oIndexName}] is not existing in WM Objecttype!") - If WINDREAM.RemoveFile(oTargetPath) = True Then - LOGGER.Info($"File deleted after error!") - End If - oResult = False - Exit For - End If + Dim oIndexvalue + Dim r As Regex = New Regex(oRegExArg, RegexOptions.IgnoreCase) + ' ' Match the regular expression pattern against a text string. + Dim m As Match = r.Match(oIndex2) + Do While m.Success + ' oClearedBodyText = oClearedBodyText.Replace(m.Value, "") + 'Dim g As Group = m.Groups(1) + Dim g1 As Group = m.Groups(2) + Dim g2 As Group = m.Groups(3) + + If Not IsNothing(g2.Value) Then + oIndexvalue = g2.Value + Console.WriteLine($"Indexvalue: {oIndexvalue}") + End If + If Len(oIndexvalue) > 0 Then + If WMIndex_exists(oIndexName) = True Then + LOGGER.Info($"Setting Index: oIndexName [{oIndexName}] - oIndexvalue [{oIndexvalue}]") + If WINDREAM.SetFileIndex(oTargetPath, oIndexName, oIndexvalue, oWMObjecttype) = False Then + LOGGER.Info($"Index could not be set...") + If WINDREAM.RemoveFile(oTargetPath) = True Then + LOGGER.Info($"File deleted after error!") + End If + oResult = False + Exit For + End If + Else + LOGGER.Warn($"Transmitted index with name [{oIndexName}] is not existing in WM Objecttype!") + If WINDREAM.RemoveFile(oTargetPath) = True Then + LOGGER.Info($"File deleted after error!") + End If + oResult = False + Exit For + End If + End If + m = m.NextMatch() + Loop Next If oResult = True Then LOGGER.Info("Import finished!") diff --git a/WIDigConsoleApp/My Project/AssemblyInfo.vb b/WIDigConsoleApp/My Project/AssemblyInfo.vb index f36a18c..40c4022 100644 --- a/WIDigConsoleApp/My Project/AssemblyInfo.vb +++ b/WIDigConsoleApp/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - + diff --git a/WIDigConsoleApp/My Project/Settings.Designer.vb b/WIDigConsoleApp/My Project/Settings.Designer.vb index 5c9ae43..6f82198 100644 --- a/WIDigConsoleApp/My Project/Settings.Designer.vb +++ b/WIDigConsoleApp/My Project/Settings.Designer.vb @@ -1,10 +1,10 @@ '------------------------------------------------------------------------------ ' -' This code was generated by a tool. -' Runtime Version:4.0.30319.42000 +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 ' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. ' '------------------------------------------------------------------------------ @@ -13,57 +13,68 @@ Option Explicit On Namespace My - - _ + + _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) - -#Region "My.Settings Auto-Save Functionality" + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "Automatische My.Settings-Speicherfunktion" #If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean + Private Shared addedHandler As Boolean - Private Shared addedHandlerLockObject As New Object + Private Shared addedHandlerLockObject As New Object - _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) - If My.Application.SaveMySettingsOnExit Then - My.Settings.Save() - End If - End Sub + _ + Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub #End If #End Region - + Public Shared ReadOnly Property [Default]() As MySettings Get - + #If _MyType = "WindowsForms" Then - If Not addedHandler Then - SyncLock addedHandlerLockObject - If Not addedHandler Then - AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings - addedHandler = True - End If - End SyncLock - End If + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If #End If Return defaultInstance End Get End Property + + _ + Public ReadOnly Property MyECM_ConnectionString() As String + Get + Return CType(Me("MyECM_ConnectionString"),String) + End Get + End Property End Class End Namespace Namespace My - - _ + + _ Friend Module MySettingsProperty - - _ + + _ Friend ReadOnly Property Settings() As Global.WIDigConsoleApp.My.MySettings Get Return Global.WIDigConsoleApp.My.MySettings.Default diff --git a/WIDigConsoleApp/My Project/Settings.settings b/WIDigConsoleApp/My Project/Settings.settings index 85b890b..4fab905 100644 --- a/WIDigConsoleApp/My Project/Settings.settings +++ b/WIDigConsoleApp/My Project/Settings.settings @@ -1,7 +1,14 @@  - - - - - - + + + + + <?xml version="1.0" encoding="utf-16"?> +<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <ConnectionString>Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;User ID=sa;Password=dd</ConnectionString> + <ProviderName>System.Data.SqlClient</ProviderName> +</SerializableConnectionString> + Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;User ID=sa;Password=dd + + + \ No newline at end of file diff --git a/WIDigConsoleApp/WIDigConsoleApp.vbproj b/WIDigConsoleApp/WIDigConsoleApp.vbproj index 71e5dd4..c23fb27 100644 --- a/WIDigConsoleApp/WIDigConsoleApp.vbproj +++ b/WIDigConsoleApp/WIDigConsoleApp.vbproj @@ -50,10 +50,15 @@ ..\..\DDMonorepo\Modules.Config\bin\Debug\DigitalData.Modules.Config.dll - - ..\..\DDMonorepo\Modules.Windream\bin\Debug\DigitalData.Modules.Logging.dll + + ..\..\DDMonorepo\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll - + + False + ..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll + + + False ..\..\DDMonorepo\Modules.Windream\bin\Debug\DigitalData.Modules.Windream.dll diff --git a/WIDigConsoleApp/WIDigConsoleApp.vbproj.user b/WIDigConsoleApp/WIDigConsoleApp.vbproj.user index 822495c..c77ea60 100644 --- a/WIDigConsoleApp/WIDigConsoleApp.vbproj.user +++ b/WIDigConsoleApp/WIDigConsoleApp.vbproj.user @@ -1,6 +1,6 @@  - -Mode%40IMPV -Source%40E:\TEMP\TEST.pdf -Target%40"W:\ImportWIDIG\Testfile.pdf" -WMOT%40"DIGITAL DATA - Entwicklung" -index%40{"Integer 23"=4711%3b"String 38"=WeDigNoWIDig%3b"Boolean 04"=false} + -Mode%40IMPV -Source%40E:\TEMP\TEST.pdf -Target%40"W:\ImportWIDIG\Testfile.pdf" -WMOT%40"DIGITAL DATA - Entwicklung" -index%40Integer 24={0815}#~#Vektor_Text1={ValueX~#~ValueY} \ No newline at end of file diff --git a/WIDigConsoleApp/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/WIDigConsoleApp/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 13a96bd..c67e2ee 100644 Binary files a/WIDigConsoleApp/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/WIDigConsoleApp/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/WIDigConsoleApp/obj/Debug/TempPE/My Project.Resources.Designer.vb.dll b/WIDigConsoleApp/obj/Debug/TempPE/My Project.Resources.Designer.vb.dll index 21f3184..68deb7f 100644 Binary files a/WIDigConsoleApp/obj/Debug/TempPE/My Project.Resources.Designer.vb.dll and b/WIDigConsoleApp/obj/Debug/TempPE/My Project.Resources.Designer.vb.dll differ diff --git a/WIDigForm/My Project/AssemblyInfo.vb b/WIDigForm/My Project/AssemblyInfo.vb index 6e92b91..50faf5f 100644 --- a/WIDigForm/My Project/AssemblyInfo.vb +++ b/WIDigForm/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' indem Sie "*" wie unten gezeigt eingeben: ' - + diff --git a/WIDigForm/frmMain.Designer.vb b/WIDigForm/frmMain.Designer.vb index 2a6ac9c..78bc01a 100644 --- a/WIDigForm/frmMain.Designer.vb +++ b/WIDigForm/frmMain.Designer.vb @@ -359,10 +359,9 @@ Partial Class frmMain Me.TextBox1.Size = New System.Drawing.Size(292, 220) Me.TextBox1.TabIndex = 0 Me.TextBox1.Text = "-Mode@IMPV -Source@E:\Importfiles\Test.pdf -Target@""W:\Import\Testfile.pdf"" -WMOT" & - "@""IhrObjekttyp"" -index@{""Integer 23""=4711;""String 38""=""Text mit Freizeichen"";""Bo" & - "olean 04""=false}" + "@""IhrObjekttyp"" -index@Integer 24={0815}#~#Vektor_Text1={ValueX~#~ValueY}" ' - 'Form1 + 'frmMain ' Me.Appearance.Options.UseFont = True Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -374,7 +373,7 @@ Partial Class frmMain Me.Controls.Add(Me.GroupBox1) Me.Controls.Add(Me.RibbonControl1) Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.Name = "Form1" + Me.Name = "frmMain" Me.Ribbon = Me.RibbonControl1 Me.StatusBar = Me.RibbonStatusBar1 Me.Text = "WindreamImporter Digital Data (WiDig)" diff --git a/WIDigForm/frmMain.resx b/WIDigForm/frmMain.resx index deb36c5..96e255d 100644 --- a/WIDigForm/frmMain.resx +++ b/WIDigForm/frmMain.resx @@ -260,7 +260,7 @@ Zielpfad inklusive Dateiname und Extension -WMOT: Windream Objekttyp -index -Indexierungslogik +Indexierungsabfolge \ No newline at end of file