IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

ASP.NET Discussion :

Problème de creation de fichier


Sujet :

ASP.NET

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Lycéen
    Inscrit en
    Février 2015
    Messages
    1
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 24
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations professionnelles :
    Activité : Lycéen

    Informations forums :
    Inscription : Février 2015
    Messages : 1
    Points : 1
    Points
    1
    Par défaut Problème de creation de fichier
    Bonjour,

    Je veux créer mon launcher Arma III mais j'ai un petit problème qui me bloque tout le reste :/ Le launcher ne veut par créer de fichier que je demande de créer s'il voit que le fichier n'est pas présent sur mon ordinateur.


    Voici le code présent:

    Code VB.NET : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    Imports Microsoft.Win32
    Public Class Form1
        Dim directory As String = False
     
        Private Sub Unrar(ByVal filepath As String, ByVal WorkingDir As String)
            Dim objRegKey As RegistryKey
            objRegKey = Registry.ClassesRoot.OpenSubKey("WinRAR\Shell\Open\Command")
     
            Dim obj As Object = objRegKey.GetValue("")
     
            Dim objRarPath As String = obj.ToString()
            objRarPath = objRarPath.Substring(1, objRarPath.Length - 7)
     
            objRegKey.Close()
     
            Dim objArgs As String
            objArgs = " X " & " " & filepath & " " + " " + WorkingDir
     
            Dim objstartInfo As New ProcessStartInfo()
            objstartInfo.UseShellExecute = False
            objstartInfo.FileName = objRarPath
            objstartInfo.Arguments = objArgs
            objstartInfo.WindowStyle = ProcessWindowStyle.Hidden
            objstartInfo.WorkingDirectory = WorkingDir & ""
     
            Dim objPro As New Process()
            objPro.StartInfo = objstartInfo
            objPro.Start()
     
        End Sub
     
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            Process.Start("http://EvasionLife.forumactif.fr")
        End Sub
     
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            If My.Computer.FileSystem.FileExists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\LauncherEvasionLife\directory.a3") Then
                directory = My.Computer.FileSystem.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\LauncherEvasionLife\directory.a3")
            Else
                MsgBox("Vous devez Specifier le chemin d'acces de votre Arma III", MsgBoxStyle.Exclamation, "Erreur")
                FolderBrowserDialog1.ShowDialog()
                directory = FolderBrowserDialog1.SelectedPath
     
                My.Computer.FileSystem.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\LaucherEvasionLife")
                My.Computer.FileSystem.WriteAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\LauncherEvasionLife\Direcotry.a3", directory, False)
            End If
        End Sub
    End Class

  2. #2
    Membre du Club
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Février 2013
    Messages
    36
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Santé

    Informations forums :
    Inscription : Février 2013
    Messages : 36
    Points : 56
    Points
    56
    Par défaut
    Bonjour,

    Le compte avec lequel le site s'exécute n'a pas les droits nécessaires pour écrire les fichiers.

Discussions similaires

  1. Problème de creation de fichier xml
    Par phenomeno dans le forum C#
    Réponses: 4
    Dernier message: 08/12/2010, 20h46
  2. [PHP 5.2] probléme de creation de fichier xml
    Par gtraxx dans le forum Langage
    Réponses: 2
    Dernier message: 20/08/2009, 13h35
  3. Problème de creation de fichier
    Par basgueye dans le forum MATLAB
    Réponses: 7
    Dernier message: 25/04/2008, 14h18
  4. Réponses: 4
    Dernier message: 16/04/2004, 08h20
  5. [langage] Problème de taille de fichier à mettre dans
    Par And_the_problem_is dans le forum Langage
    Réponses: 10
    Dernier message: 13/08/2002, 09h41

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo