Compatibilité XP et vista pour un code Help

Résolu
guillaumeIA Messages postés 12 Date d'inscription jeudi 16 juillet 2009 Statut Membre Dernière intervention 3 septembre 2009 - 3 sept. 2009 à 10:32
guillaumeIA Messages postés 12 Date d'inscription jeudi 16 juillet 2009 Statut Membre Dernière intervention 3 septembre 2009 - 3 sept. 2009 à 11:40
bonjour, j'ai un programme sur Xp qui fonctionne le voici :


Sub copiefile(ByVal resources As String, ByVal destination As String)
        Dim fss As Object
        '/////// A FAIRE //////////
        If System.IO.Directory.Exists(destination) = True Then
            fss = CreateObject("Scripting.FileSystemObject")
            fss.CopyFile(resources, destination)  ' erreur sur cette ligne
        Else
            MsgBox("Directorie not found : " & destination, MsgBoxStyle.OkOnly, "Copy file problem")
        End If

    End Sub


et voici ce que je rentre dans la fonction ci dessus :
Dim pathdll As String = PageParam.hb_avant_str(My.Application.Info.DirectoryPath, "bin") & "bnTasks.dll"
        Dim windir As String = ""
        Dim path As String

        windir = Environment.GetEnvironmentVariable("windir").ToString
        Accueil.copiefile(pathdll, windir & "\system32")


je viens de recevoir un nouveau pc avec vista 32 bit j'ai installé la version gratuite VB express je compile mon programme dessus et l'obtiens une erreur : Exception hRESULT: 0x800a0046(CTL_E_permissiondenied)

pouvez vous m aider?
cordialement,

1 réponse

guillaumeIA Messages postés 12 Date d'inscription jeudi 16 juillet 2009 Statut Membre Dernière intervention 3 septembre 2009
3 sept. 2009 à 11:40
J'ai modifier le compte admin cela fonctionne!
3
Rejoignez-nous