تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[كود] طلب كود
#2
بسم الله الرحمن الرحيم

إستخدم هذا الكود :

كود :
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Private Function Get_UserName() As String
On Error Resume Next: Err.Clear
   
Dim StrUserName As String

'Create a buffer
StrUserName = String(100, Chr$(0))
'Get the username
GetUserName StrUserName, 100
'strip the rest of the buffer
StrUserName = Left$(StrUserName, InStr(StrUserName, Chr$(0)) - 1)
'Show the temppath and the username
Get_UserName = StrUserName
   
End Function

Private Sub Command1_Click()

Dim MyProPath As String

MyProPath = "C:\Users\" & Trim$(Get_UserName) & "\AppData\Roaming\Thinstall\Phonebook (SEC)\%ProgramFilesDir%\Phonebook (SEC)\"

'للنسخ
'FileCopy "D:\DIGITAL.exe", MyProPath & "DIGITAL.exe"

'للنقل
Name MyProPath & "DIGITAL.exe" As "D:\Faisal.exe"

MsgBox "OK"

End Sub
الرد }}}
تم الشكر بواسطة: a_almisery , حامد محمد


الردود في هذا الموضوع
طلب كود - بواسطة فـ ـيـ ـصـ ـل - 01-12-14, 07:56 PM
RE: طلب كود - بواسطة Ahmed_Mansoor - 02-12-14, 12:37 AM
RE: طلب كود - بواسطة طارق جمعه محمد - 03-09-19, 05:54 PM

التنقل السريع :


يقوم بقرائة الموضوع: