Creating a delphi program to autoinstall other programs?

Reply

Join Date: Jul 2005
Posts: 18
Reputation: sbedford is an unknown quantity at this point 
Solved Threads: 0
sbedford sbedford is offline Offline
Newbie Poster

Creating a delphi program to autoinstall other programs?

 
0
  #1
Jul 20th, 2005
Hi

I am trying to create a delphi program to autoinstall other multiple utilities such as adobe reader, winamp etc. I am firstly wondering how to execute an external exe file. and also, is there a way to pass mouse clicks through delphi to this external program?

Thanks

Sean Bedford
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 20
Reputation: satrix36 is an unknown quantity at this point 
Solved Threads: 0
satrix36 satrix36 is offline Offline
Newbie Poster

Re: Creating a delphi program to autoinstall other programs?

 
0
  #2
Aug 16th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 18
Reputation: sbedford is an unknown quantity at this point 
Solved Threads: 0
sbedford sbedford is offline Offline
Newbie Poster

Re: Creating a delphi program to autoinstall other programs?

 
0
  #3
Aug 17th, 2005
Thanks, that did the job!
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 41
Reputation: AKJo is an unknown quantity at this point 
Solved Threads: 0
AKJo AKJo is offline Offline
Light Poster

Re: Creating a delphi program to autoinstall other programs?

 
0
  #4
Oct 17th, 2008
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?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: Creating a delphi program to autoinstall other programs?

 
0
  #5
Oct 17th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 3
Reputation: Jacob777 is an unknown quantity at this point 
Solved Threads: 0
Jacob777 Jacob777 is offline Offline
Newbie Poster

Re: Creating a delphi program to autoinstall other programs?

 
0
  #6
Oct 31st, 2008
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Pascal and Delphi Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC