Win XBMCLauncher / Launcher4Kodi - All in One Tool for Change Shell, Set Focus and more
(2013-04-15, 16:54)baijuxavior Wrote:
(2013-04-15, 11:01)anarchoi Wrote: 1. XBMCLauncher autoruns with windows 8 so i don't think i can make it start automatically in administrator mode

2. i don't know how to edit the source code and recompilate it Sad is it possible to release a compiled version of XBMCLauncher with admin mode on ?

Thanks a lot

Editing and compiling .ahk file is very easy. Download and install autohotkey_l from the link provided in the first page. Download the source code and extract using winrar. Open the xbmclauncher.ahk file in notepad. Notepad++ is recommended. Change the code

Code:
LaunchApplication(AppPath) ; function to start applications
{
SplitPath, AppPath, FileName ;get filename without path
Process, Exist, %FileName% ; check to see if 'FileName' is running
If (ErrorLevel = 0) ;if not running
    {
    if FileExist(AppPath)
        {
        if (FileName = "XBMC.exe" and StartPortable = 1)
            run %AppPath% -p
        else
            run %AppPath%
        }
    Else
        {
        ;traytip, Message, %AppPath% not found, 5, 1
        }
    }
    Else ; file already running
    {
    ;traytip, Message, %FileName% already running, 5, 1
    }
}
with

Code:
LaunchApplication(AppPath) ; function to start applications
{
SplitPath, AppPath, FileName ;get filename without path
Process, Exist, %FileName% ; check to see if 'FileName' is running
If (ErrorLevel = 0) ;if not running
    {
    if FileExist(AppPath)
        {
        if (FileName = "XBMC.exe" and StartPortable = 1)
            {RunAs, Administrator, YourPassword
            run %AppPath% -p
            RunAs
            }

        else
            {RunAs, Administrator, YourPassword
            run %AppPath%
            RunAs
            }
        }
    Else
        {
        ;traytip, Message, %AppPath% not found, 5, 1
        }
    }
    Else ; file already running
    {
    ;traytip, Message, %FileName% already running, 5, 1
    }
}



After making the necessary changes, save the file. Then right click the .ahk file and select the option 'compile' which will create XNMCLauncher.exe in the same location. Replace the existing .exe file in program folder using this new one.

Please note, I have not tested this method. But it should work as given in the autohotkey help page. If no luck, let me know, I will upload the code to pastebin so that you can copy paste it.


After doing this, i get this error when running the exe

"Error: Launch Error (possibly related to RunAs)

Specifically: Incorrect username or password

Line # 567 Run,%Apppath%"
Reply


Messages In This Thread
green start button remapping - by Cassiel - 2013-02-12, 21:44
RE: XBMC Launcher - by Govnah - 2013-02-16, 06:32
RE: XBMCLauncher - by MBulli - 2013-02-17, 12:20
RE: XBMCLauncher - All in One Tool for Change Shell, Set Focus and more - by anarchoi - 2013-04-18, 18:02
Launcher4Kodi - by baijuxavior - 2015-02-17, 15:27
lack of focus - by runey71 - 2015-02-18, 07:53
black screen problem - by -CraZed- - 2015-03-18, 06:36
RE: XBMCLauncher / Launcher4Kodi - by TB4875 - 2015-03-25, 11:49
RE: XBMCLauncher / Launcher4Kodi - by kmarq - 2015-05-19, 14:41
Error - by liamp - 2015-05-31, 23:03
RE: XBMCLauncher / Launcher4Kodi - by gitman - 2015-06-07, 21:40
RE: XBMCLauncher / Launcher4Kodi - by RockerC - 2015-06-16, 16:28
RE: Using Tweak UAC - by berkhornet - 2015-07-13, 19:04
RE: - by alsergo - 2015-11-25, 00:11
W10 and netflix - by Cassiuss - 2016-01-10, 15:50
netflix - by Cassiuss - 2016-01-11, 09:11
netflix - by Cassiuss - 2016-01-11, 11:12
netflix - by Cassiuss - 2016-01-11, 13:04
netflix - by Cassiuss - 2016-01-11, 11:44
Reverse shell to explorer - by shayosef - 2016-01-17, 14:24
Launcher4Kodi improvement - by kalhimeo - 2016-01-27, 20:20
resume during recording kodi - by eddedrukker - 2016-04-03, 08:58
RE: XBMCLauncher / Launcher4Kodi - by leezy88 - 2017-02-06, 09:41
Might be of use to someone... - by Grumpy - 2017-09-19, 04:18
Logout Mark Read Team Forum Stats Members Help
XBMCLauncher / Launcher4Kodi - All in One Tool for Change Shell, Set Focus and more20