Re: Remotely uninstalling application

"Petri Wunsch" <[email protected]>
Newsgroups gmane.comp.python.windows-ce
Message-ID <[email protected]>
Hi,  one stupid question where can i get ctypes :)

- Petri

2007/8/8, [email protected]
<[email protected]>:
> Hello Petri,
>
> This module should do the trick (assume you have ctypes):
>
> uninstall.py :
>
> from ctypes import *
>
> DMProcessConfigXML = cdll.aygshell.DMProcessConfigXML
> XML = u'''\
> <wap-provisioningdoc>
>      <characteristic type="UnInstall">
>          <characteristic type="%s">
>              <parm name="uninstall" value="1"/>
>          </characteristic>
>      </characteristic>
> </wap-provisioningdoc>'''
>
> def uninstall(app_name):
>      '''
>      Removes the program designated by app_name
>      (as appearing in Program->Settings->Remove)
>      '''
>      xml_out = c_wchar_p()
>      return DMProcessConfigXML(XML %app_name, 1, byref(xml_out))
>
> Just call the uninstall function in any of you script and the job is done.
> Worked on my Acer n311.
>
> Regards,
> Alexandre
>
>


-- 
  I love deadlines. I love the whooshing sound they make as they go by.
- Douglas Adams
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.