Newbie at VB having some trouble.
I am trying to call an external exe that is very fussy about it being called from within its own directory (due to associated dlls I assume)
Things that dont' work
What does is work is me going into a cmd prompt navigating to f:\rsyncrypto and running
I have run this in debug mode and built an exe and run the exe in F:\rsyncrypto but neither works.
So all I can think of is it that the vb isn't running in the directory and associated dlls aren't being used.
I have also tried moving the exe and files intothe debug folder and running the above without any path info but still no go
Any thoughts?
Regards
John
I am trying to call an external exe that is very fussy about it being called from within its own directory (due to associated dlls I assume)
Things that dont' work
VB.NET:
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] proc [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Process = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Process[/SIZE]
[SIZE=2]proc.StartInfo.FileName = [/SIZE][SIZE=2][COLOR=#800000]"F:\rsyncrypto\rsyncrypto.exe"[/COLOR][/SIZE]
[SIZE=2]proc.StartInfo.Arguments() = [/SIZE][SIZE=2][COLOR=#800000]" c:\text.txt c:\text.enc F:\rsyncrypto\1234.KEY F:\rsyncrypto\BACKUP.CRT"[/COLOR][/SIZE]
[SIZE=2]proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden [/SIZE]
[SIZE=2]proc.Start()[/SIZE]
VB.NET:
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] psInfo [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] System.Diagnostics.ProcessStartInfo([/SIZE][SIZE=2][COLOR=#800000]"F:\rsyncrypto\rsyncrypto.exe"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#800000]" c:\text.txt c:\text.enc F:\rsyncrypto\1234.KEY F:\rsyncrypto\BACKUP.CRT"[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]psInfo.WindowStyle = ProcessWindowStyle.Hidden[/SIZE]
[SIZE=2]System.Diagnostics.Process.Start(psInfo)[/SIZE]
What does is work is me going into a cmd prompt navigating to f:\rsyncrypto and running
VB.NET:
[COLOR=#800000]rsyncrypto.exe c:\text.txt c:\text.enc F:\rsyncrypto\1234.KEY F:\rsyncrypto\BACKUP.CRT[/COLOR]
I have run this in debug mode and built an exe and run the exe in F:\rsyncrypto but neither works.
So all I can think of is it that the vb isn't running in the directory and associated dlls aren't being used.
I have also tried moving the exe and files intothe debug folder and running the above without any path info but still no go
Any thoughts?
Regards
John