Caractere speciaux

bonjour,

voila mon souci,

Je n arrive pas a coder ceci;

Open DestinationFichier For Append As #1

Print #1, vbCrLf & "@echo off"

Print #1, vbCrLf & "REM --> Verification des permissions"

Print#1,vbCrLf&">nul2>&1""%SYSTEMROOT%\system32\cacls.exe""""%SYSTEMROOT%\system32\config\system"""

Print #1, vbCrLf & "REM --> Erreur vous ne possedez pas les droits admin"

Print #1, vbCrLf & "if '%errorlevel%' NEQ '0' ("

Print #1, vbCrLf & "goto UACPrompt"

Print #1, vbCrLf & ") else ( goto gotAdmin )"

Print #1, vbCrLf & ":UACPrompt"

Print #1, vbCrLf & "echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"" '

Print #1, vbCrLf & "set params = %*:" = ""

Print #1, vbCrLf & "echo UAC.ShellExecute "%~s0", "%params%", "", "runas", 1 >> "%temp%\getadmin.vbs""

Print #1, vbCrLf & ""%temp%\getadmin.vbs""

Print #1, vbCrLf & "exit /B"

Print #1, vbCrLf & ":gotAdmin"

Print #1, vbCrLf & "if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )"

Print #1, vbCrLf & "pushd "%CD%""

Print #1, vbCrLf & "CD /D "%~dp0""

Print #1, vbCrLf

Close #1

Je pense avoir un PB avec les caractères spéciaux.

merci d'avance pour votre aide.

Bjr,

essaye de doubler les " à l'intérieur des "____________"

exemple

Print #1, vbCrLf & "CD /D "%~dp0"" devient Print #1, vbCrLf & ""CD /D "%~dp0"""

Rechercher des sujets similaires à "caractere speciaux"