1 Reply Latest reply on Oct 3, 2013 10:38 AM by Sconnaug

    When running script as system app.StartPro.exe gets written as app.exe

    Rookie

      We recently upgraded LDMS from 9.0 to 9.5 (Not Sp1 yet). I have a VB script (see below) to delete an existing shortcut and create a new one. This works fine when manually run but when run through Landesk as system it changes the target from (path)\app.StartPro.EXE to (path)\app.EXE. It does this consistantly and only this part of the script exicution appears to be effected. When I used the "Run as specified user" option under accounts and placed my user Name and PW in there it works OK. This script worked fine in 9.0.

       

       

      Anyone else run into an issue like this and does SP1 resolve this issue.

       

       

      Set Shell = CreateObject("WScript.Shell")
      strProgramFiles = Shell.ExpandEnvironmentStrings("%PROGRAMFILES%")
      '********** Delete existing Link ***********

      Set FSO = CreateObject("Scripting.FileSystemObject")
      DesktopPath = Shell.SpecialFolders("AllUsersDesktop")
      If (fso.FileExists(DesktopPath & "\DepositPro Test.lnk")) Then
      FSO.DeleteFile DesktopPath & "\DepositPro Test.lnk"
      End If

       

       

      '************ Create .net Link ****************
      Set filesys = CreateObject("Scripting.FileSystemObject")

      strFolder = filesys.GetAbsolutePathName(".")
      strIconLoc = strProgramFiles & "\LandeskIcons\DP_Net.ico"

      strDesktopFolder = Shell.SpecialFolders("AllUsersDesktop")
      Set objShortCut = Shell.CreateShortcut(strDesktopFolder & "/DepositPro Test Net.lnk")
      objShortCut.TargetPath = "J:\dp_admin\Dp_admin\sapps\HARLAND\app.StartPro.exe"
      ObjShortCut.IconLocation = strIconLoc
      ObjShortcut.Arguments = " /w1 /pntis"
      ObjShortcut.WorkingDirectory = "J:\dp_admin\Dp_admin\sapps\HARLAND"
      objShortCut.Save

      '************* Copy Icon File *******************

      On Error Resume Next

      filesys.CreateFolder strProgramFiles & "\LandeskIcons"
      filesys.CopyFile strProgramFiles & "\LANDesk\LDClient\sdmcache\softwaredist\DepositPro\DP_Net.ico" , strProgramFiles & "\LandeskIcons\", OverwriteExisting