1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Public Function LoadDatabase(ByVal _FileIN As String) As Boolean
'identifier var objet Path
Dim PathIN As String = String.Concat(Path.str_PCM_CUSTOMDB_DIRECTORY, _FileIN, ".cdb") 'build source file
Dim PathOUT As String = String.Concat(Path.str_EXPORT_DIRECTORY, _FileIN, "\export.xml") 'build dest file
Dim parametres As String = String.Format(" -input {0} -output {1} -ToXML", PathIN, PathOUT) 'build command line
Try
Dim infos As ProcessStartInfo = New ProcessStartInfo(Path.str_EXPORTER_FILE)
infos.Arguments = parametres
infos.WindowStyle = ProcessWindowStyle.Hidden 'Hide process for silent use
Dim proc As Process = Process.Start(infos)
Catch ex As Exception
'identifier var sub "tools"
tools.msgbox("Error during export")
End Try
'identifier var sub "proc"
While (Not proc.HasExited)
End While
Return True
End Function |
Partager