1001 Could Not Find File .installstate Rating: 6,8/10 9254 reviews

Apr 10, 2007 - The error above was copied from the log file found in the%temp% folder. The InstallState file based on the new dll's name and doesn't get.

Issue:

An MSI file built on Visual Studio fails during an installation with an error message

Find

Error 1001. Exception occurred while initializing the installation: Black economy india arun kumar pdf.

System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:WINDOWSsystem32<file name>' or one of its dependencies. The system cannot find the file specified.

Cause:

This would happen when the syntax of a ‘CustomActionData property’ for a Custom Action is incorrectly defined in the MSI.

Example: /target=”[TARGETDIR]”; /source= “[SOURCEDIR]”

Resolution:

When you are installing a Custom Action as an installation component or the project installer classes the CustomActionData Property should be in the format of /name=value. If the value is a Windows installer property it should be passed as /name=[PROPERTYNAME]and if the property returns a directory the syntax should be /name=”[PROPERTYNAME]” .

Follow the below steps to resolve the issue.

1. We have to find out in which Custom Action the syntax has been defined incorrectly and for this we should generate a log file of the MSI installation. Follow the article http://support.microsoft.com/kb/223300 to generate a MSI log file.

2. Search for text ‘value 3’ in the log file. This is the return value for a failed action in an MSI.

3. Copy the custom action name which returned value 3.

4. Edit the MSI file using a MSI editor like Orca and search for the “%Custom Action%.SetProperty” in the Custom Action table. (%Custom Action% is the failed custom action name copied from the log file)

5. Choose the Target column in the row of “%Custom Action%.SetProperty” and seeif there are any windows installer properties which return directories are given as values of a CustomActionData Property as mentioned above.

6. Make sure that all such values are following the syntax as /name=”[PROPERTYNAME]” .

Example: /target=”[TARGETDIR]” , /source=”[SOURCEDIR]”.

After correcting the syntax CustomActionData Property the MSI shouldn’t throw the above error message anymore.

Content by : Sarat Chandra

Hi, I had a problem in updating app.config file during upgrade install(with VS2008). And with the help of the information found here in this forum and other links I solved the issue of copying new files during upgrade install which required me to make changes so that the msi from VS2008 works like the one from VS2005. And referring to the link I modified my msbuild.xml and added: This works fine for me but there is one problem in reinstall to another folder and do a repair. The scenario is as follows: 1. Install ver1.0 into default folder.

(C: Program Files MyService) - I can see Myservice.service.Installer.Installstate in the folder. Install ver2.0 into another folder (C: temp MyDir) - Myservice.service.Installer.Installstate is not found. Now I removed few files from C: temp MyDir folder and run the setup for ver2.0. I get a repair option from the installer UI. The repair process starts and fails to complete. I get an error: Error 1001:Could not find file C: temp MyDir Myservice.service.Installer.Installstate. I am not able to figure out why the.installstate file was not created in the installation I did to another directory.

Is there anything wrong in the way I am running the SQL query to modify the RemoveExistingProducts? I have to basically solve the upgrade install issue to replace the latest app.config file using VS2008 installer. Any help on this regard will be greatly appreciated. Thanks, Maddy.

Hi Kira, I was able to solve the actual problem. What I did is, in OnCommit event handler of the service installer I forcefully set the created and modified date as current time(SetCreateddate API in C#) for the Config file which is installed in the Install directory.

By doing this I can easily make the installer feel that the current config file that is installed is of older date and always copy the new config file on every install. Thus I got rid of all the issues including the issues I had with.installstate file. Because to update the config file on reinstall I need not change the behavior of VS2008 installer to VS2005 way which was suggested in other forums.

Thank you for all the inputs and tips provided by you. Thanks again, Maddy. Hello Maddy, It confuses me why you want to change msbuild.xml. Do you want to install new version without uninstall the old one? If so the RemovePreviousVersions property can meet this need. Here is the document about it.

If you have any problem with msbuild, you can post the question on msbuild forum. Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Welcome to the. Kira Qian, Thank you for your reply. I have actually set the RemovePreviousVersions Property to TRUE, and as mentioned in some of the earlier discussions on this forum I used the information from and made changes to my build process. The problem is definitely not with msbuild, I am just specifying to change the order of RemoveExistingProducts in my postbuild event.

That solves my upgrade install problem. But the service.installer.installstate file is not copied during the upgrade install,this is the issue I am facing.

I am really stuck up from long time, please let me know if anybody has any information on the error: Service.Installer.Installstate not found. Thanks, Maddy. Hello Maddy, I think I still need your project to reproduce the issue.

I have tested the situation but it cannot be reproduced on my side. If you don’t mind, please make a simple setup project which can reproduce it and let me to test. You can upload it to the skydrive or email to me (kiraqian@hotmail.com). Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the. Hello Kira Qian, The project is too huge, I will create a small prototype of it and will send. The complete scenario is like this: 1.

I have to create a setup project which installs a windows service on my XP machine. I use VS2008 to create the windows service and create the installer files(msi and setup.exe) 3. There was a bug reprted by my test team saying that they cannot see the updated app.config file after upgrading the software to higher version. I found out that this was the case with the way VS2008 installer updates the files based on version information of files to update. Since text and data files donot have version info they are not being updated. I changed the behaviour of the installer to work as VS2005 by adding the following commands to postbuild event of my installer project. Delete from InstallExecuteSequence where InstallExecuteSequence.Action = InstallExecute - Update InstallExecuteSequence Set InstallExecuteSequence.Sequence=1525 where InstallExecuteSequence.Action = RemoveExistingProducts.

Till here everything works fine. But there is a test case like this: 1. Install version1.0 of the software to C: v1.0 folder 2. Install version2.0 of the software to D: v2.0 folder. The software is upgraded and the service is also installed and working fine.

Now go to D: v2.0 folder and delete some dlls that the service uses. Then run the setup for v2.0, you get an option from installer to Remove or Repair the software. I select Repair option and get the error as Error 1001:Could not find file D: v2.0 Myservice.Service.Installer.Installstate. After so much of debugging I found out that the missing file is actually being created in C: v1.0 folder which should have actually been created in D: v2.0!! This is very much confusing me. I found in some discussions that this is a bug in VS2005 installer!

Please let me know your suggestions. Thanks, Maddy. Hello Maddy, When I test this issue, I created a very simple WindowsService (WindowsService1 do nothing) and add a txt file.

When I upgraded my application from v1.0 to v2.0, I also made some changes to txt file. When I install v2.0, I saw the txt file was also updated. So that is why I say it cannot be reproduced on my side. Did you change the file content inside VS designer? Does the file’s Permanent property set to false? Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the.

Hi Kira, I am facing the issue as discussed in this link:. I have a service project which creates a service exe for me. Another project creates the setup.exe and msi file which installs the service on my PC. Now, when I install the second version of the product the changes made in the app.config are not seen in the new exe.config file. The above link I provided has the discussion around the same problem but I could not extract the solution from that discussions.

It looks like the way VS2008 installer work is different than the VS2005 installers worked. The update of data files is not possible with VS2008 installer unless we make them work like VS2005 install work flow(uninstall local copy and then install). I also found in another link somebody suggesting to change to include custom option to set the create date to be 'today', discussed here- Can you please tell me how to add a custom option to set the create date to be 'today'?? I am stuck up for a long time, please give me some ideas.

Thank you for all the support, Maddy. Hi Maddy, The author's question description on that thread is too hard to be understood. The 'file' attribute is new to the config file with this new installer. The problem I'm running into is that if we modify the Client.exe.config file on an old installation, then run the new installer, the config file never gets updated with the 'file' attribute.

But the answer to that thread seems to be a good suggestion. Include a custom action that modifies the file in place. This might be a script or.NET code. That mean you can use custom action to change the content of that xml file.

Write the new line into it with C# code (System.IO namespace offer file read and write class). The second suggestion is not easy to implement. Nonversioned Files are User Data—If the Modified date is later than the Create date for the file on the computer, do not install the file because user customizations would be deleted.

If the Modified and Create dates are the same, install the file. If the Create date is later than the Modified date, the file is considered unmodified, install the file. I think this is the reason why it cannot be reproduced on my side. When I install v2.0, v1.0 config file has not been modified so it got updated. So run a script to change file attribute to cheat system the file has not been modified.

That also doesn’t seem to be a good suggestion. So I think use custom action to modify the existed config file is a good suggestion. Do you have problem with custom action? Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Welcome to the. Hi Maddy, You can create a txt file with all the text of config file. Add that txt file to the setup project so it can be published to the user’s computer. Here is a very useful link which shows you the step to create custom action (Installer class).

(Use its steps do not use its code ) Follow the steps, now you have created an Installer class. You can handle the Committed event like the article to READ text from txt file and WRITE into config file.

( Using File.ReadAllText and File.WriteAllText methods ) After you finish the installation, the config file has been updated. Do you have any problem with this?

Hed kandi the mix 2013 rare. Remix –, 6:06 2-07 – 4:50 2-08 – Pres.

Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the. Hi Kira, Thanks for the inputs. I am sorry the problem is still not fixed.

I already have installer project which has custom condition as NOT Installed OR PREVIOUSVERSIONSINSTALLED for Install custom action. But the app.config file is not gettting updating on reinstall. I tried using File.SetCreationTime to set the time as current datetime in the commit event handler but still didnt work. Any ideas as to how can I update the config file in the installer? I guess lot of people using VS2008 to create installers are facing the same problem. Thanks, Maddy. Hello Maddy, Please download the solution code from my skydrive.

This solution works properly on my side. I am not sure what the difference between yours and mine is. Please make sure the custom action you have added is run after install. You can put some MessageBox.Show to know if it is run. Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Welcome to the. Hi Kira, I was able to solve the actual problem. What I did is, in OnCommit event handler of the service installer I forcefully set the created and modified date as current time(SetCreateddate API in C#) for the Config file which is installed in the Install directory. By doing this I can easily make the installer feel that the current config file that is installed is of older date and always copy the new config file on every install. Thus I got rid of all the issues including the issues I had with.installstate file.

Because to update the config file on reinstall I need not change the behavior of VS2008 installer to VS2005 way which was suggested in other forums. Thank you for all the inputs and tips provided by you. Thanks again, Maddy.

Apr 10, 2007 - The error above was copied from the log file found in the%temp% folder. The InstallState file based on the new dll's name and doesn't get.

Issue:

An MSI file built on Visual Studio fails during an installation with an error message

Find

Error 1001. Exception occurred while initializing the installation: Black economy india arun kumar pdf.

System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:WINDOWSsystem32<file name>' or one of its dependencies. The system cannot find the file specified.

Cause:

This would happen when the syntax of a ‘CustomActionData property’ for a Custom Action is incorrectly defined in the MSI.

Example: /target=”[TARGETDIR]”; /source= “[SOURCEDIR]”

Resolution:

When you are installing a Custom Action as an installation component or the project installer classes the CustomActionData Property should be in the format of /name=value. If the value is a Windows installer property it should be passed as /name=[PROPERTYNAME]and if the property returns a directory the syntax should be /name=”[PROPERTYNAME]” .

Follow the below steps to resolve the issue.

1. We have to find out in which Custom Action the syntax has been defined incorrectly and for this we should generate a log file of the MSI installation. Follow the article http://support.microsoft.com/kb/223300 to generate a MSI log file.

2. Search for text ‘value 3’ in the log file. This is the return value for a failed action in an MSI.

3. Copy the custom action name which returned value 3.

4. Edit the MSI file using a MSI editor like Orca and search for the “%Custom Action%.SetProperty” in the Custom Action table. (%Custom Action% is the failed custom action name copied from the log file)

5. Choose the Target column in the row of “%Custom Action%.SetProperty” and seeif there are any windows installer properties which return directories are given as values of a CustomActionData Property as mentioned above.

6. Make sure that all such values are following the syntax as /name=”[PROPERTYNAME]” .

Example: /target=”[TARGETDIR]” , /source=”[SOURCEDIR]”.

After correcting the syntax CustomActionData Property the MSI shouldn’t throw the above error message anymore.

Content by : Sarat Chandra

Hi, I had a problem in updating app.config file during upgrade install(with VS2008). And with the help of the information found here in this forum and other links I solved the issue of copying new files during upgrade install which required me to make changes so that the msi from VS2008 works like the one from VS2005. And referring to the link I modified my msbuild.xml and added: This works fine for me but there is one problem in reinstall to another folder and do a repair. The scenario is as follows: 1. Install ver1.0 into default folder.

(C: Program Files MyService) - I can see Myservice.service.Installer.Installstate in the folder. Install ver2.0 into another folder (C: temp MyDir) - Myservice.service.Installer.Installstate is not found. Now I removed few files from C: temp MyDir folder and run the setup for ver2.0. I get a repair option from the installer UI. The repair process starts and fails to complete. I get an error: Error 1001:Could not find file C: temp MyDir Myservice.service.Installer.Installstate. I am not able to figure out why the.installstate file was not created in the installation I did to another directory.

Is there anything wrong in the way I am running the SQL query to modify the RemoveExistingProducts? I have to basically solve the upgrade install issue to replace the latest app.config file using VS2008 installer. Any help on this regard will be greatly appreciated. Thanks, Maddy.

Hi Kira, I was able to solve the actual problem. What I did is, in OnCommit event handler of the service installer I forcefully set the created and modified date as current time(SetCreateddate API in C#) for the Config file which is installed in the Install directory.

By doing this I can easily make the installer feel that the current config file that is installed is of older date and always copy the new config file on every install. Thus I got rid of all the issues including the issues I had with.installstate file. Because to update the config file on reinstall I need not change the behavior of VS2008 installer to VS2005 way which was suggested in other forums.

Thank you for all the inputs and tips provided by you. Thanks again, Maddy. Hello Maddy, It confuses me why you want to change msbuild.xml. Do you want to install new version without uninstall the old one? If so the RemovePreviousVersions property can meet this need. Here is the document about it.

If you have any problem with msbuild, you can post the question on msbuild forum. Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Welcome to the. Kira Qian, Thank you for your reply. I have actually set the RemovePreviousVersions Property to TRUE, and as mentioned in some of the earlier discussions on this forum I used the information from and made changes to my build process. The problem is definitely not with msbuild, I am just specifying to change the order of RemoveExistingProducts in my postbuild event.

That solves my upgrade install problem. But the service.installer.installstate file is not copied during the upgrade install,this is the issue I am facing.

I am really stuck up from long time, please let me know if anybody has any information on the error: Service.Installer.Installstate not found. Thanks, Maddy. Hello Maddy, I think I still need your project to reproduce the issue.

I have tested the situation but it cannot be reproduced on my side. If you don’t mind, please make a simple setup project which can reproduce it and let me to test. You can upload it to the skydrive or email to me (kiraqian@hotmail.com). Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the. Hello Kira Qian, The project is too huge, I will create a small prototype of it and will send. The complete scenario is like this: 1.

I have to create a setup project which installs a windows service on my XP machine. I use VS2008 to create the windows service and create the installer files(msi and setup.exe) 3. There was a bug reprted by my test team saying that they cannot see the updated app.config file after upgrading the software to higher version. I found out that this was the case with the way VS2008 installer updates the files based on version information of files to update. Since text and data files donot have version info they are not being updated. I changed the behaviour of the installer to work as VS2005 by adding the following commands to postbuild event of my installer project. Delete from InstallExecuteSequence where InstallExecuteSequence.Action = InstallExecute - Update InstallExecuteSequence Set InstallExecuteSequence.Sequence=1525 where InstallExecuteSequence.Action = RemoveExistingProducts.

Till here everything works fine. But there is a test case like this: 1. Install version1.0 of the software to C: v1.0 folder 2. Install version2.0 of the software to D: v2.0 folder. The software is upgraded and the service is also installed and working fine.

Now go to D: v2.0 folder and delete some dlls that the service uses. Then run the setup for v2.0, you get an option from installer to Remove or Repair the software. I select Repair option and get the error as Error 1001:Could not find file D: v2.0 Myservice.Service.Installer.Installstate. After so much of debugging I found out that the missing file is actually being created in C: v1.0 folder which should have actually been created in D: v2.0!! This is very much confusing me. I found in some discussions that this is a bug in VS2005 installer!

Please let me know your suggestions. Thanks, Maddy. Hello Maddy, When I test this issue, I created a very simple WindowsService (WindowsService1 do nothing) and add a txt file.

When I upgraded my application from v1.0 to v2.0, I also made some changes to txt file. When I install v2.0, I saw the txt file was also updated. So that is why I say it cannot be reproduced on my side. Did you change the file content inside VS designer? Does the file’s Permanent property set to false? Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the.

Hi Kira, I am facing the issue as discussed in this link:. I have a service project which creates a service exe for me. Another project creates the setup.exe and msi file which installs the service on my PC. Now, when I install the second version of the product the changes made in the app.config are not seen in the new exe.config file. The above link I provided has the discussion around the same problem but I could not extract the solution from that discussions.

It looks like the way VS2008 installer work is different than the VS2005 installers worked. The update of data files is not possible with VS2008 installer unless we make them work like VS2005 install work flow(uninstall local copy and then install). I also found in another link somebody suggesting to change to include custom option to set the create date to be 'today', discussed here- Can you please tell me how to add a custom option to set the create date to be 'today'?? I am stuck up for a long time, please give me some ideas.

Thank you for all the support, Maddy. Hi Maddy, The author's question description on that thread is too hard to be understood. The 'file' attribute is new to the config file with this new installer. The problem I'm running into is that if we modify the Client.exe.config file on an old installation, then run the new installer, the config file never gets updated with the 'file' attribute.

But the answer to that thread seems to be a good suggestion. Include a custom action that modifies the file in place. This might be a script or.NET code. That mean you can use custom action to change the content of that xml file.

Write the new line into it with C# code (System.IO namespace offer file read and write class). The second suggestion is not easy to implement. Nonversioned Files are User Data—If the Modified date is later than the Create date for the file on the computer, do not install the file because user customizations would be deleted.

If the Modified and Create dates are the same, install the file. If the Create date is later than the Modified date, the file is considered unmodified, install the file. I think this is the reason why it cannot be reproduced on my side. When I install v2.0, v1.0 config file has not been modified so it got updated. So run a script to change file attribute to cheat system the file has not been modified.

That also doesn’t seem to be a good suggestion. So I think use custom action to modify the existed config file is a good suggestion. Do you have problem with custom action? Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Welcome to the. Hi Maddy, You can create a txt file with all the text of config file. Add that txt file to the setup project so it can be published to the user’s computer. Here is a very useful link which shows you the step to create custom action (Installer class).

(Use its steps do not use its code ) Follow the steps, now you have created an Installer class. You can handle the Committed event like the article to READ text from txt file and WRITE into config file.

( Using File.ReadAllText and File.WriteAllText methods ) After you finish the installation, the config file has been updated. Do you have any problem with this?

Hed kandi the mix 2013 rare. Remix –, 6:06 2-07 – 4:50 2-08 – Pres.

Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the. Hi Kira, Thanks for the inputs. I am sorry the problem is still not fixed.

I already have installer project which has custom condition as NOT Installed OR PREVIOUSVERSIONSINSTALLED for Install custom action. But the app.config file is not gettting updating on reinstall. I tried using File.SetCreationTime to set the time as current datetime in the commit event handler but still didnt work. Any ideas as to how can I update the config file in the installer? I guess lot of people using VS2008 to create installers are facing the same problem. Thanks, Maddy. Hello Maddy, Please download the solution code from my skydrive.

This solution works properly on my side. I am not sure what the difference between yours and mine is. Please make sure the custom action you have added is run after install. You can put some MessageBox.Show to know if it is run. Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Welcome to the. Hi Kira, I was able to solve the actual problem. What I did is, in OnCommit event handler of the service installer I forcefully set the created and modified date as current time(SetCreateddate API in C#) for the Config file which is installed in the Install directory. By doing this I can easily make the installer feel that the current config file that is installed is of older date and always copy the new config file on every install. Thus I got rid of all the issues including the issues I had with.installstate file.

Because to update the config file on reinstall I need not change the behavior of VS2008 installer to VS2005 way which was suggested in other forums. Thank you for all the inputs and tips provided by you. Thanks again, Maddy.

...">1001 Could Not Find File .installstate(04.02.2020)
  • 1001 Could Not Find File .installstate Rating: 6,8/10 9254 reviews
  • Apr 10, 2007 - The error above was copied from the log file found in the%temp% folder. The InstallState file based on the new dll's name and doesn't get.

    Issue:

    An MSI file built on Visual Studio fails during an installation with an error message

    Find

    Error 1001. Exception occurred while initializing the installation: Black economy india arun kumar pdf.

    System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:WINDOWSsystem32<file name>' or one of its dependencies. The system cannot find the file specified.

    Cause:

    This would happen when the syntax of a ‘CustomActionData property’ for a Custom Action is incorrectly defined in the MSI.

    Example: /target=”[TARGETDIR]”; /source= “[SOURCEDIR]”

    Resolution:

    When you are installing a Custom Action as an installation component or the project installer classes the CustomActionData Property should be in the format of /name=value. If the value is a Windows installer property it should be passed as /name=[PROPERTYNAME]and if the property returns a directory the syntax should be /name=”[PROPERTYNAME]” .

    Follow the below steps to resolve the issue.

    1. We have to find out in which Custom Action the syntax has been defined incorrectly and for this we should generate a log file of the MSI installation. Follow the article http://support.microsoft.com/kb/223300 to generate a MSI log file.

    2. Search for text ‘value 3’ in the log file. This is the return value for a failed action in an MSI.

    3. Copy the custom action name which returned value 3.

    4. Edit the MSI file using a MSI editor like Orca and search for the “%Custom Action%.SetProperty” in the Custom Action table. (%Custom Action% is the failed custom action name copied from the log file)

    5. Choose the Target column in the row of “%Custom Action%.SetProperty” and seeif there are any windows installer properties which return directories are given as values of a CustomActionData Property as mentioned above.

    6. Make sure that all such values are following the syntax as /name=”[PROPERTYNAME]” .

    Example: /target=”[TARGETDIR]” , /source=”[SOURCEDIR]”.

    After correcting the syntax CustomActionData Property the MSI shouldn’t throw the above error message anymore.

    Content by : Sarat Chandra

    Hi, I had a problem in updating app.config file during upgrade install(with VS2008). And with the help of the information found here in this forum and other links I solved the issue of copying new files during upgrade install which required me to make changes so that the msi from VS2008 works like the one from VS2005. And referring to the link I modified my msbuild.xml and added: This works fine for me but there is one problem in reinstall to another folder and do a repair. The scenario is as follows: 1. Install ver1.0 into default folder.

    (C: Program Files MyService) - I can see Myservice.service.Installer.Installstate in the folder. Install ver2.0 into another folder (C: temp MyDir) - Myservice.service.Installer.Installstate is not found. Now I removed few files from C: temp MyDir folder and run the setup for ver2.0. I get a repair option from the installer UI. The repair process starts and fails to complete. I get an error: Error 1001:Could not find file C: temp MyDir Myservice.service.Installer.Installstate. I am not able to figure out why the.installstate file was not created in the installation I did to another directory.

    Is there anything wrong in the way I am running the SQL query to modify the RemoveExistingProducts? I have to basically solve the upgrade install issue to replace the latest app.config file using VS2008 installer. Any help on this regard will be greatly appreciated. Thanks, Maddy.

    Hi Kira, I was able to solve the actual problem. What I did is, in OnCommit event handler of the service installer I forcefully set the created and modified date as current time(SetCreateddate API in C#) for the Config file which is installed in the Install directory.

    By doing this I can easily make the installer feel that the current config file that is installed is of older date and always copy the new config file on every install. Thus I got rid of all the issues including the issues I had with.installstate file. Because to update the config file on reinstall I need not change the behavior of VS2008 installer to VS2005 way which was suggested in other forums.

    Thank you for all the inputs and tips provided by you. Thanks again, Maddy. Hello Maddy, It confuses me why you want to change msbuild.xml. Do you want to install new version without uninstall the old one? If so the RemovePreviousVersions property can meet this need. Here is the document about it.

    If you have any problem with msbuild, you can post the question on msbuild forum. Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Welcome to the. Kira Qian, Thank you for your reply. I have actually set the RemovePreviousVersions Property to TRUE, and as mentioned in some of the earlier discussions on this forum I used the information from and made changes to my build process. The problem is definitely not with msbuild, I am just specifying to change the order of RemoveExistingProducts in my postbuild event.

    That solves my upgrade install problem. But the service.installer.installstate file is not copied during the upgrade install,this is the issue I am facing.

    I am really stuck up from long time, please let me know if anybody has any information on the error: Service.Installer.Installstate not found. Thanks, Maddy. Hello Maddy, I think I still need your project to reproduce the issue.

    I have tested the situation but it cannot be reproduced on my side. If you don’t mind, please make a simple setup project which can reproduce it and let me to test. You can upload it to the skydrive or email to me (kiraqian@hotmail.com). Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the. Hello Kira Qian, The project is too huge, I will create a small prototype of it and will send. The complete scenario is like this: 1.

    I have to create a setup project which installs a windows service on my XP machine. I use VS2008 to create the windows service and create the installer files(msi and setup.exe) 3. There was a bug reprted by my test team saying that they cannot see the updated app.config file after upgrading the software to higher version. I found out that this was the case with the way VS2008 installer updates the files based on version information of files to update. Since text and data files donot have version info they are not being updated. I changed the behaviour of the installer to work as VS2005 by adding the following commands to postbuild event of my installer project. Delete from InstallExecuteSequence where InstallExecuteSequence.Action = InstallExecute - Update InstallExecuteSequence Set InstallExecuteSequence.Sequence=1525 where InstallExecuteSequence.Action = RemoveExistingProducts.

    Till here everything works fine. But there is a test case like this: 1. Install version1.0 of the software to C: v1.0 folder 2. Install version2.0 of the software to D: v2.0 folder. The software is upgraded and the service is also installed and working fine.

    Now go to D: v2.0 folder and delete some dlls that the service uses. Then run the setup for v2.0, you get an option from installer to Remove or Repair the software. I select Repair option and get the error as Error 1001:Could not find file D: v2.0 Myservice.Service.Installer.Installstate. After so much of debugging I found out that the missing file is actually being created in C: v1.0 folder which should have actually been created in D: v2.0!! This is very much confusing me. I found in some discussions that this is a bug in VS2005 installer!

    Please let me know your suggestions. Thanks, Maddy. Hello Maddy, When I test this issue, I created a very simple WindowsService (WindowsService1 do nothing) and add a txt file.

    When I upgraded my application from v1.0 to v2.0, I also made some changes to txt file. When I install v2.0, I saw the txt file was also updated. So that is why I say it cannot be reproduced on my side. Did you change the file content inside VS designer? Does the file’s Permanent property set to false? Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the.

    Hi Kira, I am facing the issue as discussed in this link:. I have a service project which creates a service exe for me. Another project creates the setup.exe and msi file which installs the service on my PC. Now, when I install the second version of the product the changes made in the app.config are not seen in the new exe.config file. The above link I provided has the discussion around the same problem but I could not extract the solution from that discussions.

    It looks like the way VS2008 installer work is different than the VS2005 installers worked. The update of data files is not possible with VS2008 installer unless we make them work like VS2005 install work flow(uninstall local copy and then install). I also found in another link somebody suggesting to change to include custom option to set the create date to be 'today', discussed here- Can you please tell me how to add a custom option to set the create date to be 'today'?? I am stuck up for a long time, please give me some ideas.

    Thank you for all the support, Maddy. Hi Maddy, The author's question description on that thread is too hard to be understood. The 'file' attribute is new to the config file with this new installer. The problem I'm running into is that if we modify the Client.exe.config file on an old installation, then run the new installer, the config file never gets updated with the 'file' attribute.

    But the answer to that thread seems to be a good suggestion. Include a custom action that modifies the file in place. This might be a script or.NET code. That mean you can use custom action to change the content of that xml file.

    Write the new line into it with C# code (System.IO namespace offer file read and write class). The second suggestion is not easy to implement. Nonversioned Files are User Data—If the Modified date is later than the Create date for the file on the computer, do not install the file because user customizations would be deleted.

    If the Modified and Create dates are the same, install the file. If the Create date is later than the Modified date, the file is considered unmodified, install the file. I think this is the reason why it cannot be reproduced on my side. When I install v2.0, v1.0 config file has not been modified so it got updated. So run a script to change file attribute to cheat system the file has not been modified.

    That also doesn’t seem to be a good suggestion. So I think use custom action to modify the existed config file is a good suggestion. Do you have problem with custom action? Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Welcome to the. Hi Maddy, You can create a txt file with all the text of config file. Add that txt file to the setup project so it can be published to the user’s computer. Here is a very useful link which shows you the step to create custom action (Installer class).

    (Use its steps do not use its code ) Follow the steps, now you have created an Installer class. You can handle the Committed event like the article to READ text from txt file and WRITE into config file.

    ( Using File.ReadAllText and File.WriteAllText methods ) After you finish the installation, the config file has been updated. Do you have any problem with this?

    Hed kandi the mix 2013 rare. Remix –, 6:06 2-07 – 4:50 2-08 – Pres.

    Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the. Hi Kira, Thanks for the inputs. I am sorry the problem is still not fixed.

    I already have installer project which has custom condition as NOT Installed OR PREVIOUSVERSIONSINSTALLED for Install custom action. But the app.config file is not gettting updating on reinstall. I tried using File.SetCreationTime to set the time as current datetime in the commit event handler but still didnt work. Any ideas as to how can I update the config file in the installer? I guess lot of people using VS2008 to create installers are facing the same problem. Thanks, Maddy. Hello Maddy, Please download the solution code from my skydrive.

    This solution works properly on my side. I am not sure what the difference between yours and mine is. Please make sure the custom action you have added is run after install. You can put some MessageBox.Show to know if it is run. Sincerely, Kira Qian in Forum If you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Welcome to the. Hi Kira, I was able to solve the actual problem. What I did is, in OnCommit event handler of the service installer I forcefully set the created and modified date as current time(SetCreateddate API in C#) for the Config file which is installed in the Install directory. By doing this I can easily make the installer feel that the current config file that is installed is of older date and always copy the new config file on every install. Thus I got rid of all the issues including the issues I had with.installstate file.

    Because to update the config file on reinstall I need not change the behavior of VS2008 installer to VS2005 way which was suggested in other forums. Thank you for all the inputs and tips provided by you. Thanks again, Maddy.

    ...">1001 Could Not Find File .installstate(04.02.2020)