Create an ini file in install location
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Create an ini file in install location

  1. #1
    Join Date
    Sep 2009
    Posts
    3

    Create an ini file in install location

    Hi All,

    i am doing a VB.NET 2.0 Windows Application.
    I want to create an ini file in the location where we are installing the application. the code that i wrote is

    Private Sub Installer1_AfterInstall(ByVal sender As Object, ByVal e As System.Configuration.Install.InstallEventArgs) Handles MyBase.AfterInstall

    Dim iniPath As String
    Dim Asm As System.Reflection.Assembly =
    System.Reflection.Assembly.GetExecutingAssembly()
    Dim configPath As String
    configPath = Asm.Location
    iniPath = configPath & "\MyiniFile.ini"
    WriteString("INSTALLDETAILS", "DATETIME", "datetime", iniPath)
    End Sub

    but its not working.
    what can be the problem with this ? anybody please help..
    its very urgent

    Thanks in advance

  2. #2
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,959

    Re: Create an ini file in install location

    Wouldn't that be your INSTALLER running? Why not just include a file in setup and deployment, or even click-once?
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center