ryan1980 Posted April 20, 2016 Posted April 20, 2016 Dear all Made a batch file that has to remove 4 registry keys but i did not work.Who can help me out with this issue.below you see the batch file i made. @echo off setlocal set regkey="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{2b5c4fa0-a797-4651-b7da-279e22a916c1}\Properties"{9c119480-ddc2-4954-a150-5bd240d454ad},1"="\\\\?\\SWD#MMDEVAPI#{0.0.0.00000000}.{2b5c4fa0-a797-4651-b7da-279e22a916c1}#{e6327cad-dcec-4949-ae8a-991e976a79d2}" reg delete "%RegKey%" /f set regkey="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{2b5c4fa0-a797-4651-b7da-279e22a916c1}\Properties"{9c119480-ddc2-4954-a150-5bd240d454ad},2"="SWD\\MMDEVAPI\\{0.0.0.00000000}.{2b5c4fa0-a797-4651-b7da-279e22a916c1}" reg delete "%RegKey%" /f set regkey="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{82c5f292-8f3d-475d-a638-43c810072c99}\Properties"{9c119480-ddc2-4954-a150-5bd240d454ad},1"="\\\\?\\SWD#MMDEVAPI#{0.0.0.00000000}.{82c5f292-8f3d-475d-a638-43c810072c99}#{e6327cad-dcec-4949-ae8a-991e976a79d2}" reg delete "%RegKey%" /f Set regkey="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{82c5f292-8f3d-475d-a638-43c810072c99}\Properties"{9c119480-ddc2-4954-a150-5bd240d454ad},2"="SWD\\MMDEVAPI\\{0.0.0.00000000}.{82c5f292-8f3d-475d-a638-43c810072c99}" reg delete "%RegKey%" /f ECHO press any key to exit pause > null who can help me out
3s-gtech Posted April 20, 2016 Posted April 20, 2016 I don't quite 'get' your keys, but I push out a key to all of our Windows 7 clients to fix the folder redirection bug that can occur with our mandatory profiles. The format of that is below - this also deletes the key. [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{2112AB0A-C86A-4ffe-A368-0DE96E47012E}] .... 1
ryan1980 Posted April 20, 2016 Author Posted April 20, 2016 3s-gtech these 4 keys that the batch file has to delete or subkeys. And can you help me out with the batch file script
3s-gtech Posted April 20, 2016 Posted April 20, 2016 The script would be like this: script.cmd regedit /s \\server\scripts\regfile.reg regfile.reg Windows Registry Editor Version 5.00 [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Wind ows\CurrentVersion\MMDevices\Audio\Render\{2b5c4fa 0-a797-4651-b7da-279e22a916c1}\Properties"{9c119480-ddc2-4954-a150-5bd240d454ad},1"="\\\\?\\SWD#MMDEVAPI#{0.0.0.00000 000}.{2b5c4fa0-a797-4651-b7da-279e22a916c1}#{e6327cad-dcec-4949-ae8a-991e976a79d2}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Wind ows\CurrentVersion\MMDevices\Audio\Render\{2b5c4fa 0-a797-4651-b7da-279e22a916c1}\Properties"{9c119480-ddc2-4954-a150-5bd240d454ad},2"="SWD\\MMDEVAPI\\{0.0.0.00000000}. {2b5c4fa0-a797-4651-b7da-279e22a916c1}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Wind ows\CurrentVersion\MMDevices\Audio\Render\{82c5f29 2-8f3d-475d-a638-43c810072c99}\Properties"{9c119480-ddc2-4954-a150-5bd240d454ad},1"="\\\\?\\SWD#MMDEVAPI#{0.0.0.00000 000}.{82c5f292-8f3d-475d-a638-43c810072c99}#{e6327cad-dcec-4949-ae8a-991e976a79d2}] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Wind ows\CurrentVersion\MMDevices\Audio\Render\{82c5f29 2-8f3d-475d-a638-43c810072c99}\Properties"{9c119480-ddc2-4954-a150-5bd240d454ad},2"="SWD\\MMDEVAPI\\{0.0.0.00000000}. {82c5f292-8f3d-475d-a638-43c810072c99}] You use the .cmd to call the .reg file. I can't be 100% positive though, because I don't know if the syntax of your registry keys is correct - only you can test that. You may also be able to achieve this with GPP registry settings.
ryan1980 Posted April 20, 2016 Author Posted April 20, 2016 3s-gtech It works butt it removes the hole folder i just need that it removes the subkey. can you help me out with that.
k-strider Posted April 20, 2016 Posted April 20, 2016 like this this would remove the path key: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\7-Zip] "Path"=- https://support.microsoft.com/en-gb/kb/310516#bookmark-delete 1
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