You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2021-05-13 11:20:28

lee
Member
Registered: 2007-01-31
Posts: 562

Deploiement Teletravail

Bonjour
dans le cadre de teletravail il n'y a plus de GPO Ordinateur qui s'applique  par la connection VPN le poste etant deja demarré
j'ai modifie le script pour telecharger les parametres de config en http et le programme setuplocation=http://url
et les postes en teletravail vont executer au demarrage du poste le script fusion.vbs
J'ai ajouté un fichier de config
WSetup = "fusioninventory-agent_windows.cfg" constitué des 4 lignes ci dessous pour recuperer les variables

# Variables par Ligne 1: Version  Ligne 2 : Force  Ligne 3 : VerBose (ne pas supprimer cette ligne)
2.6
No
Yes

par contre je constate un ralentissement evident quand je teste la fonction ishttp(Setuplocation)

' MAIN
'
'

Dim nMinutesToAdvance, strCmd, strSystemArchitecture, strTempDir, WshShell
Set WshShell = WScript.CreateObject("WScript.shell")

Dim fs, f, ts, s,Commentaire

nMinutesToAdvance = 5


'If isHttp(SetupLocation) Then
    ShowMessage("downloading Config'" & SetupLocation & "/" & WSetup & "'!")
    If SaveWebBinary(SetupLocation, WSetup) Then
     
        Set fs = CreateObject("Scripting.FileSystemObject")
        strCmd = WshShell.ExpandEnvironmentStrings("%ComSpec%")
        strTempDir = WshShell.ExpandEnvironmentStrings("%TEMP%")
       
        ShowMessage("Fichier: """ & strTempDir & "\" & WSetup & """ ")
        Set f = fs.GetFile(""& strTempDir & "\" & WSetup & "")
        Set ts = f.OpenAsTextStream(1, -2)
        Commentaire = ts.ReadLine
       
        SetupVersion = ts.ReadLine
        ShowMessage("SetupVersion: " & SetupVersion )
        Force=ts.ReadLine
        ShowMessage("Force: " & Force )
        Verbose=ts.ReadLine
        ShowMessage("Verbose: " & Verbose )
        Setup = "fusioninventory-agent_windows-" & SetupArchitecture & "_" & SetupVersion & ".exe"
        ShowMessage("Setup: " & Setup )
        ts.Close
    Else
        ShowMessage("Error downloading '" & SetupLocation & "/" & WSetup & "'!")
        WScript.Quit 1
    End If
'End If

peut on "accelerer" cette fonction qui m'a l'air simple Ishttp ?
merci


Merci

GLPI 10.0.11/ Plugins GlpiInventory  / AgentGlpi : 1.5  < Serveur Debian 64 Bits>

Offline

Board footer

Powered by FluxBB