Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure RunApp(Path: string);
- var
- p1, p2: array[0..100] of Char;
- w1: cardinal;
- begin
- ChDir(ExtractFilePath(Path));
- StrPcopy(p1, ExtractFilePath(Path));
- if GetModuleHandle(p1) = 0 then
- begin
- StrPcopy(p2, Path);
- w1 := WinExec(p2, SW_Restore);
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement