2

I'd like to configure myself a one-click configuration windows script. However, I really don't know where to search for the lines to edit in the registry.

I've found some things (such as UAC disabling, or hidden files and extensions, etc), but for others, I can't find what I need.

I want for example to :

(1) Set the Windows Update settings to "Search updates but let me choose if I want to download and install them" || DONE

(2) Associate some file extensions such as *.mp3, with my Portable VLC by specifying only a relative path in the batch file (such as ../VLC/vlc.exe) || So far I can make it propose me VLC at startup, but it isn't set by default, I have to confirm it. For unknown extensions, it does work (tried with 7z)

(3) Delete the Internet Explorer Icon on the bar on the bottom of the screen

(4) Display every type of folder with the "Medium Icon" display type

(5) Put the Bin icon of the Desktop in the bottom right corner of the screen

Could you help me for these ?

Xaltar
  • 250
  • 1
  • 4
  • 15
  • 1
    You should look into [What is Sysprep? How is it useful?](http://superuser.com/questions/68697/what-is-sysprep-how-is-it-useful). – Ƭᴇcʜιᴇ007 Sep 09 '13 at 19:17
  • For #2: [Associate a File Type with a Specific Program](http://superuser.com/questions/29717/associate-a-file-type-with-a-specific-program) – Ƭᴇcʜιᴇ007 Sep 09 '13 at 19:18
  • For the two issues you've noted, registry changes will work better. Actually, I'm pretty sure there are no actual .bat commands that will make those changes, maybe VBscript or PS, but not batch. Use batch to import the appropriate registry settings. The other thing is that if these are systems in an office environment you should use Group Policy to make these changes very easily and automatically each time a computer joins the domain. – music2myear Sep 09 '13 at 19:44
  • @techie007 what does that have to do with this? – PsychoData Sep 09 '13 at 19:49
  • @music2myear I provided commands that do just that in my answer. If you are going to provide an alternative, great. But tell him how, not what to do. – PsychoData Sep 09 '13 at 19:50
  • Geesh @PsychoData, Xaltar asked about associating file types, so Techie007 showed a resource that shows how to do that. You gave a registry setting that does what Xaltar asked, and I mentioned that registry settings might be the easiest method to go about doing what he needs. We've addressed some of the assumptions the OP is making but without full answers, hence our posting as comments, not full answers. – music2myear Sep 09 '13 at 21:45
  • @music2myear I was talking about the Sysprep part, not the part that was relevant. – PsychoData Sep 09 '13 at 21:47

1 Answers1

1
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\AUOptions

This registry key allows you to change the update settings. Per this serverfault question the value you want in it is 2

For the second piece you want to look at assoc and ftype commands. This superuser question gives you an idea how to set up those extensions to what you want. you just need to use a parameter like %~dp0 to expand where you are to then use the relative path name to figure out where Absolutely your relative path will lead to. then use Ftype with that absolute path.

This explains more about batch parameters

PsychoData
  • 1,397
  • 1
  • 13
  • 38
  • Great for #1 !. And for #2 I've edited my question ... – Xaltar Sep 09 '13 at 19:38
  • That second one's going to be a bit tricky. – MDT Guy Sep 09 '13 at 19:40
  • Looks like you might have them backwards. first you want to name your extension with a filetype. `ASSOC .mp3=mp3file` then you want to set your filetype with a player/open-(er?) `FTYPE mp3=D:\Softwares\VLC\vlc.exe "%1"` – PsychoData Sep 09 '13 at 19:42
  • @Xaltar also if you're worried about removing the extensions [This](http://www.mydigitallife.info/how-to-unassociate-file-types-and-remove-file-extension-associations-in-windows-vista/) shows you how to remove them again. Basically, to remove your mp3 association and default player, for example, you would `assoc .mp3=` setting it = nothing and then `ftype mp3=` using your plain mp3 filetype from above. I'll edit my answer-answer in a minute to include the two commands in better detail. – PsychoData Sep 09 '13 at 19:45
  • @PsychoData, hm, I think it associates well, but, well, it still laucnhes the default player, not VLC when I double click. Maybe registry edition could do it ? I'm still searching ... There is the extension in "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts" – Xaltar Sep 09 '13 at 19:52
  • check [this](http://social.msdn.microsoft.com/Forums/vstudio/en-US/630ed1d9-73f1-4cc0-bc84-04f29cffc13b/what-registry-keys-are-responsible-for-file-extension-association) for the actual process of associating the extension – PsychoData Sep 09 '13 at 21:26
  • Yeah ... but there is some kind of "hash" value I don't know how to set ... Besides, it seems like the method of "CLASSES_ROOT" is not a good one. So with the "UserChoice" solution, I can't make the "hash" value a correct one just by guessing ... – Xaltar Sep 09 '13 at 21:42