Hi,

I have problem executing vbscript that contain french caracter. The vbscript is for creating directory and shortcut. The french caracters are replace by other weird caracters. It look like the agent work in english only mode and don't know french caracter. I have test in administrator mode and in system mode but i have the same result. This script is running very well when execute directly from the local computer.

Here a example of the script i run with a running script task


set WshShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
Set oFSO = CreateObject("Scripting.FileSystemObject")

sPath = wshShell.SpecialFolders("AllUsersPrograms") & "\Utilitaires RQ\Donnes\"

iPos = InStr(4, sPath, "\", 0) ' Skip drive letter check
While(iPos <> 0)
If(Not(oFSO.FolderExists(Left(sPath, iPos)))) Then
oFSO.CreateFolder(Left(sPath, iPos))
End If
iPos = InStr(iPos+1, sPath, "\", 0)
Wend
Set oFSO = Nothing

set oShellLink = WshShell.CreateShortcut(spath & "Accs via ODBC.lnk")
oShellLink.TargetPath = "R:\PROD\RQ\BIN\RQ3330A.exe"
oShellLink.Arguments = ""
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "R:\PROD\RQ\BIN\RQ3330A.exe,0"
oShellLink.WorkingDirectory = ""
oShellLink.Save


For now i have no choice to modify the script like that to get work

set WshShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
Set oFSO = CreateObject("Scripting.FileSystemObject")

sPath = wshShell.SpecialFolders("AllUsersPrograms") & "\Utilitaires RQ\Donn" & chr(233) & "es\"

iPos = InStr(4, sPath, "\", 0) ' Skip drive letter check
While(iPos <> 0)
If(Not(oFSO.FolderExists(Left(sPath, iPos)))) Then
oFSO.CreateFolder(Left(sPath, iPos))
End If
iPos = InStr(iPos+1, sPath, "\", 0)
Wend
Set oFSO = Nothing

set oShellLink = WshShell.CreateShortcut(spath & "Acc" & chr(232) & "s via ODBC.lnk")
oShellLink.TargetPath = "R:\PROD\RQ\BIN\RQ3330A.exe"
oShellLink.Arguments = ""
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "R:\PROD\RQ\BIN\RMQ3330A.exe,0"
oShellLink.WorkingDirectory = ""
oShellLink.Save


Does Someone know a better solution ?

Martin Dallaire