General discussion

  • Creator
    Topic
  • #2179043

    GP vbs Logon Script

    Locked

    by mandat ·

    I have a vbs logon script that is supposed to run a few exe’s if their corresponding apps are not installed (Asset mgmt, AV and SW Dep tool)

    When I manually run the code from within XP and W2k and it performs as expected. The executables are run and applications are installed.

    But when running the same code as my logon script, the applications are not installed.

    Help would be greatly appreciated.

All Comments

  • Author
    Replies
    • #3120447

      Reply To: GP vbs Logon Script

      by mandat ·

      In reply to GP vbs Logon Script

      Point value changed by question poster.

    • #3120436

      Reply To: GP vbs Logon Script

      by neilb@uk ·

      In reply to GP vbs Logon Script

      Can you post the script?

      • #3121569

        Reply To: GP vbs Logon Script

        by mandat ·

        In reply to Reply To: GP vbs Logon Script

        Poster rated this answer.

        The issue turned out to be that I was trying to fire off a window before the user was fully logged in. Are trying a different method.

    • #3117576

      Reply To: GP vbs Logon Script

      by mandat ·

      In reply to GP vbs Logon Script

      Example script. Heavily edited to gt under 2000 chars

      dim fsys, wShell, WNet
      Set fSys = CreateObject (“Scripting.FileSystemObject”) Set wShell = WScript.CreateObject(“WScript.Shell”)
      Set WNet = WScript.CreateObject(“WScript.Network”)
      dim System_Root, System_Drive, Citrix_Sys, TermServ_Sys, Serv_Sys dim LogonServer, UserProfile, ComputerName, DebugFile
      System_Root = wShell.ExpandEnvironmentStrings(“%SystemRoot%”)
      System_Drive = wShell.ExpandEnvironmentStrings(“%SystemDrive%”)
      Citrix_Sys = System_Root & “\System32\Qfarm.exe”
      New_Citrix = System_Root & “\System32\newfarm.exe”
      TermServ_Sys = System_Root & “\System32\termsrv.exe”
      Serv_Sys = System_Drive & “\norun\”
      LogonServer = wShell.ExpandEnvironmentStrings(“%logonserver%”)
      UserProfile = wShell.ExpandEnvironmentStrings(“%UserProfile%”)
      ComputerName = wShell.ExpandEnvironmentStrings(“%ComputerName%”)
      UserName = UCase(wShell.ExpandEnvironmentStrings(“%UserName%”))
      ComputerLocation = Ucase(Left(ComputerName,2))
      On Error Resume Next
      Err.Description
      Do_Citrix = 0
      If fSys.FileExists(Serv_Sys) Then WScript.Quit() If fSys.FileExists(TermServ_Sys) Then
      If fSys.FileExists(Citrix_Sys) or fSys.FileExists(New_Citrix) Then Do_Citrix = 1
      Else
      WScript.Quit()
      End If
      End If
      dim LocServ, fdrive
      If (Do_Citrix <> 1) Then
      select case ComputerLocation
      case “JH”
      LocServ = “JHSANCLUS”
      case “ST”
      LocServ = “STSANCLUS”
      case else
      LocServ = “STSANCLUS”
      End Select
      fdrive = “\\” & LocServ & “\PWV50”
      End If
      dim EPO_Install_String
      If (Do_Citrix <> 1 ) Then
      If NOT ComputerLocation = “IM” Then
      Const EPO_Client_LocalLocn = “C:\EPOAgent\naimas32.exe”
      EPO_Install_String = FDrive & “\framepkg.exe /s”
      If NOT fsys.FileExists(EPO_Client_LocalLocn)Then wShell.Run EPO_Install_String, 0 ,False
      End If
      End If
      Set wShell = Nothing
      Set fSys = Nothing

    • #3121568

      Reply To: GP vbs Logon Script

      by mandat ·

      In reply to GP vbs Logon Script

      This question was closed by the author

Viewing 3 reply threads