z27
asked on
Get Path of application from Reg (Run) (win2000)
Hello Experts!
PLease help me, i want to get path of apps in key Run of
registry and result are, for example:
"C:\Program Files\Zone Labs\ZoneAlarm\zlclient.ex e"
or
"C:\Program Files\McAfee\QuickClean\Pl guni.exe" /START
or
mobsync.exe /logon
i want get full path (eg: Remove "", parameter/,...)
ex:
C:\Program Files\Zone Labs\ZoneAlarm\zlclient.ex e
C:\Program Files\McAfee\QuickClean\Pl guni.exe
Thank you.
PLease help me, i want to get path of apps in key Run of
registry and result are, for example:
"C:\Program Files\Zone Labs\ZoneAlarm\zlclient.ex
or
"C:\Program Files\McAfee\QuickClean\Pl
or
mobsync.exe /logon
i want get full path (eg: Remove "", parameter/,...)
ex:
C:\Program Files\Zone Labs\ZoneAlarm\zlclient.ex
C:\Program Files\McAfee\QuickClean\Pl
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
StringReplace(yourstring, '"', '', [rfReplaceAll])
will remove those " from the string
will remove those " from the string
first as mikelittlewood suggested
StringReplace(yourstring, '"', '', [rfReplaceAll])
and them
ExtractFileName(....) to get the filename without directory and parameters
StringReplace(yourstring, '"', '', [rfReplaceAll])
and them
ExtractFileName(....) to get the filename without directory and parameters
ASKER
i want to get full path og app, my app need to read registry (autorun) to finding apps register autorun and locating them on harddisk. But 0n win2000 get some string as asked on topic, i donnot know how parse these strings to get exactly their path.
check the following functions in Delphi help.
ExtractFileDir
ExtractFileDrive
ExtractFileExt
ExtractFileName
ExtractFilePath
ExtractFileDir
ExtractFileDrive
ExtractFileExt
ExtractFileName
ExtractFilePath
ASKER
hello Ivanov_G, please read my question again!
You cannot Extract...('"C:\Program Files\Zone Labs\ZoneAlarm\zlclient.ex e"');
or
Extract...('mobsync.exe /logon');
You cannot Extract...('"C:\Program Files\Zone Labs\ZoneAlarm\zlclient.ex
or
Extract...('mobsync.exe /logon');
You can not get the full path for mobsync.exe, because it is somewhere in %SYSTEM% folder. For other files you can freely use the function I showed above + StringReplace to create some logic to extract the file paths. You can also use FileExists function to check if the specified file exists on the local machine.
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: Ivanov_G {http:#13733627}
Any objections should be posted here in the next 4 days. After that time, the question will be closed.
cwwkie
EE Cleanup Volunteer
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: Ivanov_G {http:#13733627}
Any objections should be posted here in the next 4 days. After that time, the question will be closed.
cwwkie
EE Cleanup Volunteer
ASKER
"C:\Program Files\Zone Labs\ZoneAlarm\zlclient.ex
to: C:\Program Files\Zone Labs\ZoneAlarm\zlclient.ex
(remove " ")
mobsync.exe /logon
to: mobsync.exe ( remove /logon)