No announcement yet.

Login to server script

  • Filter
  • Time
  • Show
Clear All
new posts

  • Login to server script

    Can anyone help with a viz artist scripting issue? I would like to connect to a server using a login and password to read a file.

    Users would be previewing the scene in inews but may not have login info for the server.


  • #2
    I don't quite follow what you need... Is this something in Pilot template or somewhere else? Could you explain what the file is and what the server is; a webserver, file server on the network, something else...?


    • #3
      Thanks for responding. I'm reading a csv file to populate a graphic in a scene. The csv files are on a file server on a private network. The server I need to access requires a user name and password. In this case I would like to contain the login script in the viz-artist scene and not in the template. At present I can read the data but only if my machine has already been logged onto the server.


      • #4

        I don't know if VizScript can perform the login natively, but there is a sort of a hack to do that by using VizScript to create a little temp VB-script (system.SaveTextFile) and then execute that (system.StartApplication) and the drive should be mapped.

        This is dirty, though.

        Your username and password are readable from the VizScript sourcecode and the resulting .vbs file,so maybe you should still try something else...

        dim VBS as string
        dim TMPFILE as string = "C:/Logon.vbs"
        VBS = "Dim objNetwork\n"
        VBS = VBS & "Set objNetwork = WScript.CreateObject(\"WScript.Network\")\n"
        VBS = VBS & "strLocalDrive = \"L:\"\n"
        VBS = VBS & "strRemoteShare = \"\\\\server\\share_name\"\n"
        VBS = VBS & "strPer = \"FALSE\"\n"
        VBS = VBS & "strUsr = \"username\"\n"
        VBS = VBS & "strPas = \"password\"\n"
        VBS = VBS & "objNetwork.MapNetworkDrive strLocalDrive, strRemoteShare, strPer, strUsr, strPas\n"
        system.SaveTextFile(TMPFILE, VBS)


        • #5
          Ok, will try that first. Thanks.