Unable to open 1, using A common way,
2, must use the B to open A program, such as using the statement
ShellExecute (handle, the 'open', 'c: \ a.e xe - PASS' , '-s',' ', SW_SHOWNORMAL);
Have agreed with similar parameters to open,
Could you tell me how to write ah, should I still had 25 points and contribution! O code
CodePudding user response:
A project file, add theThe begin
If ParamStr (1) & lt;> 'PASS' then ExitProcess (0);
When call
ShellExecute (handle, the 'open', 'c: \ a.e xe PASS', ', ' ', SW_SHOWNORMAL);
Can be
CodePudding user response:
The original poster is hidden from the user operation parameters reach the purpose of don't allow the user to run the program running,The building seems to have two parameters, a - pass - s, write A program plus checker when creating or initialization parameter
If (UpCase (ParamStr (1) & lt;> '- PASS')) and (UpCase (ParamStr (2) & lt;> '-s')) then ExitProcess (0);
This runtime respectively take - not pass is the program and the -s parameter refused to run,
In procedure call event B plus
ShellExecute (handle, the 'open', 'c: \ a.e xe - PASS', '-s',' ', SW_SHOWNORMAL);
Actually you can literally define A procedure parameters, as long as the wrong user open these parameters, the user will not be able to run it, only through your program to run it,
CodePudding user response:
Still use FindCmdLineSwitch, ha ha,CodePudding user response:
A few days ago just use this, pay attention to, with 2 or 3 floor saidCodePudding user response: