Runtimes and Features

Got a problem you cannot solve? Try here.
garyhalb
Posts: 29
Joined: Fri Apr 30, 2010 12:55 am

Runtimes and Features

Post by garyhalb »

Hi,

Is it possible to alternatively install certain runtimes based on the features the user selects during setup? For instance, if a user is installing my full application including the server portion, I want them to install Microsoft SQL Server 2008 Express, but not if they choose to only install the Client portion of the app.

Also, is it possible to customize requirements for installing Sql Express? For instance if a specific named instance does not exist I want to install it, and I want to install the run time as a specific named instance - so is it possible to specifiy command line instructions for these runtimes?

Thanks,
Gary
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: Runtimes and Features

Post by MichaelNesmith »

Of course. For the second request, just hit the Options button in the visual runtimes designer with the runtime in question highlighted. For the first request, you'll want to drop-down to the MSIcode, and just cut&paste the code from the start of the install (the prereq block) to the exact feature you have in mind. Don't be shy of experimenting around in MSIcode - we added Undo so you can do so in peace ;)
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
garyhalb
Posts: 29
Joined: Fri Apr 30, 2010 12:55 am

Re: Runtimes and Features

Post by garyhalb »

Hi,

Thanks for the quick reply. I've managed to change the runtime options successfully.

I upgraded my version to Developer edition in order to handle the second scenario via MSI scripting. Can you please advise how I would go about doing the following in MSI script (or point me to a forum example):

If Full Installation feature is selected:
Check sql prereq
Install sql prereq if necessary - displaying download progress and install progress.
Continue with install as normal.

Thanks.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: Runtimes and Features

Post by MichaelNesmith »

Basically, If COMPLETE equals TRUE, then include the prereq scripts.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
garyhalb
Posts: 29
Joined: Fri Apr 30, 2010 12:55 am

Re: Runtimes and Features

Post by garyhalb »

Hi,

Ok, I'm almost 100% done. But my final issue is around file permissions. I've tried every trick mentioned on this forum, and no matter what I do I cannot set permissions on the targetdir to Everyone. Please see my code below:

Create Folder $TARGETDIR$
Grant Complete Access to File System Object "$TARGETDIR$"
Apply Install (get result into variable SUCCESS)

The above does absolutely nothing - and it's not related to windows not updating it's ACL list, as I cannot run my app as it gives access denied exceptions. I've tried the Call DLL workaround, but again this does not work as expected.

Please help!
Gary
garyhalb
Posts: 29
Joined: Fri Apr 30, 2010 12:55 am

Re: Runtimes and Features

Post by garyhalb »

Please also see my attempt using the Call DLL workaround. Hopefully this will show where I'm going wrong.
Attachments
screenshot.jpg
screenshot.jpg (258.61 KiB) Viewed 15807 times
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: Runtimes and Features

Post by MichaelNesmith »

Set the second variable value to 0 (zero) and set the return variable to bool type and try again!
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
garyhalb
Posts: 29
Joined: Fri Apr 30, 2010 12:55 am

Re: Runtimes and Features

Post by garyhalb »

Hi Michael,

Same problem - this seems to set no permissions on the folder, and all folders below it also have no permissions. I've attached another screen.

Thanks,
Gary
Attachments
screenshot.jpg
screenshot.jpg (135.38 KiB) Viewed 15801 times
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: Runtimes and Features

Post by MichaelNesmith »

Is your install in 32 or 64 bit mode? Is the folder getting created?
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
garyhalb
Posts: 29
Joined: Fri Apr 30, 2010 12:55 am

Re: Runtimes and Features

Post by garyhalb »

Hi,

It's 32 bit - the folder is being created as it is the main applications target directions. Ie. C:\Program Files\SpaGuru. All sub folders are also correctly created, but their are absolutely no permissions set on the SpaGuru folder. In fact, to uninstall I have to manually go and take ownership and then add an Everyone user. (Using Windows 7).

Regards,
Gary
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: Runtimes and Features

Post by MichaelNesmith »

Maybe you are setting the Set Access Control parameters wrong?
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
garyhalb
Posts: 29
Joined: Fri Apr 30, 2010 12:55 am

Re: Runtimes and Features

Post by garyhalb »

Hi Michael,

OK, instead of using the command:

Grant Complete Access to File System Object "$TARGETDIR$"

I changed to:

Set Read Write Permissions on File System Object "$TARGETDIR$" for Everyone

This now works, and permissions are set on the folder and all child folders and files. Please can you submit the fact that the Grant Complete Access command does not work in this instance, and I would assume this is a bug (I spent many wasted hours trying to get this to work).

One last thing is that when doing the above the only permission on the folder is for Everyone - no other system permissions exist etc. Is this normal?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: Runtimes and Features

Post by MichaelNesmith »

What happens when you call Grant Complete Access to File System Object "$TARGETDIR$"? What are the actual resulting permissions on the file?

As for your second question - are you saying the call removes all pre-existing access rights?
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
garyhalb
Posts: 29
Joined: Fri Apr 30, 2010 12:55 am

Re: Runtimes and Features

Post by garyhalb »

Hi,

When I call Grant Complete Access the resulting folder is cleared of ALL permissions. In Win7 it shows a lock icon on the folder indicating I do not have permissions to access that folder. I have to first take ownership of it, then add a Everyone security permission - otherwise I cannot even perform an uninstall as the uninstaller has no rights to access the folder.

Secondly, yes, on my dev machine the pre-existing rights are completely deleted and only an Everyone right is shown. However my VM tests of the setup on Win7 and WinXPSP3 did not do the same thing, all permissions remained and an Everyone permission was added - so this may just be machine specific perhaps.
Steve
Posts: 117
Joined: Fri Jun 16, 2006 9:51 pm
Location: Canada eh

Re: Runtimes and Features

Post by Steve »

As of InstallAware Version 12 this problem has still not been resolved.
As stated above Win 7 installs will have all folder permission removed if you use the 'Operation -> Grant Everyone Total Control' option.

-Steve
Post Reply