Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how can the software retrieve machine's servername and change the datasource to the machine's servername...

how can the software retrieve machine's servername and change the datasource to the machine's servername...

Scheduled Pinned Locked Moved C#
csharpworkspace
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fgfdhghgfd
    wrote on last edited by
    #1

    hi.. i have built up a window based software ...with vb.net....i want the software to be installed in any machine....with setup.exe...the datasource is now required to be changed the user from .exe.config file...but how can the software retrieve machine's servername and change the datasource to the machine's servername... thanks

    R 1 Reply Last reply
    0
    • F fgfdhghgfd

      hi.. i have built up a window based software ...with vb.net....i want the software to be installed in any machine....with setup.exe...the datasource is now required to be changed the user from .exe.config file...but how can the software retrieve machine's servername and change the datasource to the machine's servername... thanks

      R Offline
      R Offline
      Rob Graham
      wrote on last edited by
      #2

      System.Environment.MachineName will return the current machine's netbios name. System.Environment.GetEnvironmentVariable("COMPUTERNAME") will return the computer name

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups