Bundles containing actions that use APPDATA environment variable fail to run when they are executed as a normal user after the third time is launched

  • 7014840
  • 03-Apr-2014
  • 03-Apr-2014

Environment

Novell ZENworks Configuration Management 11.3 Bundles

Situation

Bundles containing actions that use the %APPDATA% environment variable fail to run when such bundle is executed more than two times on the same device and after it's third execution it will continue failing until the managed device is rebooted.
 
The following steps can provide more detailed information on how this issue can be duplicated
 
1. Create a bundle in ZCC using Copy Directory action under the install tab
2. Source Directory should be a shared drive path or physical path
3. Destination source should be %APPDATA% and a directory afterwards
4. Select the option to run this action as logged in user and save the action.
5. Click on the Options link under the Install tab of the bundle
6. Select the Option "Install Always" under Install Frequency and click ok
7. Assign the bundle to a device
8. Login to the device as a normal user (NOT Administrator user)
9. Verify the bundle more than 2 times and let it finish each time before verifying it the third time.
10. The issue will start happening after the third consecutive bundle verification

Status

Reported to Engineering

Additional Information

Once the error is reproduced on a managed device, zmd-messages.log will provide the entry below:
 
[DEBUG] [04/03/2014 12:01:30.242] [1076] [ZenworksWindowsService] [50] [] [ActionManager] [] [Processing Copy Directory Action] [] [] [] [ZENworks Agent]
[TRACE] [04/03/2014 12:01:30.280] [1076] [ZenworksWindowsService] [50] [] [Copy Directory] [] [Unable to create directory C:\Windows\system32\config\systemprofile\AppData\Roaming\Orbitron\] [] [] [] [ZENworks Agent]
[TRACE] [04/03/2014 12:01:30.445] [1076] [ZenworksWindowsService] [50] [] [Copy Directory] [] [Got exception - System.UnauthorizedAccessException: Access to the path 'C:\Windows\system32\config\systemprofile' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
   at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
   at Novell.Zenworks.ActionManager.GenericActions.CopyFilesLib.CopyDirectoryFunc(String Src, String Dst, Session session, CopyDirectoryDataCopyOption copyOption, Boolean rootFolder, IDictionary fileIndex, FileAttribute() fileAttributes)] [] [] [] [ZENworks Agent]
[DEBUG] [04/03/2014 12:01:30.563] [1076] [ZenworksWindowsService] [50] [] [ActionManager] [] [Action handler Copy Directory Action finished processing  with error: GenericActions.UnexpectedError.] [] [] [] [ZENworks Agent]