| | |
Creating a delphi program to autoinstall other programs?
![]() |
•
•
Join Date: Aug 2005
Posts: 20
Reputation:
Solved Threads: 0
Hi,
I have an answer to 'how to execute an external exe file'.
Under 'implementation' and before your first procedure type in 'uses ShellAPI;'
After typing that in, add the following code to one of your procedures:
ShellExecute(Handle, 'open', 'type in the directory of your file e.g. c:\test.txt', nil, nil, SW_SHOWNORMAL);
Hope that helps
I have an answer to 'how to execute an external exe file'.
Under 'implementation' and before your first procedure type in 'uses ShellAPI;'
After typing that in, add the following code to one of your procedures:
ShellExecute(Handle, 'open', 'type in the directory of your file e.g. c:\test.txt', nil, nil, SW_SHOWNORMAL);
Hope that helps
•
•
Join Date: Jan 2008
Posts: 41
Reputation:
Solved Threads: 0
This works fine, but how can I replace the string of the file to execute by my string.
I have:
Var
txt : string;
.
.
txt := 'myprogram.exe'
.
.
ShellExecute(Handle, 'open', txt, nil, nil, SW_SHOWNORMAL);
This gives a compile error:
Incompatible types: 'String' and 'PAnsiChar'
How can I conver my string to PAnsiChar?
I have:
Var
txt : string;
.
.
txt := 'myprogram.exe'
.
.
ShellExecute(Handle, 'open', txt, nil, nil, SW_SHOWNORMAL);
This gives a compile error:
Incompatible types: 'String' and 'PAnsiChar'
How can I conver my string to PAnsiChar?
•
•
Join Date: Aug 2008
Posts: 1,735
Reputation:
Solved Threads: 186
You can convert it like any other conversion with pansichar(txt) or, you could have made the variable an ansichar and sent the pointer..
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
•
•
Join Date: Oct 2008
Posts: 3
Reputation:
Solved Threads: 0
If just launch a new app then use ShellExecute, then you can hide them or hide your app to enable auto setup
------------------------------------
Self Cert best acne solution products
------------------------------------
Self Cert best acne solution products
![]() |
Similar Threads
- Creating Bruteforce Program (C++)
- Creating a VB dll (Visual Basic 4 / 5 / 6)
- Verifying the existence of a file with a delphi program. (Pascal and Delphi)
- remove install software warning - not digitally signed (Windows NT / 2000 / XP)
- automating installation problem (IT Professionals' Lounge)
- time delay during program execution (VB.NET)
- Creating a program to run under various OS (Pascal and Delphi)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: Website autologin
- Next Thread: Delphi dictionary [HELP!]
| Thread Tools | Search this Thread |






