'**
'* Change default Windows's install directory.
'*
'* @author David Ansermot <david.ansermot [at] gmail [dot] com>
'* @date 2009-01-02
'* @version 1.0
'* @copyright (C) Ansermot David 2009
'* @license GNU/GPL
'**
' Variables declaration
dim oWsh, Key, Path
' Getting new path
Path = inputbox("Entrer le nouveau chemin","Nouveau chemin","C:\Program Files")
' If path is set
if Path <> "" then
' Get regedit modifier object
Set oWsh = CreateObject("WScript.Shell")
' Regedit key
Key = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir"
' Write key's new value
oWsh.RegWrite Key, Path, "REG_SZ"
' Prompt success message
msgBox "Nouvelle valeur : " & oWsh.RegRead Key
' Clear memory
Set oWsh = Nothing
end if