Mark van Zon Posted May 18, 2006 Share Posted May 18, 2006 I'm making a script, and i want to copy a file to C:\Documents and Settings\Eigenaar\Mijn documenten (Dutch) But on other computers is the name:"Eigenaar" not the same, how can i config my script so, that when he runs, that he automatic knows the on that moment logged user Example My username on windows is Mark I run this script and then the scripts automatic knows that the username is Mark ( C:\Documents and Settings\Mark\Mijn documenten) Link to comment Share on other sites More sharing options...
KilRoy Posted May 18, 2006 Share Posted May 18, 2006 Add a variable to get the username of the currently logged in user. $var = @Username $MyDocs = "c:\Documents and Settings\" & $var & "\Mijn documenten" OR $Docs = "C:\Documents and Settings\" & @Username & "\Mijn documenten" Hope this helps. KilRoy Link to comment Share on other sites More sharing options...
Micha1405 Posted May 18, 2006 Share Posted May 18, 2006 use macro function @MyDocumentsDir My TrayToolBar Link to comment Share on other sites More sharing options...
KilRoy Posted May 18, 2006 Share Posted May 18, 2006 Micha1405, Thanks, I hadn't seen that one. Guess I should read the Help a little more!! KilRoy 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