Hi,
I have some code which copies 2 files to a folder. These 2 files are included in the current application folder. Is it possible to embed these 2 files into the .exe and copy them to a destination folder? Heres my code so far:
[VB]Dim CurrentLocationDll As String = Application.StartupPath & "\FILE.dll"
Dim DestinationFolder As String = System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) & "\FOLDER"
If (FileIO.FileSystem.FileExists(CurrentLocationDll)) Then
ProgressBar1.PerformStep()
If (FileIO.FileSystem.FileExists(DestinationFolder & "\FILE.dll")) Then
FileIO.FileSystem.MoveFile(DestinationFolder & "\FILE.dll", DestinationFolder & "\FILE.dll.bak")
ProgressBar1.PerformStep()
End If
FileIO.FileSystem.CopyFile(CurrentLocationDll, DestinationFolder & "\FILE.dll")
ProgressBar1.PerformStep()
End If[/VB]
I have some code which copies 2 files to a folder. These 2 files are included in the current application folder. Is it possible to embed these 2 files into the .exe and copy them to a destination folder? Heres my code so far:
[VB]Dim CurrentLocationDll As String = Application.StartupPath & "\FILE.dll"
Dim DestinationFolder As String = System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) & "\FOLDER"
If (FileIO.FileSystem.FileExists(CurrentLocationDll)) Then
ProgressBar1.PerformStep()
If (FileIO.FileSystem.FileExists(DestinationFolder & "\FILE.dll")) Then
FileIO.FileSystem.MoveFile(DestinationFolder & "\FILE.dll", DestinationFolder & "\FILE.dll.bak")
ProgressBar1.PerformStep()
End If
FileIO.FileSystem.CopyFile(CurrentLocationDll, DestinationFolder & "\FILE.dll")
ProgressBar1.PerformStep()
End If[/VB]