| View previous topic :: View next topic |
| Author |
Message |
Simsgy Grandmaster Cheater
Reputation: 0
Joined: 07 May 2007 Posts: 581 Location: My new avatar <3
|
Posted: Sat Jun 09, 2007 7:05 am Post subject: [Question] Delphi Installer |
|
|
I want to know how to make an installation in Delphi.
I just started to program so...
I just want to move files from a spacified folder to another, is it able?
Thanks. _________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sat Jun 09, 2007 7:21 am Post subject: |
|
|
Do you mean make a setup program that will install files and folders into a certain directory? Or do you just mean make a button and on click will move so and so files to a directory? _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
Simsgy Grandmaster Cheater
Reputation: 0
Joined: 07 May 2007 Posts: 581 Location: My new avatar <3
|
Posted: Sat Jun 09, 2007 10:04 am Post subject: |
|
|
| oib111 wrote: | | Do you mean make a setup program that will install files and folders into a certain directory? Or do you just mean make a button and on click will move so and so files to a directory? |
A button. _________________
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sat Jun 09, 2007 10:07 am Post subject: |
|
|
CopyFile()
but I strongly recommend you use MSIs else you will have some problems when people try to install your programs in vista+, but even if you aren't targetting that platform, you should support having a standard installation system, resembling linux's package managing system, makes it easier for everyone. |
|
| Back to top |
|
 |
Simsgy Grandmaster Cheater
Reputation: 0
Joined: 07 May 2007 Posts: 581 Location: My new avatar <3
|
Posted: Sat Jun 09, 2007 11:14 am Post subject: |
|
|
| appalsap wrote: | CopyFile()
but I strongly recommend you use MSIs else you will have some problems when people try to install your programs in vista+, but even if you aren't targetting that platform, you should support having a standard installation system, resembling linux's package managing system, makes it easier for everyone. |
Could you give me the full line?
Like:
CopyFile('aouisfdnaoifun.exe') to ('C:/')
Or something? _________________
|
|
| Back to top |
|
 |
Renkokuken GO Moderator
Reputation: 4
Joined: 22 Oct 2006 Posts: 3249
|
Posted: Sat Jun 09, 2007 12:15 pm Post subject: |
|
|
| Simsgy wrote: | | appalsap wrote: | CopyFile()
but I strongly recommend you use MSIs else you will have some problems when people try to install your programs in vista+, but even if you aren't targetting that platform, you should support having a standard installation system, resembling linux's package managing system, makes it easier for everyone. |
Could you give me the full line?
Like:
CopyFile('aouisfdnaoifun.exe') to ('C:/')
Or something? | Parameters...
| Code: | BOOL CopyFile(
LPCTSTR lpExistingFileName,
LPCTSTR lpNewFileName,
BOOL bFailIfExists
); |
In use...
| Code: | | CopyFile('C:/WOWomg.TXT','C:/WOWomg2.TXT',FILE_ATTRIBUTE_NORMAL) |
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sat Jun 09, 2007 12:17 pm Post subject: |
|
|
| FILE_ATTRIBUTE_NORMAL is 0x80 which is true but you might have to typecast it to a BOOL, you should just say true or false to avoid confusion. |
|
| Back to top |
|
 |
Simsgy Grandmaster Cheater
Reputation: 0
Joined: 07 May 2007 Posts: 581 Location: My new avatar <3
|
Posted: Sat Jun 09, 2007 1:08 pm Post subject: |
|
|
| Renkokuken wrote: | | Simsgy wrote: | | appalsap wrote: | CopyFile()
but I strongly recommend you use MSIs else you will have some problems when people try to install your programs in vista+, but even if you aren't targetting that platform, you should support having a standard installation system, resembling linux's package managing system, makes it easier for everyone. |
Could you give me the full line?
Like:
CopyFile('aouisfdnaoifun.exe') to ('C:/')
Or something? | Parameters...
| Code: | BOOL CopyFile(
LPCTSTR lpExistingFileName,
LPCTSTR lpNewFileName,
BOOL bFailIfExists
); |
In use...
| Code: | | CopyFile('C:/WOWomg.TXT','C:/WOWomg2.TXT',FILE_ATTRIBUTE_NORMAL) |
|
I try doing | Code: | | CopyFile('C:/WOWomg.TXT','C:/WOWomg2.TXT',FILE_ATTRIBUTE_NORMAL) |
But it says:
[Error] Unit1.pas(2 : Incompatible types: 'LongBool' and 'Integer'
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
I know i'm a horrible n00b Delphi programmer, but I just started so no flame pl0x. _________________
|
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sat Jun 09, 2007 1:15 pm Post subject: |
|
|
change FILE_ATTRIBUTE_NORMAL to 1 if you don't want to overwrite WOWomg2.TXT if it exists or 0 if you do want to overwrite.
edit: and you should really read my posts.
edit2: and learn to troubleshoot problems independantly |
|
| Back to top |
|
 |
Simsgy Grandmaster Cheater
Reputation: 0
Joined: 07 May 2007 Posts: 581 Location: My new avatar <3
|
Posted: Sat Jun 09, 2007 1:21 pm Post subject: |
|
|
| appalsap wrote: | change FILE_ATTRIBUTE_NORMAL to 1 if you don't want to overwrite WOWomg2.TXT if it exists or 0 if you do want to overwrite.
edit: and you should really read my posts.
edit2: and learn to troubleshoot problems independantly |
Changed to 0, still same error.
And what posts? _________________
|
|
| Back to top |
|
 |
TheSorc3r3r I post too much
Reputation: 0
Joined: 06 Sep 2006 Posts: 2404
|
Posted: Sat Jun 09, 2007 1:39 pm Post subject: |
|
|
Look through your thread: | appalsap wrote: | | FILE_ATTRIBUTE_NORMAL is 0x80 which is true but you might have to typecast it to a BOOL, you should just say true or false to avoid confusion. |
... _________________
Don't laugh, I'm still learning photoshop! |
|
| Back to top |
|
 |
Simsgy Grandmaster Cheater
Reputation: 0
Joined: 07 May 2007 Posts: 581 Location: My new avatar <3
|
Posted: Sat Jun 09, 2007 1:51 pm Post subject: |
|
|
| TheSorc3r3r wrote: | Look through your thread: | appalsap wrote: | | FILE_ATTRIBUTE_NORMAL is 0x80 which is true but you might have to typecast it to a BOOL, you should just say true or false to avoid confusion. |
... |
W00T THANKS WORKING
THANKS APPALSAP AND ALL OF THE HELPERS!
I'm so happy ~~~ _________________
|
|
| Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Sun Jun 10, 2007 3:47 am Post subject: |
|
|
| Simsgy wrote: | | TheSorc3r3r wrote: | Look through your thread: | appalsap wrote: | | FILE_ATTRIBUTE_NORMAL is 0x80 which is true but you might have to typecast it to a BOOL, you should just say true or false to avoid confusion. |
... |
W00T THANKS WORKING
THANKS APPALSAP AND ALL OF THE HELPERS!
I'm so happy ~~~ |
 |
|
| Back to top |
|
 |
Simsgy Grandmaster Cheater
Reputation: 0
Joined: 07 May 2007 Posts: 581 Location: My new avatar <3
|
Posted: Sun Jun 10, 2007 5:34 am Post subject: |
|
|
| Kaspersky wrote: | | Simsgy wrote: | | TheSorc3r3r wrote: | Look through your thread: | appalsap wrote: | | FILE_ATTRIBUTE_NORMAL is 0x80 which is true but you might have to typecast it to a BOOL, you should just say true or false to avoid confusion. |
... |
W00T THANKS WORKING
THANKS APPALSAP AND ALL OF THE HELPERS!
I'm so happy ~~~ |
 |
Lol hey...
When I will come back from school, log in MSN, I need to talk to you about something. _________________
|
|
| Back to top |
|
 |
|