Change Drive Icons Using VBScript...

pjayampathi

Well-known member
  • Jan 20, 2008
    6,253
    39
    48
    VBScript walin maru weda karanna puluwan.. eekai mama mee article eka danna hithuwe.

    kaatahari meka JavaScript walin ehema oninam kiyanna..

    me code eka NotePad wala Paste karala .vbs file ekak vidhiyata Save karala Run karanna.



    Code:
    ' Coded by Prabhath Jayampathi
    ' [email protected]    
    ' For Elakiri.com
    
    On Error Resume Next
    Dim ws, reg, dpth, icn
    
    Set ws = WScript.CreateObject("WScript.Shell")
    
    dpth = Inputbox("Please enter the drive letter : ","Drive Letter?")
    
    If dpth = "" Then
        MsgBox "You Must Enter a Drive Name.",vbYes,"Empty"
        WScript.Quit
    End If
    
    icn = Inputbox("Please enter the path to the Icon :","Icon?")
    
    If icn = "" Then
        MsgBox "You Must Enter a Icon Location.",vbYes,"Empty"
        WScript.Quit
    End If
    
    reg = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\"& dpth & "\DefaultIcon\"
    
    ws.RegWrite reg, icn
    
    MsgBox "Icon has changed of drive " & dpth ,vbYes,""
    
    MsgBox "The Script is Written by Prabhath Jaympathi ",vbYes,"About!"
    methana thawa Script ekak ethi,

    http://www.elakiri.com/forum/showthread.php?t=74774
     
    Last edited:

    nksoft

    Member
    Aug 30, 2007
    275
    0
    0
    Australia
    try this... made it with C#
    http://www.filefreak.com/pfiles/23594/ElaKiri/ChangeDriveIcon.zip

    driveiconvq3.jpg
     
    Last edited: