So i\'m trying to move a .vbs file with .movefile line and i want to give the .vbs to me friends but in order it to work I would have to know what their username is. what wo
Set wshShell = CreateObject( "WScript.Shell" )
strName = wshShell.ExpandEnvironmentStrings( "%USERNAME%" )
That would store the username in the string "strName' so it would work like this:
x=messagebox ("Hello ") + strName ,1, strName)
or in your case:
x=messagebox ("C:\Users\" + strName + "\Desktop\name" ,1, "User name in c:\ directory below"