Jump to content

Remote User profiles


wklw2005
 Share

Recommended Posts

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

@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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...