wklw2005 Posted February 23, 2012 Share Posted February 23, 2012 Hello, I am trying to copy 5 AutoCad files from the server remotely to the the user profile. Type the machine name in the input box, then check the radio button and the files copy. Here is the code for the first radio button and it works great. Case $msg = $Profiles And BitAND(GUICtrlRead($Profiles), $GUI_CHECKED) = $GUI_CHECKED FileCopy("\\Server\Files", "\\" & GUICtrlRead($RemoteProfiles) & "\c$\Users\Public\Desktop") Now I am trying to remotely copy some cad files to the current user logged in using the input box and clicking the second radio box. The code below is not right. Case $msg = $CUI And BitAND(GUICtrlRead($CUI), $GUI_CHECKED) = $GUI_CHECKED FileCopy("\\Servername\Files", "\\" & GUICtrlRead($RemoteProfiles) & ,"\c$\@UserProfileDir\AppData\Roaming\Autodesk\AutoCAD 2010\R18.0\enu\Support") Can someone please help. Link to comment Share on other sites More sharing options...
willichan Posted February 23, 2012 Share Posted February 23, 2012 @UserProfileDir will give you the profile path for the currently logged in user on the machine the script is running on. It does not tell you who is logged in on the remote machine. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
wklw2005 Posted February 23, 2012 Author Share Posted February 23, 2012 Case $msg = $CUI And BitAND(GUICtrlRead($CUI), $GUI_CHECKED) = $GUI_CHECKED FileCopy("ServernameFiles", "" & GUICtrlRead($RemoteProfiles) & ,"c$%currentuser%AppDataRoamingAutodeskAutoCAD 2010R18.0enuSupport") so something like this? Link to comment Share on other sites More sharing options...
willichan Posted February 23, 2012 Share Posted February 23, 2012 Again, %currentuser% will be a local variable, not a remote variable.I wish I could tell you how to find who was logged in remotely, but I haven't researched that. Since technically, when you remotely access the machine, you are also logged in to that machine, you would not only have to determine who all is logged in, but also which one is the user actually sitting at the PC.Unfortunately, it won't be so easy as just using a system variable. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
DW1 Posted February 23, 2012 Share Posted February 23, 2012 See this thread: AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now