Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I pass Arguments to a C++ program started by the Registry?

I'm creating a Win32 program that will be executed every time the computer turns on. I manage to do this by adding the .exe path into the registry. The problem is; I want to make the program appear minimized in the system tray when the computer is turned on but if I double click it [after the computer turns on and the program is not currently running] the program should appear on its normal [maximized] size.

Question, I was thinking on whether is was possible to pass an argument to the program when the program is executed from the registry. Is this possible? If yes/no, how would I manage to do this?

(Using windows XP) Thanks.

like image 439
Y_Y Avatar asked Nov 25 '25 21:11

Y_Y


1 Answers

Yes, if your using HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run you can simply quote the path & add a command line:

Your App = "c:\xxxx\yourapp.exe" /mycommand
like image 85
Alex K. Avatar answered Nov 28 '25 12:11

Alex K.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!