{"id":213,"date":"2025-02-20T20:37:17","date_gmt":"2025-02-20T16:37:17","guid":{"rendered":"https:\/\/www.arparun.re\/?page_id=213"},"modified":"2025-05-26T17:24:11","modified_gmt":"2025-05-26T13:24:11","slug":"generateur-de-scripts-vbscript","status":"publish","type":"page","link":"https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/","title":{"rendered":"Generateur de Scripts VBScript"},"content":{"rendered":"\n<body>\n    <div class=\"container\">\n        \n        <div class=\"button-group\">\n            <button onclick=\"loadTemplate('mapping')\">Nouveau Mappage<\/button>\n            <button onclick=\"loadTemplate('installation')\">Nouvelle Installation<\/button>\n            <button onclick=\"loadTemplate('service')\">Gestion Service<\/button>\n        <\/div>\n\n        <div class=\"editor-box\">\n            <textarea id=\"vbscriptCode\" placeholder=\"Entrez votre script VBScript ici...\"><\/textarea>\n        <\/div>\n\n        <div class=\"button-group\">\n            <button onclick=\"saveScript()\">Sauvegarder<\/button>\n            <input type=\"file\" id=\"fileLoader\" accept=\".vbs\" style=\"display: none;\" onchange=\"loadFile()\">\n            <button onclick=\"document.getElementById('fileLoader').click()\">Ouvrir<\/button>\n        <\/div>\n\n        <div class=\"output\" id=\"output\">\n            Sortie :<br>\n            <pre id=\"outputText\"><\/pre>\n        <\/div>\n    <\/div>\n\n    <script>\n        \/\/ Templates pour differents cas d'utilisation\n        const templates = {\n            mapping: `Set objNetwork = CreateObject(\"WScript.Network\")\nOn Error Resume Next\nobjNetwork.MapNetworkDrive \"L:\", \"\\\\\\\\serveur\\\\partage\", False, \"domaine\\\\utilisateur\", \"motdepasse\"\nIf Err.Number <> 0 Then\n    MsgBox \"Erreur de mappage : \" & Err.Description\nElse\n    MsgBox \"Lecteur L: mappe avec succes!\"\nEnd If`,\n\n            installation: `Set objShell = CreateObject(\"WScript.Shell\")\nstrCommand = \"msiexec \/i \\\"\\\\\\\\serveur\\\\partage\\\\application.msi\\\" \/quiet\"\nintReturn = objShell.Run(strCommand, 0, True)\n\nIf intReturn = 0 Then\n    MsgBox \"Installation reussie!\"\nElse\n    MsgBox \"Erreur lors de l'installation (Code: \" & intReturn & \")\"\nEnd If`,\n\n            service: `strServiceName = \"NomDuService\"\n\nSet objWMIService = GetObject(\"winmgmts:{impersonationLevel=impersonate}!\\\\\\\\.\\\\root\\\\cimv2\")\nSet colServices = objWMIService.ExecQuery(\"SELECT * FROM Win32_Service WHERE Name = '\" & strServiceName & \"'\")\n\nFor Each objService in colServices\n    If objService.State <> \"Running\" Then\n        objService.StartService()\n    End If\n    MsgBox \"Statut du service : \" & objService.State\nNext`\n        };\n\n        function loadTemplate(templateName) {\n            document.getElementById('vbscriptCode').value = templates[templateName];\n        }\n\n        function saveScript() {\n            const content = document.getElementById('vbscriptCode').value;\n            if(!content) {\n                showOutput(\"Erreur : Le script est vide!\");\n                return;\n            }\n\n            const blob = new Blob([content], { type: 'text\/vbscript' });\n            const link = document.createElement('a');\n            link.href = URL.createObjectURL(blob);\n            link.download = `script_${Date.now()}.vbs`;\n            link.click();\n            showOutput(\"Script sauvegarde avec succes!\");\n        }\n\n        function loadFile() {\n            const file = document.getElementById('fileLoader').files[0];\n            const reader = new FileReader();\n\n            reader.onload = function(e) {\n                document.getElementById('vbscriptCode').value = e.target.result;\n                showOutput(\"Script charge avec succes!\");\n            };\n\n            reader.readAsText(file);\n        }\n\n\n        function showOutput(message) {\n            document.getElementById('outputText').textContent = message;\n        }\n    <\/script>\n<\/body>\n","protected":false},"excerpt":{"rendered":"<p>Nouveau Mappage Nouvelle Installation Gestion Service Sauvegarder Ouvrir Sortie :<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-213","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Generateur de Scripts VBScript - arparun - Informatique Reunion<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Generateur de Scripts VBScript - arparun - Informatique Reunion\" \/>\n<meta property=\"og:description\" content=\"Nouveau Mappage Nouvelle Installation Gestion Service Sauvegarder Ouvrir Sortie :\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/\" \/>\n<meta property=\"og:site_name\" content=\"arparun - Informatique Reunion\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-26T13:24:11+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/\",\"url\":\"https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/\",\"name\":\"Generateur de Scripts VBScript - arparun - Informatique Reunion\",\"isPartOf\":{\"@id\":\"https:\/\/www.arparun.re\/#website\"},\"datePublished\":\"2025-02-20T16:37:17+00:00\",\"dateModified\":\"2025-05-26T13:24:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.arparun.re\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generateur de Scripts VBScript\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.arparun.re\/#website\",\"url\":\"https:\/\/www.arparun.re\/\",\"name\":\"arparun - Informatique Reunion\",\"description\":\"Syst\u00e8mes, R\u00e9seaux et S\u00e9curit\u00e9\",\"publisher\":{\"@id\":\"https:\/\/www.arparun.re\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.arparun.re\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.arparun.re\/#organization\",\"name\":\"Arparun\",\"url\":\"https:\/\/www.arparun.re\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/www.arparun.re\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.arparun.re\/wp-content\/uploads\/2021\/02\/cropped-site.png\",\"contentUrl\":\"https:\/\/www.arparun.re\/wp-content\/uploads\/2021\/02\/cropped-site.png\",\"width\":512,\"height\":512,\"caption\":\"Arparun\"},\"image\":{\"@id\":\"https:\/\/www.arparun.re\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Generateur de Scripts VBScript - arparun - Informatique Reunion","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/","og_locale":"fr_FR","og_type":"article","og_title":"Generateur de Scripts VBScript - arparun - Informatique Reunion","og_description":"Nouveau Mappage Nouvelle Installation Gestion Service Sauvegarder Ouvrir Sortie :","og_url":"https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/","og_site_name":"arparun - Informatique Reunion","article_modified_time":"2025-05-26T13:24:11+00:00","twitter_card":"summary_large_image","twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/","url":"https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/","name":"Generateur de Scripts VBScript - arparun - Informatique Reunion","isPartOf":{"@id":"https:\/\/www.arparun.re\/#website"},"datePublished":"2025-02-20T16:37:17+00:00","dateModified":"2025-05-26T13:24:11+00:00","breadcrumb":{"@id":"https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.arparun.re\/index.php\/generateur-de-scripts-vbscript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.arparun.re\/"},{"@type":"ListItem","position":2,"name":"Generateur de Scripts VBScript"}]},{"@type":"WebSite","@id":"https:\/\/www.arparun.re\/#website","url":"https:\/\/www.arparun.re\/","name":"arparun - Informatique Reunion","description":"Syst\u00e8mes, R\u00e9seaux et S\u00e9curit\u00e9","publisher":{"@id":"https:\/\/www.arparun.re\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.arparun.re\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/www.arparun.re\/#organization","name":"Arparun","url":"https:\/\/www.arparun.re\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.arparun.re\/#\/schema\/logo\/image\/","url":"https:\/\/www.arparun.re\/wp-content\/uploads\/2021\/02\/cropped-site.png","contentUrl":"https:\/\/www.arparun.re\/wp-content\/uploads\/2021\/02\/cropped-site.png","width":512,"height":512,"caption":"Arparun"},"image":{"@id":"https:\/\/www.arparun.re\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.arparun.re\/index.php\/wp-json\/wp\/v2\/pages\/213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.arparun.re\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.arparun.re\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.arparun.re\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.arparun.re\/index.php\/wp-json\/wp\/v2\/comments?post=213"}],"version-history":[{"count":3,"href":"https:\/\/www.arparun.re\/index.php\/wp-json\/wp\/v2\/pages\/213\/revisions"}],"predecessor-version":[{"id":349,"href":"https:\/\/www.arparun.re\/index.php\/wp-json\/wp\/v2\/pages\/213\/revisions\/349"}],"wp:attachment":[{"href":"https:\/\/www.arparun.re\/index.php\/wp-json\/wp\/v2\/media?parent=213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}