I've configured an elevated task in DEM Manager 2303 (with corresponding agent installed).
The executable is: <full path>\xcopy.exe
The arguments are: "source path" "destination path" /y
If I open CMD (elevated) and run - xcopy.exe "source path" "destination path" /y - it executes without a problem.
However, in DEM it executes, but ultimately does nothing. I've set it to trigger after logon.
It opens xcopy.exe and then immediately exits.
When I run the task with FlexEngine:
"C:\Program Files\Immidio\Flex Profiles\FlexEngine.exe" -LaunchTask "NameOfTask"
It does the same thing, briefly opens xcopy.exe and then exits, but doesn't do anything else.
Am I completely missing something here? I've spent a better portion of the day trying to figure out this otherwise seemingly straightforward and simple task.
The log says it has "Elevated task "Name of Task" x number of times" and otherwise shows no error.
Are you using cmd as the launcher in your DEM task ? If yes, you must select the elevate child processes option.
If not you can also try with this option with or without cmd at the beginning to check if that changes the behaviour.
like this: C:\Windows\System32\cmd.exe/c xcopy ...
C:\Windows\System32\cmd.exe/c xcopy ... was the first thing I tried, before I just decided to launch xcopy directly. Same behavior.
I'm thinking I'll just manually put the file on the gold image for all the time it taking to figure this out.
I've been looking through the threads and it seems there are always problems with doing this kind of thing.
In the past I created similar commands with PowerShell, then wrapped it in .exe, but I was hoping to not have to do something like that and that DEM would just WORK.
Thanks for the input though.
I just tested with the following elevated task:
Launching that task does indeed copy the DEM install folder to another folder in Program Files that my non-admin user does not have permissions to:
At the start, that destination folder does not exist, and my test user gets access denied when trying to run that xcopy command the "normal" way. I then launch the elevated task, and show that the copy successfully took place.
Can you share the XML config file for your elevated task, either publicly or via a private message?