Hi Guys
We are using a windows service, so I would like to call the manual update programmatically in this service.
To achieve this, I need to know the path of my installer-file.
By having a look at the update-shortcut, the installer-file is called like this:
"C:\Documents and Settings\All Users\Application Data\GUID\EVA.exe" /update
This is raising the following questions:
- How can I get the GUID for the path?
- Can I pass an argument to the installer-file so that it is updating without any user interaction?
Thank you.
Regards,
ravz
Call Updates from a windows service
Re: Call Updates from a windows service
Dear ravz,
You can find the GUID (or the UninstallString) at the registry value: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{productcode}\UninstallString (or HKLM\SOFTWARE\Wow6432\Microsoft\Windows\CurrentVersion\Uninstall\{productcode}\UninstallString on 64bit machines). The UninstallString will point to to the exe to which you can call with the update flag.
To run a silent (no user interaction) update, run setup.exe /update /s.
I hope this helps!
You can find the GUID (or the UninstallString) at the registry value: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{productcode}\UninstallString (or HKLM\SOFTWARE\Wow6432\Microsoft\Windows\CurrentVersion\Uninstall\{productcode}\UninstallString on 64bit machines). The UninstallString will point to to the exe to which you can call with the update flag.
To run a silent (no user interaction) update, run setup.exe /update /s.
I hope this helps!
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Call Updates from a windows service
Thank you for your quick and very helpful answer.
Re: Call Updates from a windows service
Sure!
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Call Updates from a windows service
Dear ravz,
Please note that in order to prevent mistakes of reading the wrong location, you can write the $UNINSTALLLINK$ to the registry, a text/INI file and so forth in your setup, and then read it in your Windows service.
Please note that in order to prevent mistakes of reading the wrong location, you can write the $UNINSTALLLINK$ to the registry, a text/INI file and so forth in your setup, and then read it in your Windows service.
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Call Updates from a windows service
I wonder if anyone can help. I am trying to run a silent update as well from a Windows Service.
When I tried it in the command prompt, it worked with using /update /s switch. However when I tried inside Windows Service using .Net Process I get this error in Event Viewer:
Error 1312. Cannot create the directory 'C:\Windows\TEMP\miaCBA5.tmp\xxx.exe'. A file with this name already exists. Please rename or remove the file and click retry, or click Cancel to exit.
This error only occurs when I am trying to run it from Windows Service. When I try to run from a command prompt it does not give this error. I notice that the user is SYSTEM when this error occurs. When I try running it in command prompt the user is normal user. Also, the temporary directory that stores the installation files is 'C:\Users\userXXX\AppData\Local\Temp\mia18\' rather than 'C:\Windows\TEMP\mia...\'.
Why is it giving this error when running under SYSTEM? I tried deleting all files and folders in C:\Windows\Temp\ before running the silent update and the same error happened as well.
When I tried it in the command prompt, it worked with using /update /s switch. However when I tried inside Windows Service using .Net Process I get this error in Event Viewer:
Error 1312. Cannot create the directory 'C:\Windows\TEMP\miaCBA5.tmp\xxx.exe'. A file with this name already exists. Please rename or remove the file and click retry, or click Cancel to exit.
This error only occurs when I am trying to run it from Windows Service. When I try to run from a command prompt it does not give this error. I notice that the user is SYSTEM when this error occurs. When I try running it in command prompt the user is normal user. Also, the temporary directory that stores the installation files is 'C:\Users\userXXX\AppData\Local\Temp\mia18\' rather than 'C:\Windows\TEMP\mia...\'.
Why is it giving this error when running under SYSTEM? I tried deleting all files and folders in C:\Windows\Temp\ before running the silent update and the same error happened as well.
Re: Call Updates from a windows service
please see my response to you on the other thread
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: No registered users and 56 guests