[R] Copier un fichier sur PC du réseau
Posté : jeu. 21 sept. 2017 18:25
Bonjour à tous ! Pour les besoins de mon entreprise il faut que je copies un fichier qui se trouve dans mon pc et que je fasse un deploiement pour tous les ordinateurs connectés au réseau, cependant je suis novice en code c'est pourquoi je vous demande votre avis après avoir écris ce petit morceau de code
Merci d'avance 


#include <FileConstants.au3>
#NoTrayIcon
Global $sUserName = "administrateur"
Global $sPassWord = "passadmin"
Global $sDomaine = "domaine"
Local $sSourceFilePath = @ScriptDir & "\00.00.00.000\C:\...\..\...\Fichier.ini"
Local $sDestpath = "C:\...\..\..."
IF NOT IsAdmin() Then
Run($sUserName, $sDomaine, $sPassWord, 0, @ScriptFullPath, @scriptdir)
Exit
EndIf
FileCopy($sSourceFilePath, $sDestPath, $FR_OVERWRITE, $FR_CREATEPATH)
#NoTrayIcon
Global $sUserName = "administrateur"
Global $sPassWord = "passadmin"
Global $sDomaine = "domaine"
Local $sSourceFilePath = @ScriptDir & "\00.00.00.000\C:\...\..\...\Fichier.ini"
Local $sDestpath = "C:\...\..\..."
IF NOT IsAdmin() Then
Run($sUserName, $sDomaine, $sPassWord, 0, @ScriptFullPath, @scriptdir)
Exit
EndIf
FileCopy($sSourceFilePath, $sDestPath, $FR_OVERWRITE, $FR_CREATEPATH)