Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › [Help] Parameter Args[Solved]

[Help] Parameter Args[Solved]

Posts 1–15 of 17 · Page 1 of 2
nathanael890
nathanael890
[Help] Parameter Args[Solved]
How can I add parameters at my program to do a command?

let's say
Parameter : -opendialog
Command : Dialog1 will be shown

If I'll open my program with the parameter "-opendialog" the Dialog1 will pop-up..
#1 · 16y ago
flameswor10
flameswor10
Code:
Dim -OpenDialog as New OpenFileDialog
Wait.. That wasn't what you asked for was it
#2 · 16y ago
Lolland
Lolland
That is not at all what he asked for.
#3 · 16y ago
flameswor10
flameswor10
I don't like parameters. Sorry >_>
#4 · 16y ago
Hassan
Hassan
Simple, add this to your form's load event:


[php]For Each Argument As String In My.Application.CommandLineArgs
'Do whatever you want with your parameter.
Msgbox (Argument)
'If you have more than one parameter, then let the loop continue and check each parameter using if statement, else exit the loop.
Exit For
Next[/php]

Also have a look at the tutorial I wrote on File association and parameters:
Associate Self-Defined File Extensions To Your App

Hope this helps !!
#5 · edited 16y ago · 16y ago
Blubb1337
Blubb1337
Hassan is right.

I added my file sorter to the windows rightclick menu. When you now rightclick on a folder and hit 'File Sorter' the file sorter starts and directly searches threw the folder.





[php]Private Sub checkarguments()

Dim count As Integer
Dim x() As String = Environment.GetCommandLineArgs 'get arguments

'count all pathes
For Each s As String In x
count += 1
Next

If count > 1 Then 'not your own path
Dim path As String = x(count - 1) 'starts at index 0
Dim search As New Thread(AddressOf sid) 'call new multithread
search.Priority = ThreadPriority.Highest 'set multithreads priority
search.Start(path) 'go ahead and search threw the folder
End If

End Sub[/php]

Just call it on form_load.

Ya, there are shorter methods...but meh ^.-
#6 · edited 16y ago · 16y ago
nathanael890
nathanael890
Can you guys show me an example?

I didn't know where to put the argument and its command..

I'm still a beginner in making VB programs..
#7 · 16y ago
Blubb1337
Blubb1337
What exactly are you planing 2 do?

Do you want to start your program with a certain argument(with vb) or do you just want to add a parameter?

Explain.
#8 · 16y ago
nathanael890
nathanael890
I want to add certain parameter for my program..

just like an extractor which is like this : "C:\Users\Nathanael789\Extract.exe" -extract2

I'm creating a program with a password..

If the program will be start normally. there will be a prompt password..
but if I'll start the program with the paramter, there will be no passowrd..
#9 · 16y ago
Blubb1337
Blubb1337
To add an argument, create a shortcut of your application.

R1ghtcl1ck on it, hit properties.



To extract the arguments, see above, we have posted two codes already.

Loop threw the arguments, if one of them = "Your special argument" -> don't do anything else force password...
#10 · 16y ago
nathanael890
nathanael890
That is not what I meant.. I already know that..

here is supposed to be my parameter :
"C:\Users\Nathanael789\Desktop\Starter.exe" <filename>

My program will pop-up first before the program will be executed..

File.exe : as the pop-up program
<filename> : as the process will be started

Then I'll make a shortcut like that with the parameter of the file to be executed..
so my program will pop-up...
#11 · 16y ago
Blubb1337
Blubb1337
So what is your problem now?
#12 · 16y ago
nathanael890
nathanael890
My problem is how to get the argument of my program without the added text?

Argument : -file <filename>

Removing the "-file" in the argument and getting the filename...
so I can start the process with the argument..
#13 · 16y ago
Blubb1337
Blubb1337
Is it always -file?

If so

dim argument as string = "-file whatever"

argument = argument.replace("-file ", "")

result -> whatever

--------------------

You got the code on how to get the arguments. Using these codes and the replace function, I see no problem at all.
#14 · 16y ago
nathanael890
nathanael890
Oh.. I just don't understand the codes that has been given..

Thanks..
#15 · 16y ago
Posts 1–15 of 17 · Page 1 of 2

Post a Reply

Similar Threads

  • Help me to solve this ? :#By josias008 in Combat Arms Help
    9Last post 15y ago
  • [Help]Custom GUI[Solved]By martijno0o0 in Visual Basic Programming
    1Last post 16y ago
  • [Help] Missing Tabs [Solved]By zmansquared in Visual Basic Programming
    18Last post 16y ago
  • [Help]Sleep/Pause[Solved]By jakobkorber in Visual Basic Programming
    11Last post 16y ago
  • [Help]ComboBox Selections[Solved]By ppl2pass in Visual Basic Programming
    5Last post 16y ago

Tags for this Thread

None