Jump to content

Recommended Posts

Hi to all i'm trying to made this function: PathRemoveArgs in autoit, but this not work (it surely my fault). Here is my code:

#include <Array.au3>
$Path = '"C:\program files\TEST.exe" -nogui'
$d_call = DllCall("shlwapi.dll", "int", "PathRemoveArgs", "wstr", $Path)
If Not @error Then
_ArrayDisplay($d_call)
EndIf

That will always return the same path, but i want to know only the real path whitout it's arguments. How i can fix that?

Hi!

Link to post
Share on other sites
Link to post
Share on other sites

Thanks Yashied thanks a lot, but i've seen this: "This function should not be used on generic command path templates (from users or the registry)".

I'm currently reading from the values from startup key: (HKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersionRun"), then i read the file path and check if the .exe exists.

Do you suggest me to use this function or what?

Hi and thank you so much.

Edited by StungStang
Link to post
Share on other sites

Yes this surely work fine but the dubt is about that:

"This function should not be used on generic command path templates (from users or the registry)"

As i said before I'm currently reading the values from startup key: (HKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersionRun"), then i read the file path and check if the .exe exists.

If this function should not should not be used on the registry, there is a good alternative?

Hi!

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...