getting host names during installation - Programmer

This is a discussion on getting host names during installation - Programmer ; Hi I'm trying to create a set-up file for my app. My app connects to a database using tcp/ip. I have the set-up file writing the location of the database to an ini file. The problem is this: From my ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: getting host names during installation

  1. getting host names during installation

    Hi

    I'm trying to create a set-up file for my app. My app connects to a
    database using tcp/ip. I have the set-up file writing the location of the
    database to an ini file. The problem is this:

    From my understanding of windows based LANS, the set-up software may be run
    from any machine as well as the destination server where the app is being
    installed. ie from a client machine with a user logging on as admin? If this
    is the case then the user can use UNC paths such as \\serverName\myAppDir\
    to install the software. The set-up program would then save that path to the
    ini as the location of the database.

    My problem is that the apparantly the database requires the host name to
    connect to, ie serverNameriveLetter:\path

    It seems to me that I need to convert the UNC path into this format either
    in my prog or during the setup. But as the UNC path doesnt seem to
    necessarily have a drive letter, do I assume it is aways c:? ie would i
    convert \\serverName\myAppDir\ to serverName:c:\myAppDir?

    Thank you for any help and advice offered
    J



  2. Re: getting host names during installation

    I know of no protocol (at least that MS uses) that would use anything like
    servername:drive:\path in that format. Whether you are using host
    resolution via DNS, NetBIOS resolution, etc, etc the format for SMB shares
    does not change, and is \\server\share.



+ Reply to Thread