I have extracted xml files from navision to a specific folder.
A form based timer runs the SHELL function which calls a .NET console application and gives 2 parameters which are filled in dynamically.
I've got 2 problems with this solution:
1. When the shell executes the console application I see the DOS box. The user may not see this. Is there a possibility to hide this.
2. Because the parameters of the application are dynamically filled in, each time the shell executes it askes if the application can be trusted or not. Also this I want to hide from the user.
I don't know if it is possible to solve these 2 issues but any comments are welcome.
Kind regards,
Geert
0
Comments
In short: You need to store the path and filename to the .exe file in a text constant to avoid the warning...
Peter
You can try calling your console from a batch file and add the following to the batch file....
@ECHO OFF
<<execute your call to the console here>>
cls
So by the way you can either dynamically create your batch file and delete it after you have executed it, or call it with parameters.
Regards,
Gus
Public Function ShellCmd(CmdStr As String) As Integer
ShellCmd = Shell(CmdStr)
End Function
I had the same problem, and the solution for me, was to move the code to a GUI project, and substitute the first line in the Main method with my origional startup line. I see no box, frame or task at the bottom with this hack.