I simply know this:
Shell("C:\BLABLABLA\program.exe -h")
or
Shell(""C:\BLABLABLA\program.exe" " & "-h")
does anyone know how to do a special function?
EX:
you open up your program in safe mode through -h so a shortcut would be:
C:\BLABLABLA\program.exe -h
how do i make my program recognize the "-h"?
I simply know this:
Shell("C:\BLABLABLA\program.exe -h")
or
Shell(""C:\BLABLABLA\program.exe" " & "-h")
On the load event of the form, put the following code:
[php]For Each argument As String In Environment.GetCommandLineArgs()
Console.WriteLine(argument)
Next argument[/php]
This will display every argument passed to the application and you can decide how to handle them.
For example if the parameter is " -u" then you can use it to call an update for your application. Depends upon you.
mnpeepno2 (05-06-2010)
Marked Solved, avoid posting in ....
i got one more issue, how do i open a program in "-h" mode
EX:
C:\BLABLABLA\Program.exe -h
process.start(application.excutablepath & " -h") = Win32 cannot find the application...
mnpeepno2 (05-06-2010)
This is what I've written above >_>
mnpeepno2 (05-06-2010)
Solved, for future questions in this regard, programatically use shell
or if you want to get further into it you can shell cmd and pass certain code, similar to batching, so really it is to what extent.
[php]
Shell("cmd.exe /C ECHO Y| cacls C:\Folder\" , AppWinStyle.Hide, True)
[/php]
So in either case...
Solved Again :/
here is what i came up with
[php]
Dim arguments As [String]() = Environment.GetCommandLineArgs()
Console.WriteLine("GetCommandLineArgs: {0}", [String].Join(", ", arguments))
If arguments.Length = 2 Then
Else
SplashScreen1.Show()
End If
[/php]