C:\Users\Default
will be applied only when a new user is created.
To copy it into every existing users SendTo, you need to write a simple batch script:
copy "<yourfile with path>" %APPDATA%\Microsoft\Windows\SendTo /y
and copy the batch script to: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
The file association can also be scripted using batch, for example:
ftype txtfile="C:\Program Files (x86)\Notepad++\notepad++.exe" %1
In order not to cause any other problems, you have to find the ftype variable used by your program (in case there is one), in our case for .txt
the variable is txtfile
.
You can find it in regedit - HKEY_CLASSES_ROOT
looking for the file extension (in our case .txt
), the variable we need is the data value of the (default)
string.
In case there is no value, use the script the following way instead:
ftype txtfile="C:\Program Files (x86)\Notepad++\notepad++.exe" %1 assoc .txt=txtfile
Replace txtfile
with any value you'd like.
The only problem with this, is that this batch script has to be ran as an administrator. However this will change the default file association for every user.