Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: file associate file associations
Can WinBatch do that?
Sample code from FileMenu...
a="xyz" ; LOWERCASE extension to associate Terminate((a=="exe"||a=="com"||a=="bat"||a=="pif"||a=="lnk"),"Ooops","Cannot associate executable files") b=AskFileName("Associate %a% files with","C:\","Executable Files|*.exe;*.com;*.bat;*.pif|All Files|*.*|","",1) rkey=RegOpenKey(@REGCLASSES,"") ErrorMode(@OFF) RegDeleteKey(rkey,".%a%") ErrorMode(@CANCEL) RegSetValue(rkey, ".%a%", "%a%_auto_file") RegSetValue(rkey,"%a%_auto_file\shell\open\command",strcat('"',b,'" "%%1"')) AU=StrUpper(a) RegSetValue(rkey,"%a%_auto_file","%AU% File") RegClosekey(rkey)
Article ID: W14457
Filename: Can WinBatch associate files.txt
File Created: 2000:05:04:13:00:30
Last Updated: 2000:05:04:13:00:30