#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    3
    Rep Power
    0

    Login script help


    Here is the login script applied to computers, which basically creates a shortcut on the users desktop (any who logs into the affected pc's)

    --------

    strDesktop = "C:\Documents and Settings\All Users\Desktop"
    set WshShell = WScript.CreateObject("WScript.Shell")
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    If objFSO.FileExists(strDesktop & "\oururelhere.urel") Then

    Else
    Set shortcut = WshShell.createshortcut(strDesktop & "\oururelhere.urel")
    shortcut.targetpath ="oururelhere.urel")
    shortcut.save
    End If

    -------------

    Works perfect, but now i want to enforce it to use Chrome (which is already installed on the users PC's but isn't the default browser and needs to stay that way!)


    please help! its blagging my head!
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    3
    Rep Power
    0
    Anyone?
  4. #3
  5. Type Cast Exception
    Devshed Supreme Being (6500+ posts)

    Join Date
    Apr 2004
    Location
    OAKLAND CA | Adam's Point (Fairyland)
    Posts
    14,954
    Rep Power
    8617
    If it's not the default browser then you need to specify the application. I don't have chrome installed but this is how it would work for firefox (you can put this in the Run... prompt in windows to test how it works)

    Code:
    firefox.exe "http://medialint.com"
    Theoretically you should be able to replace firefox.exe with chrome's executable (chrome.exe?) to achieve the same. I don't know if it will let you make the shortcut that way programatically ... if you manually do it you need to browse for the full path of the executable.
    Last edited by medialint; November 16th, 2012 at 12:15 PM.
    medialint.com

    “Today you are You, that is truer than true. There is no one alive who is Youer than You.” - Dr. Seuss
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    3
    Rep Power
    0
    I've tried -

    shortcut.targetpath =%userprofile%\Local Settings\Application

    Data\Google\Chrome\Application\chrome.exe "insertaddresshere.com")

    This doesnt seem to work

    Any ideas?

IMN logo majestic logo threadwatch logo seochat tools logo