VMware Horizon Community
almostIT
Enthusiast
Enthusiast

Basic elevated task does not work

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. 

 

Reply
0 Kudos
4 Replies
vDruid
Enthusiast
Enthusiast

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 ...


// if you think this helps, please mark as helpful or correct , thx ! \\
vDruid
Reply
0 Kudos
almostIT
Enthusiast
Enthusiast

 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. 

Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee

Hi @almostIT,

I just tested with the following elevated task:

DEMdev_0-1685462518501.png

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:

DEMdev_1-1685462582626.png

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?

 

Reply
0 Kudos
DEMNewBie
Contributor
Contributor

I have the same problem. The log says, "Elevated task 'WriteMessage' does not exist".

Please find the attached file.

Reply
0 Kudos