|
|
Регистрация Восстановить пароль |
Повторная активизация e-mail |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
|
Опции темы | Поиск в этой теме |
13.02.2008, 23:06 | #1 |
Пользователь
Регистрация: 27.12.2007
Сообщений: 67
|
Копирование программы.
Как сделать так, чтобы моя программа при запуске автоматически копировалась в папку Windows?
CopyFile() И вовсе не обязательно писать столько знаков вопроса.
S.R.H.(Rahim)
Последний раз редактировалось Квэнди; 13.02.2008 в 23:48. |
13.02.2008, 23:51 | #2 |
Старожил
Регистрация: 13.12.2006
Сообщений: 3,859
|
Нажимаем F1 , ищем там copyfile и что же мы видим ?
CopyFile The CopyFile function copies an existing file to a new file. The CopyFileEx function provides two additional capabilities. CopyFileEx can call a specified callback function each time a portion of the copy operation is completed, and CopyFileEx can be canceled during the copy operation. BOOL CopyFile( LPCTSTR lpExistingFileName, LPCTSTR lpNewFileName, BOOL bFailIfExists ); Parameters lpExistingFileName [in] Pointer to a null-terminated string that specifies the name of an existing file. In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\?\" to the path. For more information, see Naming a File. Windows Me/98/95: This string must not exceed MAX_PATH characters. If lpExistingFileName does not exist, CopyFile fails, and GetLastError returns ERROR_FILE_NOT_FOUND. lpNewFileName [in] Pointer to a null-terminated string that specifies the name of the new file. In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\?\" to the path. For more information, see Naming a File. Windows Me/98/95: This string must not exceed MAX_PATH characters. bFailIfExists [in] If this parameter is TRUE and the new file specified by lpNewFileName already exists, the function fails. If this parameter is FALSE and the new file already exists, the function overwrites the existing file and succeeds. Return Value If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. А если обощить: Copyfile (что,куда, перезаписывать ?);
ICQ не для вопросов, а для предложений. Для вопросов используйте форум
IRC канал клуба программистов|Мои статьи |
13.02.2008, 23:57 | #3 |
Участник клуба
Регистрация: 28.11.2007
Сообщений: 1,521
|
CopyFile(PChar(ParamStr(0)), PChar('Новый_путь' +
ExtractFileName(ParamStr(0))), True);
Всегда рад помочь!
|
14.02.2008, 00:03 | #4 |
*
Старожил
Регистрация: 22.11.2006
Сообщений: 9,201
|
Это совсем "небольно" :
Код:
|
14.02.2008, 11:44 | #5 |
Пользователь
Регистрация: 27.12.2007
Сообщений: 67
|
Terran, Mihali4, большое вам спасибо!
S.R.H.(Rahim)
|
Похожие темы | ||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
Копирование *.exe вручную | v01umE | Общие вопросы C/C++ | 4 | 06.07.2008 20:06 |
Копирование | ryton | SQL, базы данных | 2 | 30.06.2008 09:32 |
Запуск программы на выполнение из другой программы. | ViNcHeStEr | Паскаль, Turbo Pascal, PascalABC.NET | 6 | 18.06.2008 14:33 |
Копирование и запуск | RealSHELS | Общие вопросы Delphi | 2 | 27.03.2008 22:03 |
Копирование информации | JoJo | Общие вопросы Delphi | 7 | 23.11.2007 12:15 |