

InterviewSolution
Saved Bookmarks
1. |
Solve : remote system variables? |
Answer» <html><body><p>I try to copy something (for example an txt file, an excel file) on every desktop of the curent logged in user in Windows 2000 and Windows XP, in a Windows 2000 domain. How can I access their username <a href="https://interviewquestions.tuteehub.com/tag/remotely-7289547" style="font-weight:bold;" target="_blank" title="Click to know more about REMOTELY">REMOTELY</a>? I want to make a batch file, in which I should write:<br/>copy c:\source.file "\\compDestination\documents and settings\%username%\desktop\"<br/><br/>But if I write that way, it won't work, because it replaces %username% with the username of the current logged user on the computer where that bat is launched.<br/>Soooooooooooooo.... Help :-/ <br/>Other <a href="https://interviewquestions.tuteehub.com/tag/ways-25480" style="font-weight:bold;" target="_blank" title="Click to know more about WAYS">WAYS</a> than that I <a href="https://interviewquestions.tuteehub.com/tag/choosed-2016304" style="font-weight:bold;" target="_blank" title="Click to know more about CHOOSED">CHOOSED</a>?You would need to use a <a href="https://interviewquestions.tuteehub.com/tag/vbscript-723283" style="font-weight:bold;" target="_blank" title="Click to know more about VBSCRIPT">VBSCRIPT</a> to access %username% into a variable and then build your copy string and <a href="https://interviewquestions.tuteehub.com/tag/execute-979162" style="font-weight:bold;" target="_blank" title="Click to know more about EXECUTE">EXECUTE</a> it inside the script.<br/><br/><br/><br/></p></body></html> | |