INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Requirement

Requirement

(OP)
My program needs the 2010 Visual C+ redistribution files. Is there a way to check that the computer have it and if not, redirect to the Microsoft page ? (Or even better, start the install for the chosen platform automatically?)

The file that needs to be present is MSVCP100.dll

Thanks.
Pierre

RE: Requirement

Checking for the file is easy enough.

CODE

function libexists(name: string): boolean;
var
  dllhandle: THandle;
begin
  dllHandle := LoadLibrary(PChar(name)) ;
  if dllHandle <> 0 then
    begin
      FreeLibrary(dllHandle);
      Result := true;
    end
  else
    Result := false;
end;

procedure TForm1.Button1Click(Sender: TObject);
const
  libtest = 'MSVCP100.DLL';
begin
  if libexists(libtest) then
    ShowMessage(libtest + ' exists')
  else
    ShowMessage(libtest + ' does not exist.');
end; 

As far as what to do about it, you can always just shellexecute the URL you need. As far as determining whether you have that version, I'm not sure if there's a wrinkle involved that might not make this method work.

RE: Requirement

(OP)
Thanks, let me try that for now. If someone has a better solution, i'll implement it. I know that some programs are able to install all the requirements.

Sincerely,

RE: Requirement

(OP)
just realized that may not work. i use inno setup to pack my program. so i guess, i'll have to run a script within inno setup. my program does not start if the requirements are not met.i may be able to create a delphi program that starts before the program itself installs.
Thanks for the brainstorming.

RE: Requirement

(OP)
i think this is what i need. i did create a small delphi program with your code that i am telling inno to run before the install.

thanks.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close