Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

remote command variable

hi all,

im sending out a remote command to one of my pc's but got a problem when i do this, it doesnt work

copy "C:\Explorer\Explorer++.exe" "C:\Users\%USERNAME%\Desktop"

but when i do this, it does

copy "C:\Explorer\Explorer++.exe" "C:\Users\robw\Desktop"

any idea please

many thanks,

rob

0

Comments

3 comments
Date Votes
  • Hey Rob,

    Use following command,

    xcopy "\\sharedlocation\Explorer++.exe" "%userprofile%\desktop" /Y

    And in Package setting-Option

    Select Run As "Logged on user"

    Regards,

    Pushpak

    1
  • thanks

    0
  • Pushpak Patil is correct. You want to do this from PDQ Deploy where you can set the Run As to Logged On User. When you run a remote command (or deploy a package as Deploy User) then any user-level variables (such as %USERNAME%) will be in the context of the Scan or Deploy user (RobW).

    Keep in mind that the user you want to receive the new file must be logged on at the time of deployment. 

    0