How can I create a new "file type" in the command line?

MazeOfEncryption

To create a registry entry, the reg command is used. How can I use the reg command to specify a file, for example, of type .test to automatically open with openTest.exe, and be listed as a Useless Test File under the file type details?

Gourav

Try this batch to Associate .test as filetype and default run program to run the .test file.

@echo off
SETLOCAL EnableDelayedExpansion
ASSOC .test=Useless Test File

set myapppath="%homedrive%\MyTestProgram\"
REG ADD "HKCR\.test\DefaultIcon" /d %myapppath%\openTest.ico
REG ADD "HKCR\.test\shell\Open\command" /d "%myapppath%\openTest.exe %%1"

The above batch will associate ".test" and set its description as "Useless Test File"

myapppath will set your path to your application directory.(edit path as required)

Este artigo é coletado da Internet.

Se houver alguma infração, entre em [email protected] Delete.

editar em
0

deixe-me dizer algumas palavras

0comentários
loginDepois de participar da revisão

Artigos relacionados

How can I create a new unique name jmeter.log file each time a CLI command is run?

Why can't I create this SQLite view using the command line?

How do I create a shortcut via command-line in Windows?

How can I change the file type association of an existing file in WebStorm?

How can I download a stanza's model via command line?

How can I build an Android apk without Gradle on the command line?

How can I use getopt with command line arguments in Swift 3?

How can I edit the command-line in LLDB?

How can I accept multiple arguments in command line and process it correctly?

How can I build a command line app for android?

PSQL: How can I prevent any output on the command line?

How can I use getopt with command line arguments in Swift 3?

How can I pass arguments to supervisor from command line

how can I code a tab feature in command line?

How to create a gist on command line

How can I use a powershell multi-line command as a single line in a command prompt window

How can I read userinput with the newline in python, that prints as a new line?

How can I use File.AppendAllText and add to it a new line?

How can I create a command queue of sorts in C#?

How can I use multiple conditionals and match to create a new variable?

How can I create a new url in a Django app?

How to create a DOSKEY alias command to print Windows %PATH% with every entry on new line?

how to create SQL View in Geoserver with command line

How to create .sln file using command line

In Vim, how can I change the color of the StatusLine when I'm in Command Line mode?

Using the Blazor InputFile tag- how can I control the file type shown when I browse

How can I tell how many pages will be printed from command line?

How to combine a .MP4 video with a .WAV audio to create a new .MP4 video using ffmpeg from command line arguments?

How can I embed any file type into Microsoft Word without interop assemblies

TOP lista

  1. 1

    R Shiny: use HTML em funções (como textInput, checkboxGroupInput)

  2. 2

    O Chromium e o Firefox exibem as cores de maneira diferente e não sei qual deles está fazendo certo

  3. 3

    Como assinar digitalmente um documento PDF com assinatura e texto visíveis usando Java

  4. 4

    R Folheto. Dados de pontos de grupo em células para resumir muitos pontos de dados

  5. 5

    Gerenciar recurso shake de Windows Aero com barra de título personalizado

  6. 6

    Como obter dados API adequados para o aplicativo angular?

  7. 7

    UITextView não está exibindo texto longo

  8. 8

    Por que meus intervalos de confiança de 95% da minha regressão multivariada estão sendo plotados como uma linha de loess?

  9. 9

    Acessando relatório de campanhas na AdMob usando a API do Adsense

  10. 10

    Usando o plug-in Platform.js do Google

  11. 11

    Como posso modificar esse algoritmo de linha de visada para aceitar raios que passam pelos cantos?

  12. 12

    Dependência circular de diálogo personalizado

  13. 13

    Coloque uma caixa de texto HTML em uma imagem em uma posição fixa para site para desktop e celular

  14. 14

    iOS: como adicionar sombra projetada e sombra de traço no UIView?

  15. 15

    Como usar a caixa de diálogo de seleção de nomes com VBA para enviar e-mail para mais de um destinatário?

  16. 16

    Tabela CSS: barra de rolagem para a primeira coluna e largura automática para a coluna restante

  17. 17

    How to create dynamic navigation menu select from database using Codeigniter?

  18. 18

    Converter valores de linha SQL em colunas

  19. 19

    ChartJS, várias linhas no rótulo do gráfico de barras

  20. 20

    用@StyleableRes注释的getStyledAttributes。禁止警告

  21. 21

    não é possível adicionar dependência para com.google.android.gms.tasks.OnSuccessListener

quentelabel

Arquivo