Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: 1488 accessing open with wordpad menu option
Work Around for versions previous to 2001A...
&Wordpad (text and graphics) ; Modify WORD, RTF, plain text files. Can contain bitmaps, too. file = CurrFilePath() If !(FileExist(file)) Then file = "" Else If FileExtension(file) == "" Then file = StrCat(file, ".") wordpadexe="C:\Program files\WIndows NT\accessories\wordpad.exe" Run(wordpadexe,'"%file%"')
I replace RegQueryValue with RegQueryExpSz, but a new error comes up "1932: WinExec: The system cannot find the file specified". The registry returns the executable path as "%ProgramFiles%\Windows NT\Accessories\WORDPAD.EXE".
It appears that the script is not replacing the %ProgramFiles% environment variable that is embedded in the reg entry. I hardcoded the path as you suggested, but I am wondering if a better solution exists.
Or edit your file and use the new RegQueryStr function. It should look like...
&Wordpad (text and graphics) ; Modify WORD, RTF, plain text files. Can contain bitmaps, too. file = CurrFilePath() If !(FileExist(file)) Then file = "" Else If FileExtension(file) == "" Then file = StrCat(file, ".") rkey=RegOpenKey(@REGMACHINE,"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths") wordpadexe=RegQueryStr(rkey,"WORDPAD.EXE") RegCloseKey(rkey) Run(wordpadexe,'"%file%"')
Article ID: W14593
Filename: 1488 error when accessing -open with -wordpad menu option.txt
File Created: 2001:07:20:10:43:14
Last Updated: 2001:07:20:10:43:14