Python script for writing in the windows registry
Create an executable file from a python script which will read file/dir structure information, create a temporary registry file and run it to insert data into the windows registry. 1. Read and validate a 4 digit integer from the user. Display User Instructions: "Please enter a 4 digit number for the starting sequence. This tool will name your library after the the subdirectory one level up from your nki or \instruments\*.nki files. for example: c:\Kontakt Libraries\HouseDrums or c:\Kontakt Libraries\HouseDrums\Instruments The libraries added to Kontakt will be named after the subdirectory, ie HouseDrums." 2. traverse the root directory and for each subdirectory if any *.nki files exist in current_subdir or under current_subdir\instruments and current_subdir\wallpaper.png exists and not any *.nkx files exist current_subdir then write the following data in a temp.reg file leaving an empty line for each subdirectory entry. [HKEY_LOCAL_MACHINE\SOFTWARE\Native Instruments\Content] "k2lib####"="SUBDIRECTORY_NAME" [HKEY_LOCAL_MACHINE\SOFTWARE\Native Instruments\SUBDIRECTORY_NAME] "ContentDir"="_FULL_PATH_" "Visibility"=dword:00000003 where # in k2lib#### is the four digit number and will be increased by one for each next directory. if the given number is 1111 the first directory will be 1111, the next 1112 and so on. 3. create an empty file in the current subdirectory named: SUBDIRECTORY_NAME_info.nkx 4. Log all operations in a report.html file the following for each case: Directory Name Result dir1 Added to library dir2 Not added, missing wallpaper.png dir3 Not added, nkx file exists dir4 Not added, no nki files found
Related projectsSearch for freelance jobs
can’t wait for more clients
and advertising. Thank you."