Mankalas

Hi!

A little problem with the rollback custom action. I created a new project "Class Library", added a new "Installer Class" to it, implemented some methods and put this project in my solution, which contains the code of my application. I also used the Primary Output of this project as a custom action for Install, Rollback and Uninstall. To resume, the standard (as I read) procedure to add custom actions.

Here is the code I use in my Installer Class:


namespace DKChangeACL
{
[RunInstaller(true)]
public partial class DKChangeACL : Installer
{
public DKChangeACL()
{
InitializeComponent();
}

public override void Install(System.Collections.IDictionary stateSaver)
{
base.Install(stateSaver);
}

public override void Rollback(System.Collections.IDictionary savedState)
{
base.Rollback(savedState);
}

public override void Uninstall(System.Collections.IDictionary savedState)
{
base.Uninstall(savedState);
}
}
}

Can't be simpler... I follow the steps described in the test case 23, the failure is hit, the installer rolls back, but I always find a file T*.tmp file, which appears to be a binary file, in the [ProgramFiles]\[ProductName] directory. When I open it with a text editor, I can find some strings like "This program cannot be run in DOS mode." or "DKChangeACL.dll DKChangeACL System.Configuration.Install Installer System System.ComponentModel IContainer components Dispose InitializeComponent .ctor mscorlib System.Collections IDictionary Install" etc...

It only appears when I use the Primary Output of the Class Library project in the Rollback Action, and I tried that with a empty project, this .tmp file is still here!

I don't know where this file comes from, but it makes my application fail this test case.

Has anyone encountered a problem like this


Re: Application Compatibility for Windows Vista Test case 23 - Rollback and custom actions

Bruce N. Baker - MSFT

Start by looking for errors in the msi log.




Re: Application Compatibility for Windows Vista Test case 23 - Rollback and custom actions

Mankalas

Here is the interesting (I think) part of the log:

---

MSI (s) (74:28) [16:36:37:671]: Executing op: SetTargetFolder(Folder=C:\Program Files\DataKraft\)

MSI (s) (74:28) [16:36:37:671]: Executing op: FileRemove(,FileName=C:\Program Files\DataKraft\DKChangeACL.dll,,)

MSI (s) (74:28) [16:36:37:671]: Note: 1: 1321 2: C:\Program Files\DataKraft\DKChangeACL.dll

MSI (s) (74:28) [16:36:37:671]: Verifying accessibility of file: DKChangeACL.dll

MSI (s) (74:28) [16:36:37:750]: Note: 1: 2262 2: Error 3: -2147287038

Info 1903. Scheduling reboot operation: Deleting file C:\Program Files\DataKraft\TBD2E5.tmp. Must reboot to complete operation.

---

I think its trying to erase DKChangeACL.dll while this dll is still in use (that's normal because it contains the custom actions).

Any idea please




Re: Application Compatibility for Windows Vista Test case 23 - Rollback and custom actions

Bruce N. Baker - MSFT

I'm not a guru on custom actions so you might find a windows installer group to ping with this question. Are you creating any files yourself in your custom action BTW, requiring a reboot could potentially be an issue for logo cert. Check your MSI for ForceReboot in Test Case 24.




Re: Application Compatibility for Windows Vista Test case 23 - Rollback and custom actions

Mankalas

Well, I discussed with some people of Microsoft and I was told that this .tmp file that disappears after reboot is a OS issue.




Re: Application Compatibility for Windows Vista Test case 23 - Rollback and custom actions

paren

Hi, i have the same issue,
this is a logo violation






Re: Application Compatibility for Windows Vista Test case 23 - Rollback and custom actions

Danilka

.tmp files disappear after reboot OS, but your program folder doesn't.

Any ideas





Re: Application Compatibility for Windows Vista Test case 23 - Rollback and custom actions

Bruce N. Baker - MSFT

Did you leave files in your program folder The folder won't get removed if you leave files in it. Do you have custom actions If yes then examine them. Look in the MSI log for what actually happened.




Re: Application Compatibility for Windows Vista Test case 23 - Rollback and custom actions

Danilka

I am using Custom actions. when Installer does Rollback, it removes all installed previously files. After that Installer leaves *.tmp file in the [Program name] directory.

I am using Visual Studio 2005.





Re: Application Compatibility for Windows Vista Test case 23 - Rollback and custom actions

Danilka

I looked through log file. And found out that rows in log file with "... *.tmp" have path like this: "F:\Users\LOGOAD~1\AppData\Local\Temp\"

But there is a *.tmp file in the "C:\Program files\..." after Rollback.





Re: Application Compatibility for Windows Vista Test case 23 - Rollback and custom actions

Bruce N. Baker - MSFT

Are there any files left your program files\<yourapp> directory




Re: Application Compatibility for Windows Vista Test case 23 - Rollback and custom actions

Danilka

There is only one file in that folder

"V:\Program Files\<Manufacturer>\<MyApplication>" after Rollback or after Installation (If during installation there was an exception). And that file is *.tmp, which will be removed by OS after rebooting.

And the folder "V:\Program Files\<Manufacturer>\<MyApplication>" is empty after all manipulations.




Re: Application Compatibility for Windows Vista Test case 23 - Rollback and custom actions

Danilka

I have the same problem that Mankalas has.

Info 1903. Scheduling reboot operation: Deleting file C:\Program Files\<Manufacturer>\<Program Name>\TBD2E5.tmp. Must reboot to complete operation.

It's the only test that our Installer fails. Who can solve this problem





Re: Application Compatibility for Windows Vista Test case 23 - Rollback and custom actions

Bruce N. Baker - MSFT

Ok, it sounds like the file is there when the folder is deleted so therefore upon reboot and removal of the file, the folder does not get removed.

It is OK to have the file removed after a reboot. Note that when you submit.

As far as the folder, Double check your custom action for the order things and see if you missed anything. In the meantime, I'll see if there's any information related to this.

BTW, do you anything the expliclty removed your file in program files or are you expecting the install to automatically remove it






Re: Application Compatibility for Windows Vista Test case 23 - Rollback and custom actions

Danilka

we test our installation. it's a miracle Smile. Installer class is designed in *.dll. This DLL creates in the same folder as our application.

When Installer wants to rollback, it can't get an access to this file(DLL) to do something (I suppose to delete it). Make an error, writes an error to TMP file and exits. so we make the installer to extract to another folder (AppData of the user). and now if there is an error during the installation TMP files creates in that AppData folder, and after reboot this file is removed by OS.

It not the way to solve this problem, but I don't know what to think. Even Visual Studio doesn't support all requirments for Vista Certified.

if someone solves this problem, let me know.

Thanks