ImageGlass Package - Default Application
Published: June 22, 2020 - 11:09 AM
Hello everyone! I had to create an ImageGlass package because I couldn't find it in the Store and it was the Photo Viewer that the town hall where I am doing my internship wants to install to replace the default one.
Here's what I managed to do to add the ability to launch with ImageGlass to the standard extensions. (Yes, this wasn't the case originally; you had to find the .exe file in the installation directory.)
Unfortunately, what I would really like is for it to replace the Windows viewer by default.
I had the idea of exporting with the "$ /DISM" command but that will force me to overwrite all default applications.
I would therefore like to know if there is a "Wapt way" to make an installed program become the default.
A huge thank you to whoever takes the time to reply to me, have a lovely day.
Code: Select all
def install():
print('installing test-imageglass')
picture_list_assoc = ['.tif','.tiff','.gif','.jpeg','.jpg','.jif','.jfif','.jp2','.jpx','.j2k','.j2c','.fpx','.pcd','.png']
install_msi_if_needed('ImageGlass_7.6.4.30_x64.msi')
mkdirs('C:/Users/Public/igconfig')
filecopyto('igconfig.xml','C:/Users/Public/igconfig')
run('del C:\progra~1\ImageGlass\default.jpg')
for soft in installed_softwares('ImageGlass'):
path_imageglass = install_location(soft['key'])
imageglass = makepath(path_imageglass,'ImageGlass.exe')
for ext in picture_list_assoc:
register_ext('ImageGlass',ext,'"{kwarg}" -o "%1"'.format(kwarg=imageglass))
def session_setup():
filecopyto('C:/Users/Public/igconfig/igconfig.xml', user_appdata() + '\\ImageGlass')Unfortunately, what I would really like is for it to replace the Windows viewer by default.
I had the idea of exporting with the "$ /DISM" command but that will force me to overwrite all default applications.
I would therefore like to know if there is a "Wapt way" to make an installed program become the default.
A huge thank you to whoever takes the time to reply to me, have a lovely day.