remote command variable

0

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

Cancel
login to comment
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. 

Cancel
login to comment

0

thanks

Cancel
login to comment

0

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

Cancel
login to comment

Reply