Well the idea is that the app will be running from its default install directory. Then, it checks if there is a copy of the same application in the dir of the app which uses the datbase.
If the app isnt there, then we should copy it over and run it from there. Else If the app is already there, just run it anyway.
This is the proper code ;
Code:Private Sub Form_Load() Set fs = CreateObject("Scripting.FileSystemObject") If (Dir("c:\DirectoryThatApp2IsIn\app1.exe") = "") Then fs.CopyFile App.Path & "\app1.exe", "c:\DirectoryThatApp2IsIn\" End End If Shell "c:\DirectoryThatApp2IsIn\app1.exe" End Sub




Reply With Quote