phaolo Posted September 26, 2008 Share Posted September 26, 2008 Hello, I'd like to silently install Vlc09, but I need to import options.The program unfortunately uses the Nullsoft setup, so zero configuration.I'm expecially interested in file associations, as the player automatically gets control of all of them Are they stored inside vlc-qt-interface.ini?I don't think deleting registry entries is a good solution as it will remove previous programs.Putting Vlc setup as last in RunOnceEx is a poor compromise too.What can I do then? Link to comment Share on other sites More sharing options...
jjvs Posted September 26, 2008 Share Posted September 26, 2008 Hi phaolo,Sometime ago I created a little batch file to restore some of the VLC file association to there previous valuesThe usage:VLC_Extension.cmd [.extension1] [.extension2] [...]example: VLC_Extension.cmd .wav .wmv .asf .ts .psHere it the code:@ECHO OFFSETLOCAL ENABLEDELAYEDEXPANSION ENABLEEXTENSIONSFOR %%K IN (%*) DO @( REM Reset variables SET VLC_Backup= SET EXT_ASSOC= REM Check for a backup value FOR /F "SKIP=4 TOKENS=3" %%F IN ('REG QUERY "HKCR\%%K" /V VLC.backup 2^>NUL') DO @SET VLC_Backup=%%F REM Get current file association value FOR /F "SKIP=4 TOKENS=4" %%F IN ('REG QUERY "HKCR\%%K" /VE 2^>NUL') DO @SET EXT_ASSOC=%%F REM Check if a backup value is available IF NOT "X!VLC_Backup!"=="X" ( REM Check if VLC is still associated with the file extension, if true REM restore the old value IF "!EXT_ASSOC!"=="VLC!EXT_ASSOC:VLC=!" REG ADD "HKCR\%%K" /VE /D "!VLC_Backup!" /F REM delete VLC.backup anyway REG DELETE "HKCR\%%K" /V VLC.backup /F ) ELSE ( REM Check if VLC is still associated with the file extension, if true REM remove it IF "!EXT_ASSOC!"=="VLC!EXT_ASSOC:VLC=!" REG DELETE "HKCR\%%K" /VE /F ))This batch file does check the current file association, if it's still associated with VLC it will restore it'sprevious association, or remove any association if there wasn't any before. Otherwise nothing is done.Good luck. Link to comment Share on other sites More sharing options...
phaolo Posted September 26, 2008 Author Share Posted September 26, 2008 Woa! Almost unknown dos programming lol.Too bad that VLC team didn't think at an unattended mode.Well I'll try your cmd, thank you for the code Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now