This setup has worked well until some recent changes. I must have unknowingly changed something that affected the uninstall process but I can't seem to track it down.
Now, when I try to uninstall the product, setup gets stuck or hangs right at the Apply Uninstall line. The progress text actually says "Windows Installer" so I'm assuming that we have handed off the installation at that point. I get no error and the setup never comes back. I let the uninstall run all night and it never came back.
I am trying to step through so I can watch LASTERROR but it never comes back from Windows Installer. Does anyone have any troubleshooting tips for me?
Again, this uninstall was working just fine before a recent round of changes so I'm fairly confident in the order of "Apply" calls and the general logic of the setup. Is it possible that I've corrupted the Windows Installer database with the addition of my last component?
btw - I'm using a VM machine to test so I'm assured that my test platform is clean and identical every time I test the installation.
Hangs at Apply Uninstall Progress says: Windows Installer
Just to add more detail to this...
When the setup is hung at the Windows Installer, Task Manager shows the setup at 50% CPU. It's really busy doing something but it never comes back. I don't know how but it's almost like it's in a loop.
I've gone back to backups of earlier version of this setup and I don't see any difference in the maintenance REMOVE logic. As far as I can tell, the only thing that has changed is the front side of the installation.
When the setup is hung at the Windows Installer, Task Manager shows the setup at 50% CPU. It's really busy doing something but it never comes back. I don't know how but it's almost like it's in a loop.
I've gone back to backups of earlier version of this setup and I don't see any difference in the maintenance REMOVE logic. As far as I can tell, the only thing that has changed is the front side of the installation.
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
InstallAware waits for the Windows Installer mutex to become available at that progress line.
Therefore, if it is waiting there, some background MSI installer is doing something; although it wouldn't take 100% CPU (of one core) doing this so maybe something else really is broken in your setup.
Therefore, if it is waiting there, some background MSI installer is doing something; although it wouldn't take 100% CPU (of one core) doing this so maybe something else really is broken in your setup.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
I tracked down the section of code that is causing this last night. It appears to be in a section where I'm loading values from a custom encrypted config file. I use this to store sensitive connection credentials. I load the values back in whenever there is a maintenance item so they can retain their previous choices.
I really don't understand, yet, what is causing this but I'll follow up with another post when I have pin pointed what the issues is. If I can reproduce it, I'll send this to you in a small app.
I really don't understand, yet, what is causing this but I'll follow up with another post when I have pin pointed what the issues is. If I can reproduce it, I'll send this to you in a small app.
Pinpointed the line that causes this issue
We have created our own utilities dll to encrypt credentials. If I exclude the line that calls this dll, the uninstall/repair works. This include script is called about 20 times in a row to load the encrypted credentials. I'm still trying to determine if there's a specific value that is causing the issue. We ran into a length issue (for a list of email addresses) using string parameters. I think using allocated string buffer resolved that issue for us. Thus, I changed all of parameters to allocated string buffers. I'm wondering if this isn't part of the problem?
Here's the call to our dll.
I'll follow up with more details if I am able to track down the exact value.
Here's the call to our dll.
Code: Select all
~InstallAware Clipboard Data~
~Call DLL Function~
~{0F88785A-D96C-463B-98D6-2F61C117B574}~
~$INSTALLUTILITIESPATH$\\InstallUtilities.dll,ReadConfigFileAppSettings,void,RESULT,"allocated string buffer (MAX_PATH length)",$SETUPCONFIGPATH$,"allocated string buffer (MAX_PATH length)",$ConfigValue$,$~
~mIDEFunc.dll\\mEXEFunc.dll~
I'll follow up with more details if I am able to track down the exact value.
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Passing incorrect parameters, too long values, etc. can corrupt the stack, and lead to all kinds of funny, seemingly random behavior.
You should also post your DLL function header so we can see if it aligns with what you've declared in the plug-in.
You should also post your DLL function header so we can see if it aligns with what you've declared in the plug-in.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
DLL Function Header
Here's the whole read function. The strange thing is that the dll call seems to work perfectly. It loads all of the values and, as far as I can tell, the values all look good.
__declspec(dllexport) void __stdcall ReadConfigFileAppSettings(const char * targetConfig, char * key_value)
{
try
{
System::Configuration::Configuration ^appconfig;
System::Configuration::ExeConfigurationFileMap ^ mapConfig = gcnew System::Configuration::ExeConfigurationFileMap();
mapConfig->ExeConfigFilename = gcnew System::String(targetConfig);
appconfig = System::Configuration::ConfigurationManager::OpenMappedExeConfiguration(mapConfig,System::Configuration::ConfigurationUserLevel::None);
System::String ^key = gcnew System::String(key_value);
System::String ^value = nullptr;
if(appconfig->AppSettings->Settings[key] != nullptr)
{
value = appconfig->AppSettings->Settings[key]->Value;
}
else
{
value = "";
}
System::String ^gckey_value = /*key + "[ValSplit]" + */value;
char* str2 = (char*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(gckey_value).ToPointer();
memset(key_value,0,gckey_value->Length+1);
strcpy(key_value,str2);
System::Runtime::InteropServices::Marshal::FreeHGlobal((System::IntPtr)str2);
}
catch(System::Exception ^ex)
{
strcpy(key_value,"");
}
return;
}
__declspec(dllexport) void __stdcall ReadConfigFileAppSettings(const char * targetConfig, char * key_value)
{
try
{
System::Configuration::Configuration ^appconfig;
System::Configuration::ExeConfigurationFileMap ^ mapConfig = gcnew System::Configuration::ExeConfigurationFileMap();
mapConfig->ExeConfigFilename = gcnew System::String(targetConfig);
appconfig = System::Configuration::ConfigurationManager::OpenMappedExeConfiguration(mapConfig,System::Configuration::ConfigurationUserLevel::None);
System::String ^key = gcnew System::String(key_value);
System::String ^value = nullptr;
if(appconfig->AppSettings->Settings[key] != nullptr)
{
value = appconfig->AppSettings->Settings[key]->Value;
}
else
{
value = "";
}
System::String ^gckey_value = /*key + "[ValSplit]" + */value;
char* str2 = (char*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(gckey_value).ToPointer();
memset(key_value,0,gckey_value->Length+1);
strcpy(key_value,str2);
System::Runtime::InteropServices::Marshal::FreeHGlobal((System::IntPtr)str2);
}
catch(System::Exception ^ex)
{
strcpy(key_value,"");
}
return;
}
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Set the first parameter to pointer to string and see if that helps.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Underscore in a parameter was the cause
Finally tracked this down to an "_" underscore in one of the parameters we were passing to the dll. I'm not sure why that caused a problem but I simply removed the underscore and Windows Installer was happy again. I'm a little confused because I'm pretty sure this value wasn't being sent to anything that would be prepared for Windows Installer but I'd rather not speculate the cause.
If you'd like to track that down to something specific, I'll work to send you the utility when I have more time. Right now, we are scrambling to get this next release built.
Thanks for your help through the weekend! Much appreciated.
If you'd like to track that down to something specific, I'll work to send you the utility when I have more time. Right now, we are scrambling to get this next release built.
Thanks for your help through the weekend! Much appreciated.
Re: Hangs at Apply Uninstall Progress says: Windows Installe
Hello,
I want to encrypt my app.config but I don't know how can i do it,can anyone help me?
I want to encrypt my app.config but I don't know how can i do it,can anyone help me?
Last edited by etedali on Sun Feb 02, 2014 2:56 am, edited 1 time in total.
Re: Hangs at Apply Uninstall Progress says: Windows Installe
Hi tj
Can you help me how you can encrypt app.config?do you write dll in c++?thanks for your help
Can you help me how you can encrypt app.config?do you write dll in c++?thanks for your help
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Hangs at Apply Uninstall Progress says: Windows Installe
Dear User,
You can only use C++ (native) DLLs.
Regards
You can only use C++ (native) DLLs.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: Baidu [Spider] and 93 guests