Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
App Paths Registry Run Command
#1
I love run command (⊞ Win+R) to launch programs.  Most of the time programs will automatically put an entry into the registry when installing (i.e. qm, chrome, firefox, etc) while other programs do not.

So I wrote this little function to use a tab separated multiline string containing the alias I'd like to use to launch a program from the run command and the path to the exe.  Pretty simple stuff here:

Function AppPaths
Code:
Copy      Help
out
str Data=
;FL    "$program files$\Image-Line\FL Studio 12\FL (scaled).exe"
;Arduino    "C:\arduino-1.8.5\arduino.exe"
;iview    "$program files$\IrfanView\i_view32.exe"
;audacity    "C:\Audacity\audacity.exe"
;audition    "$program files$\Adobe\Audition 1.5\Audition.exe"
;mp3    "$common music$\Sample Music\Kalimba.mp3"

str RegFile="C:\AppPaths.reg"
str RegData="Windows Registry Editor Version 5.00[][]"

ICsv v._create
v.Separator="[9]"

v.FromString(Data)

str Alias Path RegEntry

for int'r 0 v.RowCount
,Alias=v.Cell(r 0)
,Path=v.Cell(r 1)
,Path.expandpath
,Path.findreplace("\" "\\")
,RegEntry=
,F
,;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\{Alias}.exe]
,;@="{Path}"
,;
,RegData.addline(RegEntry)
,
out RegData
RegData.setfile(RegFile)
;ret
run "regedit.exe" F"/s ''{RegFile}''"


Messages In This Thread
App Paths Registry Run Command - by TheVig - 05-20-2018, 06:08 PM
RE: App Paths Registry Run Command - by r0n - 05-23-2018, 07:39 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)