No icon on desktop but logs indicated successful run of exe to copy it

Author Message
sandyb

  • Total Posts : 5
  • Scores: 0
  • Reward points : 1150
  • Joined: 7/17/2012
  • Status: offline
No icon on desktop but logs indicated successful run of exe to copy it Tuesday, July 17, 2012 9:02 AM (permalink)
0
SCCM 2007 R3.  Created a package and advertisement that runs a program from local cache that copies an icon (located in the same cache dir) to the user's desktop.  The execmgr.log indicates a success. 
"Execution is complete for program COT Menu. The exit code is 0, the execution status is Success  execmgr            7/16/2012 2:48:42 PM       1900 (0x076C)"  The path and exe in the log file are also correct.
I can run the exe (it is called copyicon.exe) from the local ccm cache and it copies the icon to the desktop.
I can run the exe from the start/run and same results.
How do I troubleshoot no errors but no results either? 
I have been working on this for days and would appreciate any help/direction. 
Thanks,
Sandy
 
 
#1
    mcoleman210

    • Total Posts : 11
    • Scores: 0
    • Reward points : 35330
    • Joined: 6/7/2006
    • Status: offline
    Re:No icon on desktop but logs indicated successful run of exe to copy it Tuesday, July 17, 2012 9:32 AM (permalink)
    0
    Sounds like the job is running as the system account, and the icon is getting placed there.  If you can run it manually with your account, and it works, then that is your issue.  If all this does is copy an icon, either copy it to the All User desktop, or run the job using the logged on users credentials.
     
    #2
      sandyb

      • Total Posts : 5
      • Scores: 0
      • Reward points : 1150
      • Joined: 7/17/2012
      • Status: offline
      Re:No icon on desktop but logs indicated successful run of exe to copy it Tuesday, July 17, 2012 9:47 AM (permalink)
      0
      I am running it with a Run Mode of Run with user's rights
       
      #3
        fritschetom

        • Total Posts : 17
        • Scores: 0
        • Reward points : 6360
        • Joined: 3/21/2012
        • Location: Indiana
        • Status: offline
        Re:No icon on desktop but logs indicated successful run of exe to copy it Tuesday, July 17, 2012 11:33 AM (permalink)
        0
        here is a script that is doing what you are looking for i believe...you will have to modify the paths for the icon files...save the below txt as a vbs.  in your sccm package call cscript.exe <new.vbs>
         
        On Error Resume Next
        Dim objShell, FSO
        strComputer = "."
        Set objShell = WScript.CreateObject("WScript.Shell")
        Set fso = CreateObject("Scripting.FileSystemObject")
        Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
        strStartupFolder7 = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\"
        strStartupFolderXP = "C:\Documents and Settings\All Users\Start Menu\Programs\Startup\"
        '--------------------check wmi for windows version (7 or XP) and copies phone client to startup folder
         Set objWMIService3 = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
         Set colItems3 = objWMIService3.ExecQuery( _
            "SELECT * FROM Win32_OperatingSystem",,48)
         For Each objItem3 in colItems3
         '    Wscript.Echo "Caption: " & objItem.Caption
         IF instr(objItem3.Caption, "Windows 7") >0 then 'check wmi os caption
         'wscript.echo "hello 7"
         fso.copyfile "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Interactive Intelligence\Interaction Client.lnk", (strStartupFolder7) 'Copy start menu link to startup folder
         ElseIF instr(objItem3.Caption, "Windows XP") >0 Then 'check wmi os caption
         'wscript.echo "hello XP"
         fso.copyfile "C:\Documents and Settings\All Users\Start Menu\Programs\Interactive Intelligence\Interaction Client.lnk", (strStartupFolderXP) 'Copy start menu link to startup folder
         End IF
         Next
         
        #4
          sandyb

          • Total Posts : 5
          • Scores: 0
          • Reward points : 1150
          • Joined: 7/17/2012
          • Status: offline
          Re:No icon on desktop but logs indicated successful run of exe to copy it Tuesday, July 17, 2012 1:09 PM (permalink)
          0
          I have created an exe using Autoit and the command is
          ; Script Start

          FileCopy("*.lnk",@DesktopDir); Copy the icon to the users desktop

          ; Script End
           
          Since I am running it as the user and not as an admin this should work (and it does work just not thru SCCM).   Even when the user selects to run thru Advertised programs it says it ran successfully but nothing shows on the desktop nor are there any errors in the logs. 
           
          #5
            CAP

            • Total Posts : 143
            • Scores: 0
            • Reward points : 34860
            • Joined: 12/9/2011
            • Status: offline
            Re:No icon on desktop but logs indicated successful run of exe to copy it Wednesday, July 18, 2012 8:17 AM (permalink)
            0
            Does the sript work when you copy it somewhere else? Does it work when ran from the DP instead of the cache? You should not need to involve the user at all if you are using for Windows 7 -- C:\Users\Public\Desktop
            and for Win XP C:\documents and settings\all users\desktop.
             
             
            Carl Polk
             
            #6
              sandyb

              • Total Posts : 5
              • Scores: 0
              • Reward points : 1150
              • Joined: 7/17/2012
              • Status: offline
              Re:No icon on desktop but logs indicated successful run of exe to copy it Wednesday, July 18, 2012 9:22 AM (permalink)
              0
              I am not involving the user.  That was for testing only.
              I think I found the fix.  I had 2 different programs in the same package.  One for XP and one for Win7.  They had the same source but ran from different sub dir. under the source so I had the source listed as the top level dir and the command line of the program as subdir\program.exe.  This does not work.  I had to create two different packages and make the source the dir\subdir.  It is now working.
               
              #7
                Online Bookmarks Sharing: Share/Bookmark

                Jump to:

                Current active users

                There are 0 members and 1 guests.

                Icon Legend and Permission

                • New Messages
                • No New Messages
                • Hot Topic w/ New Messages
                • Hot Topic w/o New Messages
                • Locked w/ New Messages
                • Locked w/o New Messages
                • Read Message
                • Post New Thread
                • Reply to message
                • Post New Poll
                • Submit Vote
                • Post reward post
                • Delete my own posts
                • Delete my own threads
                • Rate post

                2000-2013 ASPPlayground.NET Forum Version 3.9