Someone who knows AHK can probably do this better, but here's a start...
FileSelectFile, programname
Gui, Add, Text, x22 y22 w80 h20 , Program to run:
Gui, Add, Text, x112 y22 w320 h20 , %programname%
Gui, Add, Text, x22 y62 w190 h20 , Command line parameters:
Gui, Add, Edit, x22 y82 w410 h20 vCommandlp,
Gui, Add, Button, x22 y122 w100 h20 , OK
Gui, Add, Button, x142 y122 w90 h20 , Cancel
; Generated using SmartGUI Creator 4.0
Gui, Show, h166 w440, RunOnce Control
Return
ButtonOK:
Gui, submit
RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\Currentversion\RunOnce, %programname%, %programname% %commandlp%
ButtonCancel:
GuiClose:
ExitApp
This new version will allow you to add command line parameters if you want after selecting the program to run.
Carl