Simple question: How do I refereence the current directory were the script is run fro

Home Forums Scripting General Scripting Simple question: How do I refereence the current directory were the script is run fro

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    meterman
    Member
    #110945

    Here is my script I am trying to get it to use an .ICO icon file as the icon for the shortcut. It will be in the same directory as the script. right now it is not working. Any and all help will be greatly appreciated

    Set WshShell = CreateObject(“WScript.Shell”)
    set objFSO = CreateObject(“Scripting.FileSystemObject”)

    strDesktop = WshShell.SpecialFolders(“Desktop”)

    IF Not objFSO.FileExists(strDesktop & “DesktopIconName.lnk”) THEN
    set oShellLink = WshShell.CreateShortcut(strDesktop & “DesktopIconName.lnk”)
    oShellLink.TargetPath = “http://WebSiteAddress”
    oShellLink.WindowStyle = 1
    oShellLink.IconLocation = “dqrc.ico”
    oShellLink.Description = “DesktopIconDescription”
    oShellLink.WorkingDirectory = “http://WebSiteAddress”
    oShellLink.Save
    set oShellLink = NOTHING
    END IF
    ________
    XexoticCarianeX live

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.