cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MikeAtSoftware
Level 4

I find it hard to believe that something standard so be so difficult

I'm a new user of IS 2008.

The 2000+ page manual is a bit overpowering for a new user, so I'm hoping some helpful member of this forum can give me a simple, step by step working example of what I think is a standard task.

I simply want to make a call to cacls to set some permissions on two folders during installation of an ASP.Net application.

There are a lot of posts on the topic, but I cannot find any example which helps a newbie user achive the exact steps required for an InstallScript MSI project.

I've got all of the basics of the installation working, but what exactly do I do, in what sequence, using which commands to successfuly call LaunchAppAndWait on cacls to add permissions to a folder?

I've got as far as inserting a CustomAction, sequencing it to follow Installfinalize, marking its In-Script Execution as Deferred, and having it call this simple function included in setup.rul:

export prototype XC_LaunchAppAndWait(HWND);

function XC_LaunchAppAndWait(hMSI)
STRING strCommandForPermission ;
begin

strCommandForPermission = INSTALLDIR ^ "AppDB";
LaunchAppAndWait(SUPPORTDIR ^ "CACLS",'"' + strCommandForPermission + '"' + " " + "/T /E /G Everyone:F",LAAW_OPTION_WAIT + LAAW_OPTION_HIDDEN);

end;

None of which works - the installer breaks, complaining that the file is not found.

Can some helpful member who can recall the steepness of their own learning curve lend a hand 🙂 ?

Mike
Labels (1)
0 Kudos

(2) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Take a look at the migration notes linked in the stickies in both the 2008 and 12 forums; you're primarily getting bitten by trying to use INSTALLDIR and SUPPORTDIR in a deferred custom action. You'll need to use CustomActionData to implement this task. Also look into the scheduling on that action, as you will probably want to run it "deferred in system context" between InstallFiles and InstallFinalize.
0 Kudos
MikeAtSoftware
Level 4

Thanks very much for the pointer MichaelU, I'll look it up now.
0 Kudos