Get programs real name (no guessing)

I need a way to get the actual real name (including extension) of my program, and i dont mean by doing App.EXEName & ".exe"
what if its renamed to say .pif (the exe itself will work, but it get the wrong extension)

Comments

  • : I need a way to get the actual real name (including extension) of my program, and i dont mean by doing App.EXEName & ".exe"
    : what if its renamed to say .pif (the exe itself will work, but it get the wrong extension)

    Why would it still work if someone renamed it to .pif? Wouldn't Windows look for an application registered to handle .pif files?


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

  • : : I need a way to get the actual real name (including extension) of my program, and i dont mean by doing App.EXEName & ".exe"
    : : what if its renamed to say .pif (the exe itself will work, but it get the wrong extension)
    :
    : Why would it still work if someone renamed it to .pif? Wouldn't Windows look for an application registered to handle .pif files?
    :
    :
    : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    :
    : [code]
    : $ select * from users where clue > 0
    : no rows returned
    : [/code]

    The "GetModuleFileName" API *might* do; try it out and see.
  • : : : I need a way to get the actual real name (including extension) of my program, and i dont mean by doing App.EXEName & ".exe"
    : : : what if its renamed to say .pif (the exe itself will work, but it get the wrong extension)
    : :
    : : Why would it still work if someone renamed it to .pif? Wouldn't Windows look for an application registered to handle .pif files?
    : :
    : :
    : : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    : :
    : : [code]
    : : $ select * from users where clue > 0
    : : no rows returned
    : : [/code]
    :
    : The "GetModuleFileName" API *might* do; try it out and see.
    :
    [code]
    = App.EXEName
    Dir( & ".*")
    [/code]

    See what you get and decide which is most probable.

    Hope I helped,
    Nikolay Semov

  • : : I need a way to get the actual real name (including extension) of my program, and i dont mean by doing App.EXEName & ".exe"
    : : what if its renamed to say .pif (the exe itself will work, but it get the wrong extension)
    :
    : Why would it still work if someone renamed it to .pif? Wouldn't Windows look for an application registered to handle .pif files?
    :
    :
    : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    :
    : [code]
    : $ select * from users where clue > 0
    : no rows returned
    : [/code]
    :
    :


    .pif is the older extension for executables (stands for Program Information File) if you rename an exe to .pif it will still run under most version of windows.

    just like .lnk even you have the option to show all known file extensions on, the extension wont be shown
  • : : : I need a way to get the actual real name (including extension) of my program, and i dont mean by doing App.EXEName & ".exe"
    : : : what if its renamed to say .pif (the exe itself will work, but it get the wrong extension)
    : :
    : : Why would it still work if someone renamed it to .pif? Wouldn't Windows look for an application registered to handle .pif files?
    : :
    : :
    : : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    : :
    : : [code]
    : : $ select * from users where clue > 0
    : : no rows returned
    : : [/code]
    : :
    : :
    :
    :
    : .pif is the older extension for executables (stands for Program Information File) if you rename an exe to .pif it will still run under most version of windows.
    :
    : just like .lnk even you have the option to show all known file extensions on, the extension wont be shown

    .pif files are "Program Information Files" - a kind of config files used to specify older OS compatibility - they arent't EXEs by any mean.
    Of course, this means also that calling App.Exename on a .pif will only run the EXE/COM with the same name, using the settings specified in the .pif file.
    In fact, .pif files are created from Explorer when under "properties", you modify default settings for an older-Windows EXE - ie: specifying that it should run in Win95 compatibility, or fullscreen.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories