How can I copy my app to the windows directory?
Any help would be appreciated!
I am using Lcc Win32 platform.
How can I copy my app to the windows directory?
Any help would be appreciated!
I am using Lcc Win32 platform.
?
From the OS, use Explorer, from a program, use the CopyFile() API function.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
Code:#include <windows.h> /* copies self to windows directory */ int main(int argc, char *argv[]) { CopyFile(argv[0],"c:\\windows",0); return 0; }
thanks
how do you do it using WinMain?
There's some function to get the app's path. Can't remember it now.
tadaCode:TCHAR buff[256]; GetModuleFileName(NULL,buff,256); CopyFile(buff,"c:\\windows",0);
do i need any more include files? cos i cant get it to work!
works now! lol thanks for the help