Ciao a tutti,
allora... ho questo file .vbs che su alcuni pc non funge xkè bloccato dall antivirus.
Per questo vorrei renderlo un eseguibile .exe ma sono 1 po a corto di conoscenze.
Dispongo di Visual studio enterprise 6.0.
Questo è il codice, come andrebbe cambiato????
codice:Option Explicit Dim Shell Set Shell = WScript.CreateObject("WScript.Shell") dim objNetwork,utente,ipadd Set objNetwork = Wscript.CreateObject("Wscript.Network") 'ottengo la username utente=objNetwork.UserName 'ottengo nome pc ipadd=objNetwork.ComputerName Set objNetwork=nothing 'apto e scrivo 1 file di testo Dim objtxt,apritxt,linea Set objtxt=CreateObject("Scripting.FileSystemObject") Set apritxt=objtxt.OpenTextFile("\\Server2\log$\logmonitor.txt",8) apritxt.writeline "!logon:"&utente&":"&ipadd&":"&Now() apritxt.Close set apritxt=nothing Set objtxt=nothing 'connetto l'utente alla sua cqrtella Shell.Run "net use z: \\server2\botteghe\"&utente&"", 1 Set Shell = Nothing

Rispondi quotando