RSS Forums RSS
Please support our Pascal and Delphi advertiser: Programming Forums
Views: 3354 | Replies: 5
Reply
Join Date: Jul 2005
Posts: 18
Reputation: sbedford is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
sbedford sbedford is offline Offline
Newbie Poster

Creating a delphi program to autoinstall other programs?

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Posts: 20
Reputation: satrix36 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
satrix36 satrix36 is offline Offline
Newbie Poster

Re: Creating a delphi program to autoinstall other programs?

  #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  
Join Date: Jul 2005
Posts: 18
Reputation: sbedford is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
sbedford sbedford is offline Offline
Newbie Poster

Re: Creating a delphi program to autoinstall other programs?

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

Re: Creating a delphi program to autoinstall other programs?

  #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  
Join Date: Aug 2008
Posts: 1,003
Reputation: LizR will become famous soon enough LizR will become famous soon enough 
Rep Power: 4
Solved Threads: 95
LizR LizR is offline Offline
Veteran Poster

Re: Creating a delphi program to autoinstall other programs?

  #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  
Join Date: Oct 2008
Posts: 3
Reputation: Jacob777 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Jacob777 Jacob777 is offline Offline
Newbie Poster

Re: Creating a delphi program to autoinstall other programs?

  #6  
34 Days Ago
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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:53 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC