How to open a program for file associations under PE

Source: Internet
Author: User

There's a regttp.cmd program in WinPE. This regttp.cmd can be used to set the association of Chin listening to its documentation. When you run it, it will automatically parallel all the music file icons as well as the associated opener.

When we need to change his display icon or open the program in parallel, it can be very troublesome and must be changed one at a time. If you use the following code, it will be very convenient for you to make bulk changes.

For example, the prepared ICO icon file will be renamed with the post-stamp name of the music file, such as Mp3.ico, Wma.ico, Wav.ico, and then save the following code as a. bat file, and run it in the directory of the ICO icon file.

Title by

Set Filename=%%~ni

echo REM this regttp. CMD is used to set up the association of thousands of listening to their documents, and if not implemented, you can run the batch manually. >regttp. Cmd

Echo.>>regttp. Cmd

Echo PUSHD%%^~dp0>>regttp. Cmd

Echo SET tp^=%%cd%%>>regttp. Cmd

Echo.>>regttp. Cmd

For%%i In (*.ico) does (

rem Add File type

echo REG ADD hklmsoftwareclasses.%filename%/ve/d audio.%filename%/F ^>nul>>regttp. Cmd

)

For%%i In (*.ico) does (

rem Parallel file icon

echo REG ADD hklmsoftwareclassesaudio.%filename%defaulticon/ve/t reg_sz/d "%%tp%% video player Icoaudio%filename%.ico"/f^> Nul>>regttp. Cmd

)

For%%i In (*.ico) does (

REM Parallel File opener

echo REG ADD hklmsoftwareclassesaudio.%filename%shellopencommand/ve/t reg_sz/d ""%%tp%% Video play Chin-up listening TTPLAYER.EXE ""%%%%1 "/f^>nul>>regttp. Cmd

)

Echo.>>regttp. Cmd

Echo Exit>>regttp. Cmd

Exit

Where: "%tp% video player Icoaudio" is a music file of the ICO icon storage path

"%tp% Audio-visual TTPLAYER.EXE" is an open program for music files

If you want to change the icon for another file type or open a program, just prepare the relevant ICO file and open the program.

Note: After downloading, place the audio and video folders under "%tp% movie player ico" and create your own without the folder.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.