Вниз
Скачать: 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.01 c
3-85400
michael_b
2002-09-05 15:06
2002.09.26
Слышал, что Borland начиная с delphi 7 не поддерживает SQL-links


1-85473
Cr@sh
2002-09-16 15:33
2002.09.26
Проблемы с Максимайзом.


3-85383
Sewix
2002-08-18 02:41
2002.09.26
Помогите настроить Alias Manager для работы с Oracle


3-85308
id_privin
2002-09-02 19:15
2002.09.26
как заставить IBDataSet выглядеть как OracleDataSet


1-85549
race1
2002-09-13 11:28
2002.09.26
картинка




   Наверх