473,594 Members | 2,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Installer question: Read-only files

I want to deploy a project in which the user is provided with a set of
READ-ONLY files to use as templates. They will be in a directory to which
the user can add files of his own.

It's important to keep the user from deleting any of the pre-supplied files,
because if this is done, the Windows Installer apparently wants to "repair"
the application. I didn't realize it kept track of such things, but it's
doing so.

How can I make the files install as read-only files?

Making them read-only in the source directory isn't enough.

If this is a Custom Action, how can I determine the directory (under Program
Files) in which they are installed? For example, suppose the Custom Action
were just a .BAT file. Could it use environment variables to find out where
the user has installed the application?
Thanks!
--
Michael Covington, Ph.D.
Consultant
www.covingtoninnovations.com
Nov 15 '05 #1
2 1426
Just use CACLS to deny him the right to delete the files.

"Michael A. Covington" <lo**@www.covin gtoninnovations .com.for.addres s> wrote
in message news:u9******** ******@TK2MSFTN GP10.phx.gbl...
I want to deploy a project in which the user is provided with a set of
READ-ONLY files to use as templates. They will be in a directory to which
the user can add files of his own.

It's important to keep the user from deleting any of the pre-supplied files, because if this is done, the Windows Installer apparently wants to "repair" the application. I didn't realize it kept track of such things, but it's
doing so.

How can I make the files install as read-only files?

Making them read-only in the source directory isn't enough.

If this is a Custom Action, how can I determine the directory (under Program Files) in which they are installed? For example, suppose the Custom Action were just a .BAT file. Could it use environment variables to find out where the user has installed the application?
Thanks!
--
Michael Covington, Ph.D.
Consultant
www.covingtoninnovations.com

Nov 15 '05 #2

"Ayende Rahien" <Ay****@no.spam > wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
Just use CACLS to deny him the right to delete the files.


How? When? How do I build this into a deployment project? How would CACLS
know where the user chose to install the application?

In any case, I found that all I have to do is View File System (in the
deployment project) and mark the files read-only there.

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1472
by: Glawster | last post by:
I am not sure whether this is the right place to post questions for Installer but here you are. I have inherited a python application, I work on UNIX and then have to use Installed to produce a Windows version. All is OK with this except when executing and the following error messages are displayed. Can anyone advise how I can correct them or even just hide them. D:\CCPS\Release-2.1-20040203\Client\Build\Windows\bin>ccps2_install.exe
0
1055
by: zyqnews | last post by:
hello: I am using Install to create a standalone program for linux. What I has done is : $cd source/linux $python Make.py $make $cd ../../ $python Configure.py $python Makespec.py hello.py
5
14458
by: krisk | last post by:
Could not find ansewr: in ProjectInstaller, RunInstallerAttribute: ..... this.serviceInstaller1.ServiceName = MyServiceName; in the code: public class MyService : System.ServiceProcess.ServiceBase { string MyServiceName = "configSendmailA";
7
3669
by: sidd | last post by:
Hi All, i have some doubts on .net windows services.. please see if some one could help me understand this.. 1)is it possible to install a windows service which does not have a installer added to it, using installutil.exe OR is it must to have an installer to the service project to be able to
1
2091
by: HyperX | last post by:
Hey guys, How can I see the code of the installer class? I know that I have to right click on my object class, -> Add Item -> Code -> installer class... The actual question is, I cannot see "Code" in my "Add Item" Menu. In order to see this 'Add Installer code'... Do I need to install any plugin?
1
302
by: Patrick De Ridder | last post by:
When I apply the installer to create a setup.exe for clients, I get "default company name" in the suggested file location. How do I change "default company name" into a more appropriate setting? (I don't want clients to have to do that. So I am talking about a setting change in the Visual C#.NET IDE when setting up the installer.) I would be very obliged to have a response to this query. -- Regards, Patrick.
0
1060
by: Marcin Hoppe | last post by:
Hi! I have a Windows service and installer for it in the same assembly. When the Windows service executes it can access its configuration file in a normal manner. When the service is installed with installutil.exe, the installer class can't read anything from the same configuration file.
1
1204
by: Richard | last post by:
Hi, I'd like to add a custom action to my installer project and I would like that custom action to be an entry point into a C# DLL. I have read and understand how to add a custom action to an installer, but I can't for the life of me find an example of specifying an entry point into a C# dll as the entry point... Aka - What the heck do I put for the "entry point" in my custom action? Is there aspecific call signature that my method...
4
1995
by: Rob R. Ainscough | last post by:
The task is brain dead simple - Uninstall prior Windows Service and Install newer version of Windows Service Background: 1. My Windows Service written in .NET 1.1 and deployed via MSI (Windows Installer) 2. My Windows Service is upgraded to .NET 2.0 with deployment project using MSI (Windows Installer) Upgrade code is the same from the .NET 1.1 version to the .NET 2.0 version
1
1557
by: douglass_davis | last post by:
I am making a VB 2005 app, and I have another installation question. :-) Have you ever had to use the windows installer instead of clickonce installation? I read an article that says you have to use the windows installer when you have a "complex" installation. What does that mean? Specifically, what type of complexities would force you to use the windows installer instead of ClickOnce?
0
7954
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8259
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8016
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
5836
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5415
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3905
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2391
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1218
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.