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 would I put to make the .vbs know their username Ex "C:\users\username\desktop"
Introduction to VBScript Commands. VBScript is Visual Basic Scripting Edition. It is a scripting language that is distributed by Microsoft and is similar to Visual Basic and its applications. Usually, VBScript is primarily used in QTP (Quick Test Professional).
VBScript is supported by Internet Explorer of Microsoft only, while other browsers (Firefox and Chrome) offer JavaScript support.
Goodbye, VBScript! Microsoft released a similar update for Windows 10 on July 9, 2019. Now, on any supported Windows system with the latest updates installed, VBScript will be disabled by default. VBScript was already mostly gone.
To get the username of the person currently logged in:
strUser = CreateObject("WScript.Network").UserName
In VBScript you can get the path to the current user's desktop folder via the SpecialFolders
collection:
WScript.Echo CreateObject("WScript.Shell").SpecialFolders("Desktop")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With