in case of willing to use py2exe read this
http://stackoverflow.com/questions/2292703/how-can-i-get-the-executables-current-directory-in-py2exe
It is already implemented using sys.argv[0]
 
 """
 
+import os, sys
 
 class Settings():
     def __init__(self):
+        path = __file__ if __file__ is not None else sys.argv[0]
+        __location__ = os.path.realpath(
+                os.path.join(os.getcwd(), os.path.dirname(path)))
+
+        print(os.path.join(__location__,"icon.png"))
         self.appname = "dboxswitch"
         self.appversion = "0.1"
-        self.icon    = "./icon.png"
-        self.cpicon  = "./current-profile.png"
+        self.icon    = os.path.join(__location__,"icon.png")
+        self.cpicon  = os.path.join(__location__,"current-profile.png")
 
 global conf
 appconf = Settings()