magace420 Posted March 28, 2018 Posted March 28, 2018 Hello I created a simple program to print labels with a Dymo Label Creator. However there is one part I cant seem to figure out how to automate. the labels are saved like this file1.label, I need to change all .label extensions to open with a file in the script folder named printlabel.exe I have been doing it manually by right clicking the .label file, going to properties, and changing the opens with settings. Is there any simple command I can run to change them automatically without having to right click and go into the properties? This is what I want to automate> Hope my request is easy to understand. Thanks!!
Bilgus Posted March 28, 2018 Posted March 28, 2018 Do you have something else that reads these .Label items why not Right click on one Choose - OPEN WITH select the checkmark next to always use selected application and choose your new default program?
magace420 Posted March 28, 2018 Author Posted March 28, 2018 Well i only have to change it once, but I'm going to give it to a few others to use and this would be one less thing to explain if i can get the script to do it.
Bilgus Posted March 28, 2018 Posted March 28, 2018 (edited) Rather than restarting after you change your associations you should be able to call this function #include <APIShellExConstants.au3> #include <MsgBoxConstants.au3> #include <WinAPIShellEx.au3> _WinAPI_ShellChangeNotify($SHCNE_ASSOCCHANGED, SHCNF_IDLIST) Edited March 28, 2018 by Bilgus
Moderators JLogan3o13 Posted March 28, 2018 Moderators Posted March 28, 2018 File extension details are maintained in the registry, under HKEY_CLASSES_ROOT. If you do a search of the forum you will find where this has been done. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now