Page 1 of 1

Apply install error: Protected system file

Posted: Mon Jun 25, 2012 1:58 am
by Feyh
Hey there,

I've encountered the next problem :(

My project installs several .dll-files. I want my files to overwrite the already exisiting ones only when the version of my files is the same or newer than the other ones. That should work because that's the usual behaviour of IA.
But when it comes to the "Apply install" command my installer shows an error message:
"Error. The windows-installer-service can't install the systemfile \system32\my.dll since it is protected by Windows. You probably have to update your operating system to run this program."
Anyway, In my testinvironment (Windows XP Prof. 32bit SP3) my program is running without problems (even in the case that my .dll is newer than the already existing one). But i'm not sure if this will also work on other systems. And that error message is annoying =<.

I found something about the "Windows file protection" in some other threads here. Deactivating and reactivating after my installation should handle my problem. But is it recommended to do this? And how can i do this? Is there an alternative way to handle this?

Someone got an idea?

Greetings
Feyh

PS: I'm sure that FrancescoT can solve this :P

Re: Apply install error: Protected system file

Posted: Mon Jun 25, 2012 8:18 am
by FrancescoT
Dear Feyh,

As can you imagine, this happens because a process is still using the dll.

First of all I would like to know if this dll could be used with other process or just your app uses it.

Then have you tried to test what happens if you cancel the installation (when the error occurs), restart your system and then repeat the installation again?

For what you said, I suppose that a previous version of your application is already installed.
Have you observed if this happens even when your application has not been executed at all before launching you install?

let me know.

PS: I am Francesco and I'm not quite sure that FrancescoT can solve everythings :roll:

Re: Apply install error: Protected system file

Posted: Mon Jun 25, 2012 11:16 pm
by Feyh
Hey Francesco,

thanks for your reply.

To answer your questions:
1.
- scrrnde.dll
- scrrun.dll
those are the two files which cause problems.
But even if they are used by other programs, IA should detect that and say, that it need a restart to replace them or something.
EDIT:
It seems that i can install those 2 files with the visual basic 6 runtime.


2.
Tried the thing with the restart now, but still the same error occurs :(

3.
Yes, i used a clean system to test my IA installation. Still the same error occurs.

Greetings
Feyh

PS: Don't be so shy ;) Until now u helped me with all of my problems, and everytime u got the right solution! :wink:
PS2: I had some bad experience with some usernames in other forums, so i'm pretty careful when i approach someone with his username :lol:

Re: Apply install error: Protected system file

Posted: Tue Jun 26, 2012 8:28 am
by FrancescoT
Dear Feyh,

I have done a quick google search about these runtime dlls (... I am totally not an expert of VB).

Windows Vista and Windows 7 already come with Windows Script runtime 5.7 installed.

So I suggest you to not replace these already available files that are part of the above OSs ( ... it not so safe).
Install the runtimes dlls only with systems that not have these already installed.

This behaviour can easly implemented via script checking the target OS during execution.

I really hope I have met your expectations!

Regards

Re: Apply install error: Protected system file

Posted: Tue Jun 26, 2012 10:19 pm
by Feyh
Hey Francesco,

thank you. You found things on google I was not able to find :(

Well ok, i think it's way better when i just install the VB runtime which is delivered by IA. This runtime installs the minimum version of the files that i need.

Thanks again for your help and your time, and yes, you've met my expectations!

I've got one additional question:
Does IA create a (readable) logfile which contains everything that was changed during the installation? If yes, where?
As far as i know Wise created a normal .txt-File with all the changes made during the installation.

Greetings
Feyh

Re: Apply install error: Protected system file

Posted: Wed Jun 27, 2012 8:02 am
by FrancescoT
Dear Feyh,

You can use log option from command line; <setup.exe> /l=<fullpath to log file>

or using the pre-defined variable LOGGED (Set to a valid path name to enable logging from script).

If you prefer you could create your customized log file using Write to Text File command.

Regards