Custom action Help need to apend to services file
Hey all
I have just done a snapshot msi of an app i want to deploy. Problem is that i need the application to append to the existing services file in the local pc. I have written a script which apends the entry i want in vbs this is not the problem as i have tried the script on its on own and works fine.
I added the script to custom actions however when the msi install runs it doesn't append the file.
Can anyone please give me a step by step guide as to how to do it? The local pc's have read access set on the C:\windows\system32 folder, but my script rights the attributes of this file to read and write.
I have just done a snapshot msi of an app i want to deploy. Problem is that i need the application to append to the existing services file in the local pc. I have written a script which apends the entry i want in vbs this is not the problem as i have tried the script on its on own and works fine.
I added the script to custom actions however when the msi install runs it doesn't append the file.
Can anyone please give me a step by step guide as to how to do it? The local pc's have read access set on the C:\windows\system32 folder, but my script rights the attributes of this file to read and write.
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
anonymous_9363
16 years ago
Irrespective of the file's attributes, I'd imagine that in most environments the entire Windows folder and sub-folders would be permissioned to read only. Thus, you'd need to add another Custom Action to permission the file accordingly. Use SetACL, XCACLS or any of the command-line tools available to do that. I generally use separate CAs for each action rather than monolithic ones combining several actions, as that makes error diagnosis much easier.
Posted by:
mrcheeks
16 years ago
Posted by:
nheim
16 years ago
Posted by:
anonymous_9363
16 years ago
ORIGINAL: mrcheeksYour OP says that your script sets the file's atributes, not its permissions: the two are completely different.
OK so am i correct in saying that i need to creat a custom action for permissioning of the file even though the script that i wrote sets the permissions on the file to start off with to write also?
File attributes can be null, read-only, hidden, system, archive or any combination of those. If you right-click a file and select 'Properties' from the menu, (a limited set of) the attributes can be set from the resulting dialog. If you right-click a file and select 'Sharing and Security' instead, these are the permissions for the file. They are probably inherited from the parent folder and are almost certainly set for 'Read' for the 'Users' group (or 'Everyone', depending on your workstation set-up). It is *these* permissions which you would use a permissioning tool to change.
Use Google to find command-line details for SetACL or XCACLS. My own preference is for the former, merely because I find its arguments reasonably straightforward and because I've used it since the dawn of time.
Posted by:
nheim
16 years ago
Hi folks,
the file not being delivered to its location has nothing to do with its own permission, IMHO.
But if the script runs outside of the install script (that means: not in the deferred part), the installer may just not have the permission to copy the file to the system folder.
Another possibility would be, that the script contains "Wscript" statements.
Taking a log file and search for an error would help a lot, i think.
Regards, Nick
the file not being delivered to its location has nothing to do with its own permission, IMHO.
But if the script runs outside of the install script (that means: not in the deferred part), the installer may just not have the permission to copy the file to the system folder.
Another possibility would be, that the script contains "Wscript" statements.
Taking a log file and search for an error would help a lot, i think.
Regards, Nick
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.