in reply to Re^4: how to make pp-created exe read external config values
in thread how to make pp-created exe read external config values

well, I already know the path to the exe file because I put the exe file there

i am confused, i think your problem is the path to the config-file is hardcoded. so if you replace that hardcoded path with
use File::Basename; ($exename, $exepath) = fileparse(PerlSvc::Exe()); Config::Simple->import_from("${exepath}foo.conf");
there´s no need to change the exe-file. just keep the .conf besided the .exe

Replies are listed 'Best First'.
Re^6: how to make pp-created exe read external config values
by punkish (Priest) on Jan 05, 2005 at 17:55 UTC
    that is a good idea. Thanks. I will see if that will work for me.

    The problem, thus far, has been that a perl program converted to Windows service needs to have everything hard-coded. That is because the Windows service manager is dumb and can't figure out relative path names. You solution might work -- make the exe figure out its path. In fact, I think there is a perl special var that holds the path and name of the script being run.

    Many thanks.

      if that doesn´t work use $ENV{'SystemRoot'} (mostly c:\windows) and put your .conf there.