I have to change the default program for .java files it should open by default in a program called Ready to Program which is available here. http://compsci.ca/ho...171_install.exe
I tried the following vbs script but it isn't working.Any help would be greatly appreciated as I have to make this the default on about 250 computers,
Option Explicit
Dim objShell
set objShell = WScript.CreateObject ("WScript.Shell")
addFileAssociation ".java", "C:\Program Files (x86)\Ready to Program\Ready.exe"
Sub addFileAssociation( fileExt, whichApp )
If ( Left(fileExt, 1) <> "." ) Then
fileExt = "." & fileExt
End If
objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\" & fileExt & "\Application", whichApp
End Sub



Help

Back to top










