Unable to copy a File and need suggestion on Folder creation via Bigfix Actionscript

I am trying to install the Oxygen XML application, and post-installation I need to create a directory under the current user’s AppData\Roaming path and copy a license XML file into it.

While the directory creation is handled through a .bat script, I am encountering an error during the file copy step. The error message is as below:

Command failed (Relevance substitution failed) copy " __Download\license.xml" "{concatenation of "c:\users" & name of current user & "\AppData\Roaming\com.oxygenxml\license.xml"}" (action:16409)
At 09:18:56 -0700 -

Regards,

Bharat

Did you try to pre-create the folder, then copy the file into it?

There can also be cases where the profile path isn’t the exact same as the login name so probablay a good idea not to assume it will be. If no user is logged in when the action runs, that would also cause relevance substitution failures though depends what options you are using when running the fixlet.

Maybe the approach discussed on Current user profile path with text string added - managed property - Content Authoring - BigFix Forum may be of help.

yes I have created a folder and then tried to copy the file.

The issue here is that a slash is missing. See below:

//INCORRECT PATH
Q: concatenation of "c:\users" & name of current user & "\AppData\Roaming\com.oxygenxml\license.xml"
A: c:\usersvkhurava\AppData\Roaming\com.oxygenxml\license.xml
T: 2.237 ms

//CORRECT METHOD
Q: concatenation of "c:\users" & "\" & name of current user & "\AppData\Roaming\com.oxygenxml\license.xml"
A: c:\users\vkhurava\AppData\Roaming\com.oxygenxml\license.xml
T: 4.181 ms

OR
Q: concatenation of "c:\users\" & name of current user & "\AppData\Roaming\com.oxygenxml\license.xml"
A: c:\users\vkhurava\AppData\Roaming\com.oxygenxml\license.xml

Though @vk.khurava has advised about the missing “\” I’m not sure that in itself would cause relevance substitution errors, though it would certainly cause the copy to fail with another error.

This may depend on your environment and the specific devices the action is failing on. Are you running/testing this on devices that are using remote RDP or multi-user sessions? If yes then current user may be the issue as remote users are not detected via the current user inspector.

These are from a remote session where 2 accounts are logged in over RDP

Q: name of current user
E: Singular expression refers to nonexistent object.

Q: number of current users
A: 0
T: 0.080 ms

Q: number of logged on users
A: 2
T: 0.029 ms

Q: names of logged on users
A: User1
A: User2
T: 0.058 ms

Q: concatenation of "C:\Users\" & name of current user & "\AppData\Roaming\com.oxygenxml\license.xml"
E: Singular expression refers to nonexistent object.

Q: (concatenation of "C:\Users\" & it & "\AppData\Roaming\com.oxygenxml\license.xml") of names of logged on users
A: C:\Users\User1\AppData\Roaming\com.oxygenxml\license.xml
A: C:\Users\User2\AppData\Roaming\com.oxygenxml\license.xml
T: 0.118 ms

1 Like

I second this. Over the last 5 or 6 years, my login name has changed twice and my profile is still under original account name.

May need to experiment with this, but I think one of these should be helpful. In the debugger, be sure to 'evaluate using client'

q: (name of it, home directory of it, profile folder of it) of users of logged on users
A: Administrator, C:\Users\Administrator, C:\Users\Administrator