synlight's Profile User Rating: -----

Reputation: 89 Whiz
Group:
Members w/DIC++
Active Posts:
582 (0.54 per day)
Joined:
14-September 11
Profile Views:
5,459
Last Active:
User is offline Jul 21 2014 07:44 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Who Cares
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
Playstation
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   synlight has not set their status

Posts I've Made

  1. In Topic: Detecting Previous Installs

    Posted 16 Jul 2014

    It seems to me, that there is really no way to do this outside of the MSI.. am I right? I can create a registry key during install, or at runtime, and change the values at runtime if needed. If I create it during install.. it will ALWAYS be there when the software fires up, and removed when the software is uninstalled, so I am facing the same problem as I am with the database. I know I'm missing something, logically here.

    View Postybadragon, on 16 July 2014 - 01:03 PM, said:

    I didn't know this was using the context of a .MSI, being that it is the C# forum and nothing was said about MSI, I just figured they were making the installer for the client.


    I'm using the free version of InstallShield, due to time requirements. Contract is up Friday, I gave the clients the deliverable yesterday, and woke up to this request in my inbox. The very next thing on my schedule is a week to learn how to use Wix or something similar.
  2. In Topic: Testing devices for up/down status on external network

    Posted 11 Jul 2014

    Thank you, Curtis!! DIC got me through school.. and was there for me when I outpaced my education around month 2 of my career. I've come a long way (been working for a year!), and I still have a lot to learn. But I'm also a lot more confident in my abilities. You guys played no small part in that!!
  3. In Topic: Testing devices for up/down status on external network

    Posted 11 Jul 2014

    Ha!! I did it!! In this example, you could use either variable, ip or dyn, and it will still work.

    ******NOTE********* improved code at the bottom of the post********************

     string testDynIp = "legitdynaddress.no-ip.org";
                string ip = "59.76.111.55";
                IPAddress  dyn = testDynIp.ToIPAddress();
                TcpClient client = new TcpClient();
                int port = 4000;
    
                try
                {
                    client.Connect(dyn, port);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message + " " + ex.InnerException);
    
                }
    
                if (client.Connected)
                {
                    MessageBox.Show("connected");
                }
                else
                {
                    MessageBox.Show("not connected");
                }
    
                client.Close();
    




    And here is the extension class, courtesy of SO.. I forgot to save the link :(/>/>

    using System;
    using System.Linq;
    using System.Net;
    using System.Net.Sockets;
    
    namespace Tester
    {
        /// <summary>
        /// Basic helper methods around networking objects (IPAddress, IpEndPoint, Socket, etc.)
        /// </summary>
        public static class NetworkingExtensions
        {
            /// <summary>
            /// Converts a string representing a host name or address to its <see cref="IPAddress"/> representation, 
            /// optionally opting to return a IpV6 address (defaults to IpV4)
            /// </summary>
            /// <param name="hostNameOrAddress">Host name or address to convert into an <see cref="IPAddress"/></param>
            /// <param name="favorIpV6">When <code>true</code> will return an IpV6 address whenever available, otherwise 
            /// returns an IpV4 address instead.</param>
            /// <returns>The <see cref="IPAddress"/> represented by <paramref name="hostNameOrAddress"/> in either IpV4 or
            /// IpV6 (when available) format depending on <paramref name="favorIpV6"/></returns>
            public static IPAddress ToIPAddress(this string hostNameOrAddress, bool favorIpV6 = false)
            {
                var favoredFamily = favorIpV6 ? AddressFamily.InterNetworkV6 : AddressFamily.InterNetwork;
                var addrs = Dns.GetHostAddresses(hostNameOrAddress);
                return addrs.FirstOrDefault(addr => addr.AddressFamily == favoredFamily)
                       ??
                       addrs.FirstOrDefault();
            }
        }
    }
    
    





    Played with it a bit. You don't even need the extension method! All of the following variables named "ip" work :)/>

    //string ip = "http://legitdynip.no-ip.org:4000";
    //string ip = "http://50.11.123.11:200";
    //string ip = "http://50.11.123.11";
                string ip = "http://192.168.1.228";
                int port = 80;
                
                Uri baseUri = new Uri(ip);
                port = baseUri.Port;
                string host = baseUri.Host;
    
                TcpClient client = new TcpClient();
    
                try
                {
                    client.Connect(host, port);
                }
    



    LOL 6 months ago, this would have taken me 2 days.. and I would have been begging you guys for help.
  4. In Topic: Testing devices for up/down status on external network

    Posted 11 Jul 2014

    Skydiver, I am going to PM you with specifics, confidentiality clause and all :)/>

    Short answer: the application is not installed on the target machines. They can be anywhere in the world, and I just need to monitor them for up/down status.
  5. In Topic: ServiceProcessInstaller.Account

    Posted 10 Jun 2014

    Derp. Nevermind, I found it. Sorry guy!!

    If anyone else has this issue, this link was helpful:



    MSDN

My Information

Member Title:
D.I.C Addict
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Charleston, SC
Years Programming:
2
Programming Languages:
C#, C, C++, HTML, CSS, JavaScript

Contact Information

E-mail:
Click here to e-mail me

Comments

Page 1 of 1
  1. Photo

    AnalyticLunatic Icon

    30 Oct 2013 - 11:19
    You joined DIC on my 20th Birthday so I thought you deserved a comment! Hello!! :D And P.S. Watch out for that Gorian fellow below. He's quite the trickster!
  2. Photo

    brianborn1968 Icon

    10 Jul 2012 - 06:19
    Hey girl, good to see you here. :)
  3. Photo

    BRampersad Icon

    13 Dec 2011 - 04:07
    hi
  4. Photo

    Gorian Icon

    12 Dec 2011 - 10:14
    Damn! No comments? Well, here is one for ya! :)
Page 1 of 1