We encountered an error in the last version. Please avoid using version 1.0.
Deleting the painting causes the application to corrupt the aircraft.cfg file, making the aircraft invisible in the game. If this occurs, please restore the original aircraft.cfg file from the aircraft.cfg.bak copy.
--------------------------------------------------------------
App facilitates managing liveries for a specific aircraft add-on. Upon execution, it presents a numbered list of available liveries found within the aircraft's liveries directory. Users can select a livery by inputting the corresponding number.
Upon selection, the app displays a thumbnail image of the chosen livery. When the user closes the thumbnail, he will be asked if he confirms the deletion. With any key other than Y, the user can cancel and return to the list.
If confirmed, the app deletes the livery along with its associated files and updates the livery list accordingly. Users can then continue browsing and deleting liveries as needed.
Execution:
To utilize the app, place it in a directory listed in the system's PATH variable (or simply in the x:\Windows directory) for convenient access from any location. Using Windows Explorer navigate to the directory containing the liveries and aircraft.cfg file. Then, in the Explorer's address bar type "del2", and press Enter. IMPORTANT: Turns out this doesn't work in Windows Explorer. This method only works in Total Commander (or similar) with administrator rights.
For now, the only solution is to first copy the del2.exe file in Explorer to the directory with the add-on, and then right-click its icon and select Run as Administrator.
After deleting the livries, you need to use the MSFSLayoutGenerator.exe program in the main directory of the add-on, which will update the list of files in layout.json. This will prevent deleted liveries from being displayed as empty.
The zipped file also includes the del2.py source file, written in Python. You can compile it yourself and then use it.
Due to the lack of a similar program, I wrote it for myself and thought of sharing it. It has simple protections against idiotic user actions, but it is not a stable, well-tested version.
NOTE: Sometimes developers place a livery in a 'texture' folder used to share textures with other liveries. If the developer does this, such a directory will also be displayed in the script. So do not delete the folder "Texture", "Texture.base", "Texture.share".
I recommend deleting only those liveries that are smaller in size and not deleting the largest ones. This may prevent us from deleting liveries that share textures with other liveries.
I don't have time for now. If you are having problems try:
To be able to run a script or a compiled version of it from Windows Explorer with the appropriate administrator privileges, there are several solutions:
1. Set the .exe file to always run as administrator
Right-click on the .exe file. Select "Properties". Go to the "Compatibility" tab. Check the "Run this program as an administrator" box. Click "OK".
2. Create a shortcut that always runs as administrator Right-click on the .exe file and select "Create Shortcut". Right-click on the shortcut you created and select "Properties". Go to the "Shortcut" tab. Click "Advanced". Check the "Run as administrator" box. Click "OK", then "Apply" and "OK".
3. Using a batch file (.bat) to run the script as an administrator You can create a batch file that will run the script as an administrator. Below is an example of such a batch file: Open Notepad. Paste the code:
@echo off
setlocal
openfiles >nul 2>&1
if %errorlevel% neq 0 (
powershell -Command "Start-Process '%~f0' -Verb RunAs"
exit /b
)
start "" "del2.exe"
endlocal
Save the file as: run_as_admin.bat
Right-click on the run_as_admin.bat file and select "Run as administrator".
4. PowerShell script to run as administrator Similar to the batch file, you can create a PowerShell script that will run the file as administrator: Open Notepad. Paste the code:
$scriptPath = "del2.exe"
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator))
{
$arguments = "& '" + $myInvocation.MyCommand.Definition + "'"
Start-Process powershell -ArgumentList $arguments -Verb RunAs
exit
}
Start-Process $scriptPath
Save the file as run_as_admin.ps1. **Right-click on the file run_as_admin.ps1, select "Run with PowerShell".
AMEC1987
skandalsky author
2 months ago
deHavilland
skandalsky author
3 months ago
degeuspiet
Piet de Geus
Netherlands
skandalsky author
3 months ago
leoleo12321
skandalsky author
3 months ago
leoleo12321
skandalsky author
3 months ago
imb12
1) Is there any possibility to delete the texture folders with your program? As far as I can see, only the aicraft.cfg file is corrected but the texture folders themselves are not removed. This must be done manually!
2) I unfortunately do not understand " Then, in the Explorer's address bar, type the full name of the script including the extension - "del2.py", and press Enter." Maybe you can give a fictitious example step by step? I have used placing the two files del2.exe and del2.py in the respective folder where aircraft.cfg is and it works.
3) Is there any way to remove multiple textures at once in your command file instead of one at a time? If so: what would such a command look like?
skandalsky author
3 months ago
pgilbr
skandalsky author
3 months ago