Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Setup / November 2006

Tip: Looking for answers? Try searching our database.

using vs setup to make installer for access 2003 runtime app

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jeffmbdo - 28 Oct 2006 09:12 GMT
hi
is it possible to use vs setup project to make an installer to install an MS
Access Runtime MDE application?
The requirements, beyond the usual file copies, shortcuts, add/remove
programs settings, are:
1) to install the MS Access runtime seamlessly. This is just copying the
runtime files and running the runtime installer with "AccessRT.mst /quiet".
Can a file be executed by setup project at install time?
2) creating a shortcut that depends on the installed location of the Access
runtime exe, eg C:\Program Files\Microsoft Office\OFFICE11\MSaccess.exe c:\my
folder\my access.mde /runtime
3) associating an icon that is installed as part of the setup project with
the shortcut made by the setup project
4) registering OCX/Dlls used by the app.
Please advise how these can be done if they're not directly obvious in the
setup project properties.
Many Many Many thanks for your help.
jeffmbdo
Phil Wilson - 30 Oct 2006 21:52 GMT
1. I'd use this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/cus
tom_pkg.asp

You can't run that MSI as a custom action because you can't have two
simultaneous MSI installs going on, so do it up from with the bootstrapper.
2. Not with Visual studio - it only lets you create shortcuts to things
you're installing. However I suspect that you could try creating a shortcut
to your mde file because it has an association with Access. You don't need
to run Word to open a doc file and you don't need to run notepad to open a
txt file. If you just do an open on the file Access will start to open it.
3. Is in the setup project properties.
4. Is the Register property in each file's properties.
Signature

Phil Wilson
[Microsoft MVP - Windows Installer]

> hi
> is it possible to use vs setup project to make an installer to install an
[quoted text clipped - 18 lines]
> Many Many Many thanks for your help.
> jeffmbdo
jeffmbdo - 31 Oct 2006 10:07 GMT
Thanks for the reply Phil
To install the MSA runtime i've done a vbs script:
Set oShell = WScript.CreateObject("WScript.shell")
oShell.run "AccessRT.msi /quiet"
Set oShell = nothing
and added this to a custom action at the end of the install.
Thought i'd got it all solved but i can find no way to stop the setup making
a self-repair shortcut rather than the one i require. (I don't believe MSA
runtime creates file associations), so only recourse remaining is another vbs
script to alter the shortcut's target properties at end of install, unless
you know better?

> 1. I'd use this:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/cus
tom_pkg.asp

[quoted text clipped - 29 lines]
> > Many Many Many thanks for your help.
> > jeffmbdo
Phil Wilson - 31 Oct 2006 22:16 GMT
I don't think that vbscript will work in a custom action because you've got
wscript.createobject there. You can just do a CreateObject ("...")
Signature

Phil Wilson
[Microsoft MVP - Windows Installer]

> Thanks for the reply Phil
> To install the MSA runtime i've done a vbs script:
[quoted text clipped - 52 lines]
>> > Many Many Many thanks for your help.
>> > jeffmbdo
jeffmbdo - 31 Oct 2006 21:46 GMT
Sorry Phil
I've finally caught up with you. (When I say caught up, i mean you're way
out in the distance but i can just see you with very powerful binoculars!)
Been grappling with VBS in custom actions and now got shortcut sorted.
As you say VBS will launch the AccessRt.msi but MSI will not allow it to run.
So, over to the Bootstrapper. Am i right in thinking, that, when i've got
this correct, Access RT will appear in setup projects optional pre-requisites
in VS 2005?
Thanks for your help.
jeff

> 1. I'd use this:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/cus
tom_pkg.asp

[quoted text clipped - 29 lines]
> > Many Many Many thanks for your help.
> > jeffmbdo
Phil Wilson - 31 Oct 2006 22:18 GMT
Yes, if you use that customisation it will show up as a prerequisite, and
you have the detection method there (IsMsiInstalled on the ProductCode of
the AccessRT MSI file) so it won't install it if it's already there.
Signature

Phil Wilson
[Microsoft MVP - Windows Installer]

> Sorry Phil
> I've finally caught up with you. (When I say caught up, i mean you're way
[quoted text clipped - 51 lines]
>> > Many Many Many thanks for your help.
>> > jeffmbdo
jeffmbdo - 01 Nov 2006 09:40 GMT
thanks again for the reply Phil.
Yes, i'd discovered the need for createobject instead of
wscript.createobject with the vbs for the shortcut. It may interest you to
know (although you probably already know, that it was not possible to update
the self-repair shortcut's targetpath property made by VS2005's setup project
- other shortuct properties such as description could be updated but not the
targetpath - had to delete shortcut and create new one. Also the vbscript
failed inside custom action if it used wscript.arguments(0). So, to pass the
TargetDir from the custom action I had to set it as an argument on the
shortcut made by the setup project - then get this from the shortcut before
deleing it and making a new one!)
Am i correct in not being able to run another msi from my setup project in a
customer action vbs script? i've tried .exec, .execute, .run. They all
produce the usual script failure message.
Jeff

> Yes, if you use that customisation it will show up as a prerequisite, and
> you have the detection method there (IsMsiInstalled on the ProductCode of
[quoted text clipped - 54 lines]
> >> > Many Many Many thanks for your help.
> >> > jeffmbdo
Phil Wilson - 03 Nov 2006 02:57 GMT
You can't run an MSI from a custom action in the execute sequence (which is
where VS puts them). That's why bootstrappers are pretty much the universal
way to deal with prerequisites.
Signature

Phil Wilson
[Microsoft MVP - Windows Installer]

> thanks again for the reply Phil.
> Yes, i'd discovered the need for createobject instead of
[quoted text clipped - 87 lines]
>> >> > Many Many Many thanks for your help.
>> >> > jeffmbdo
jeffmbdo - 01 Nov 2006 13:48 GMT
Hi Phil

Don't know if you can help, I hope so.

I'm getting error "Could not find prerequisite 'MS Access 2003 Runtime' in
path 'D:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bootstrapper'".

My Product.xml (located in 'D:\Program Files\Microsoft Visual Studio
8\SDK\v2.0\Bootstrapper\Packages\CustomPackage')is:

<?xml version="1.0" encoding="utf-8" ?>
<Product
 xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
 ProductCode="MS.Access.2003.Runtime.Package">
 <RelatedProducts>
   <DependsOnProduct Code="Microsoft.Windows.Installer.2.0" />
 </RelatedProducts>
 <PackageFiles>
   <PackageFile Name="ACCESSRT.MSI"/>
   <PackageFile Name="ACCESSRT.CAB"/>
 </PackageFiles>
 <Commands>
  <Command PackageFile="ACCESSRT.MSI" Arguments="">
   <ExitCodes>
    <ExitCode Value="0" Result="Success"/>
    <ExitCode Value="1641" Result="SuccessReboot"/>
    <ExitCode Value="3010" Result="SuccessReboot"/>
     <DefaultExitCode Result="Fail" String="GeneralFailure"/>
   </ExitCodes>
  </Command>
 </Commands>
</Product>

Files AccessRT.mst and AccessRT.cab are located same folder as Product.xml.

My Package.xml (located in 'D:\Program Files\Microsoft Visual Studio
8\SDK\v2.0\Bootstrapper\Packages\CustomPackage\en' :
<?xml version="1.0" encoding="utf-8" ?>
<Package
 xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
 Name="DisplayName"
 Culture="Culture">
 <Strings>
   <String Name="DisplayName">MS Access 2003 Runtime</String>
   <String Name="Culture">en</String>
   <String Name="GeneralFailure">A general error has occurred while
installing this package.</String>
 </Strings>
 <InstallChecks>
  <MsiProductCheck
     Property="IsMsiInstalled"
     Product="{901C0409-6000-11D3-8CFE-0150048383C9}"/>
 </InstallChecks>
 <InstallConditions>
  <BypassIf
     Property="IsMsiInstalled"
     Compare="ValueGreaterThan" Value="0"/>
 </InstallConditions>
</MsiProductCheck>
</Package>

Thanks in advance,
Jeff

> Yes, if you use that customisation it will show up as a prerequisite, and
> you have the detection method there (IsMsiInstalled on the ProductCode of
[quoted text clipped - 54 lines]
> >> > Many Many Many thanks for your help.
> >> > jeffmbdo
Phil Wilson - 03 Nov 2006 02:55 GMT
I'm not well acquainted with the bootstrap, but you do need it at that
Visual Studio location so that it can copy it to the "cd image" being
created that contains the msi, manifest, prequisites etc.
Signature

Phil Wilson
[Microsoft MVP - Windows Installer]

> Hi Phil
>
[quoted text clipped - 130 lines]
>> >> > Many Many Many thanks for your help.
>> >> > jeffmbdo
jeffmbdo - 03 Nov 2006 13:22 GMT
Thanks for the reply Phil
I had the Installchecks and InstallConditions in the wrong xml file!
Its ok now, except when i run the setup it prompts with "Do You want to
install the Access Runtime". Is there any way to not prompt?
Jeff

> I'm not well acquainted with the bootstrap, but you do need it at that
> Visual Studio location so that it can copy it to the "cd image" being
[quoted text clipped - 133 lines]
> >> >> > Many Many Many thanks for your help.
> >> >> > jeffmbdo
MIlanB - 19 Nov 2006 09:54 GMT
Adding MS Access RunTime as prerequisite, will not show any Licence
Agreement, before installing accessrt.msi.

Maybe it is wrong... :)

Milan

> Thanks for the reply Phil
> I had the Installchecks and InstallConditions in the wrong xml file!
[quoted text clipped - 148 lines]
> > >> >> > Many Many Many thanks for your help.
> > >> >> > jeffmbdo
jeffmbdo - 20 Nov 2006 08:34 GMT
Thanks for the reply Milan,
No, its not the Access license agreement. Its a special bootstrapper
generated pre-requisite prompt: "do you want to install this <custom
package>?" that appears as soon as you runsetup.exe.
Jeff

> Adding MS Access RunTime as prerequisite, will not show any Licence
> Agreement, before installing accessrt.msi.
[quoted text clipped - 155 lines]
> > > >> >> > Many Many Many thanks for your help.
> > > >> >> > jeffmbdo
Dan - 27 Nov 2006 06:50 GMT
I know I'm jumping into this a little late, but I thought I'd add my 2
cents worth, as I've just dealt with it in my own application.  My
decision was to install the ART with the application itself, by
creating a routine which detects the ART, downloads it from my server
and installs it if it's missing.  This way, if a user is performing a
uninstall-reinstall, they don't have to go through the ART download
again, and I have a 500K setup program, which does well for some of my
dial-up clients.

Dan

> Thanks for the reply Milan,
> No, its not the Access license agreement. Its a special bootstrapper
[quoted text clipped - 161 lines]
> > > > >> >> > Many Many Many thanks for your help.
> > > > >> >> > jeffmbdo

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.