Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.09.26;
Скачать: 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 вся ветка

Текущий архив: 2002.09.26;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.013 c
14-85692
J.Silver
2002-08-27 22:35
2002.09.26
Помогите найти прогу...


4-85776
Groove
2002-08-06 16:17
2002.09.26
help


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


1-85565
GoodMan
2002-09-12 15:30
2002.09.26
Помогите собрать число


1-85569
diMAN
2002-09-12 18:29
2002.09.26
Эффективная работа со множеством форм