WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

FileMenu

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

1488 error when accessing -open with -wordpad menu option.

Keywords: 1488 accessing open with wordpad menu option

Question:

I am getting the error '1488:RegQueryValue: registry value is a Reg_expand_SZ when accessing 'Open with|wordpad' menu option. I am running on Windows 2000.

Answer:

This problem has been solved starting in version 2001A, of WinBatch by using the function RegQuerySz, instead of RegQueryValue... First right click on any file and select the menu option 'Edit File menus|For all file types' This will open the file "Menu for all file types.mnw". Search for the string '&Wordpad', then modify as follows.....

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%"')


Question:

Trying to open a file with WordPad.exe from the "Open with..." menu in Win2K.

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.

Answer:

Use the current version of the filemenu files. See the files starting with "New..." in your WinBatch System directory.

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