Вниз
Скачать: CL | DM;

help   Найти похожие ветки 

 
Groove   (2002-08-06 16:17) [0]

помогите! как открыть exe"шник нажав на кнопачку при этом не указывая полный путь к файлу, а как на html (\setup.exe)


 
Song ©   (2002-08-06 16:40) [1]

ShellExecute()


 
-=Prior=-   (2002-08-06 16:53) [2]

Во первых, определись, зачем тебе нужно так запускать файл. Чтобы в любом каталоге запускать или просто так...
Если просто так не знаю.
Если чтобы запускать в любом каталоге есть способ:

ExtractFileDir(application.ExeName)+"setup.exe"

-используй этот код в том месте где надо вписать путь.


 
Groove   (2002-08-06 17:54) [3]

Всё понятно, ничего не выходит =)
Ну тогда как просто запустить прогу нажав на кнопку указав полный путь??


 
Anatoly Podgoretsky ©   (2002-08-06 17:59) [4]

ShellExecute


 
-=Prior=-   (2002-08-07 10:03) [5]

Пример использования команды ShellExecute в программе:
////в USES впиши SHellApi!!!!!!!
ShellExecute (Form1.Handle, nil, " http://delphi.mastak.ru", nil, nil, SW_RESTORE); //запуск странички

ShellExecute (Form1.Handle, nil, PChar (Application.ExeName), nil, nil, SW_RESTORE); //запуск второй копии этой программы

ShellExecute (Form1.Handle, nil, "iexplore", " http://programming.dax.ru", nil, SW_RESTORE); //запуск в отдельном окне

ShellExecute (Form1.Handle, nil, "mailto:bill@gates.net?subject=delphi", nil, nil, SW_RESTORE); //написать письмо

ShellExecute (Form1.Handle, nil, "c:\1.doc", nil, nil, SW_RESTORE); //открыть документ


 
RV ©   (2002-08-08 17:03) [6]

A hidden feature in the Windows registry allows you to create program aliases. Allowing you to create, for example, an alias called JBLOGGS.EXE that when executed actually runs another program, e.g. NOTEPAD.EXE

Open your registry and find the key below, below it should be a number of sub-keys.

To create a new alias create a sub-key, and call it the name of the alias you wish to create (e.g. "JBLOGGS.EXE").

Modify the (default) value of the sub-key to equal the fully qualified path and filename of the application you want to be launched when you execute the alias (e.g. "c:\windows\notepad.exe").

Exit your registry and to test use the Start -> Run command type in the name of your alias (i.e. "JBLOGGS.EXE") and the aliased program should be launched, in this case Notepad.


Settings
Key: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
App Paths]
Value Name: (Default)
Data Type: REG_SZ (String Value)
Value Data: Filename (e.g. c:\windows\notepad.exe)

Disclaimer: Modifying the registry can cause serious problems that may require you to reinstall your operating system. We cannot guarantee that problems resulting from modifications to the registry can be solved. Use the information provided at your own risk.





Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.012 c
3-85347
ruslan_as
2002-09-04 15:20
2002.09.26
Перенос данных из TOracleDataSet в TClientDataSet


1-85528
Dark Hunter
2002-09-13 14:06
2002.09.26
Динамическое PopupMenu...


1-85462
id_privin
2002-09-14 13:52
2002.09.26
Вспомнить все. Или есть ли у компилятара память.


1-85502
raiv
2002-09-17 08:51
2002.09.26
Zoom BMP


7-85718
r_a_serg
2002-07-17 12:14
2002.09.26
Помогите! Проблема с видеокартой.




   Наверх