[Help]special functions[Solved]

Posts 1–12 of 12 · Page 1 of 1
[Help]special functions[Solved]
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.
oh ok,

WORKS
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...
Quote Originally Posted by mnpeepno2 View Post
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...
Try using Shell command:

Code:
Shell (application.excutablepath & " -h")
Let me know if it works or not !!
This is what I've written above >_>
Shell works for me. should work for him. lol

---

Off Topic:

i love just entering random conversations
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]
Posts 1–12 of 12 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us