congnt92
Posts: 57
Joined: Wed Apr 16, 2014 7:53 am

Re: Uninstall Cleanup for registry

Hi
I'm sorry but I cannot find the modified project which you attached.
And, .exe file run it out AI work fine for me. I build and run my project on vmware, too. But the installer is not popup any error. I don't know why :(
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstall Cleanup for registry

Hi,

I apologize, but I forgot to attach the AIP to my previous post, I attached it to this post.

It is good if the project works well on the virtual machine, maybe there is a problem with you real machine.

Best regards,
Eusebiu
Attachments
Your Application.aip
(16.64 KiB) Downloaded 964 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
congnt92
Posts: 57
Joined: Wed Apr 16, 2014 7:53 am

Re: Uninstall Cleanup for registry

Thank, Eusebiu
Your attach file work for me.
And now, I send u my .exe file. It work fine on VMware but not in real machine.
I wish you test it on real machine which run windows 7 and give me respone. Of cources, if u can :D
Thanks very much.
Attachments
Your Application.rar
(380.82 KiB) Downloaded 737 times
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstall Cleanup for registry

Hi,

I tested your package on my Windows 7 real machine, but it still didn't work for me. I'm afraid that the EXE file cannot work correctly inside the package as long as it does not work outside the package.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
congnt92
Posts: 57
Joined: Wed Apr 16, 2014 7:53 am

Re: Uninstall Cleanup for registry

Hi,
I'll re-install windows and try it again. It's so hard to explain why the installer work fine on VMware but not on real machine.
Thank you so much for all of your help.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstall Cleanup for registry

You're welcome. Glad to help.

However, I'm not sure if reinstalling Windows is the best solution for you. I would suggest you to test your EXE file on more real machines first, maybe there is a problem with the file, not with the Operating System.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
congnt92
Posts: 57
Joined: Wed Apr 16, 2014 7:53 am

Re: Uninstall Cleanup for registry

Hi
I don't know why now AI cannot run "attach file" custom action. To sure that the attach file work fine when run it out of AI, I used BootICE.exe file. But I still get the same problem.
Can u help me check whats wrong?
Thanks
Attachments
Send_with_another_exe.rar
(148.2 KiB) Downloaded 701 times
congnt92
Posts: 57
Joined: Wed Apr 16, 2014 7:53 am

Re: Uninstall Cleanup for registry

Hi,
With the same BootICE.exe and .exe which converted from batch file, if use "launch file" custom action, it work fine.
To make sure AI work fine, I reinstalling the AI but the problem is still not resolved.
Attachments
Send_launchfile_custom_action.rar
(160.38 KiB) Downloaded 1250 times
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstall Cleanup for registry

Hi,

I tested the new EXE file that you sent and I noticed that it only runs as administrator and that is why it does not run using the "Launch attached file" custom action, because that custom action tries by default, to launch it without administrator rights.

So, in order to get it running you should set the "deferred" with "no impersonation" options for your custom action or check the "Run as administrator" option for your package in the Install Parameters page.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
congnt92
Posts: 57
Joined: Wed Apr 16, 2014 7:53 am

Re: Uninstall Cleanup for registry

Hi, Eusebiu
Work like a charm. This is exactly what i was looking for. On VMWare, Uac was turned off and it is reason why the installer run well. When using quick batch file compiler to convert batch file to .exe, I checked "add administrator manifest". But it seems like that's not enough. Using "add administrator manifest" option only make it work fine if run it out of AI but not if run it from AI.
Thanks, Eusebiu. God bless u.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstall Cleanup for registry

You're welcome. I'm glad you got this working.

God bless you too,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
congnt92
Posts: 57
Joined: Wed Apr 16, 2014 7:53 am

Re: Uninstall Cleanup for registry

Hi, Eusebiu
Following your help, my project work very fine then ever.
But now I want to change some things. As u know, my project has 2 " launch attached file" custom actions: .exe (converted from batch) and "read_TXT vbs" (read text from file which created by .exe file then add a registry value). If let them run "immediately", they work fine, now I want to change to "after the system has been successfully modified". Is it impossible? I tried it and fail. If I can do that, please tell me what I did wrong.Thanks
P/s: I attached my project if you need.
Attachments
Excution_Time.rar
(15.86 KiB) Downloaded 1098 times
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstall Cleanup for registry

Hi,

The custom action that fails in your package is the "read_TXT.vbs" custom action. Please keep in mind that a "deferred" or "commit" custom action cannot work with properties.

Furthermore, if you set your custom actions to be executed "after the system has been successfully modified", the registry value that you get from your TXT file will not be written to the registry because the "WriteRegistryValue" standard action that writes the registry entries is executed before your custom actions and at that step the [ADDREG] property contains the default value, not the value read from the TXT file.

I'm not sure why you want to set you custom actions to be executed "after the system has been successfully modified", but I think that the only approach that you can use is to set your package to "Run as administrator" (in the Install Parameters page) and set your custom actions to run as "Immediately".

For more details about the execution of the custom actions you can take a look on the Windows Installer Custom Actions article.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
congnt92
Posts: 57
Joined: Wed Apr 16, 2014 7:53 am

Re: Uninstall Cleanup for registry

Hi,
This is reason why I want to set my custom actions to be executed "after the system has been successfully modified".
Batch file

Code: Select all

@echo off
bcdedit /export %windir%\system32\Grub && Echo [%TIME:~0,8%]: Backup the state of the system store.
for /f "tokens=3" %%a in ('bcdedit /create /d "Grub4DOS" /application BOOTSECTOR') do set guid=%%a
echo %guid%> C:\ID.txt 
Exit
But "Grub" folder not yet create by the installer when batch launch "Immediately".
Of course, I can change batch file to
New batch

Code: Select all

@echo off
if not exist %windir%\system32\Grub md %windir%\system32\Grub
bcdedit /export %windir%\system32\Grub && Echo [%TIME:~0,8%]: Backup the state of the system store.
for /f "tokens=3" %%a in ('bcdedit /create /d "Grub4DOS" /application BOOTSECTOR') do set guid=%%a
echo %guid%> C:\ID.txt 
Exit
If batch file luanches fail, the installer will stop. But a folder which was not created by the installer, it cannot removed in the rollback.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstall Cleanup for registry

Hi,

Indeed, a folder that is not created by the installer is not removed during the rollback, however you can create another custom that deletes that folder and set it to be executed "during installation rollback".

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”