Jump to content
Macro Express Forums

PGMacros install error...

Recommended Posts

Hi Folks,

I'm glad to see this forum is still alive. It's been nearly 5 years since I've been here!

I recently got on the MacExp site to see what's new, and I noticed that Professional Grade Macros made their Functions Library free! :) So obviously I downloaded and installed it.


If {PGM Setup} is run it gives me the dialog "Must create some Registry values...." Then when I click OK, I get an error dialog "Cannot access specified registry value" on Line # 81 of { PGM Setup }.


If I check my registry (with RegEdit) I do see the Professional Grade Macros/Temp/ keys. (see screenshot)





Line 81 looks like it's trying to read HKEY_CURRENT_USER\Software\Professional Grade Macros\Folders\Home even though that key has not been created... So I don't know...


Any ideas what I'm doing wrong?


I'm using MEpro and Windows 7. Also, I didn't want PGM or MEp putting files in my network locations at work (which they do by default) so I pointed everything to the Program Files/Macro Express/ local folder. It could also be that the antivirus at my work place is blocking things, but I don't think so... Usually if the antivirus falsely identifies a "threat" it will completely remove the file--which it is not doing here. I'm an administrator of the computer (though not the antivirus) but I went ahead and installed PGM in "Administrator mode" just to be safe. That did not help.



Link to comment
Share on other sites

We have analyzed this issue and have duplicated the problem. It appears that the problem is due to these recent changes to Macro Express Pro:
- The Write Registry Value command will now report a problem if the permissions do not allow the value to be written.
- The Create Registry Key command will no longer cause a crash if the permissions do not allow the key to be created.

The Write Registry commands are now more restrictive. If an attempt is made to create this registry key:
HKEY_CURRENT_USER\Software\Professional Grade Macros\Temp\T1

and these do not already exist:

HKEY_CURRENT_USER\Software\Professional Grade Macros
HKEY_CURRENT_USER\Software\Professional Grade Macros\Temp

Then an error occurs.

Here are some ways to correct the problem with the PGM Functions:

1. Modify the macro { PGM Setup } to create intermediate registry keys.

2. Manually create the missing intermediate registry keys.

3. If you install Macro Express 3, load PGM Functions Library, run it and then uninstall Macro Express 3, the PGM Functions will run in Macro Express Pro.

We are working on a permanent fix for this problem.
Kevin Heaton
Insight Software Solutions, Inc

Link to comment
Share on other sites

Thanks for checking this out Kevin!

I'm not sure that the proposed solutions are right though... Or maybe I just don't understand.


The problem does occur here

The Write Registry commands are now more restrictive. If an attempt is made to create this registry key:
HKEY_CURRENT_USER\Software\Professional Grade Macros\Temp\T1

as you've indicated.


But these two keys

HKEY_CURRENT_USER\Software\Professional Grade Macros
HKEY_CURRENT_USER\Software\Professional Grade Macros\Temp

do already exist. (see screenshot in OP, above)


I went ahead and instructed {PGM Setup} to create the keys anyway (see shot below, lines 25, 26)




But I get the same error at line 81 (actually line 83, since I added two lines).


Any thoughts on what I'm doing wrong?



as I looks more, it seems like MEpro is trying to READ

"HKEY_CURRENT_USER\Software\Professional Grade Macros\Folders\Home"

but the "...\Folders\Home" key doesn't exist... Only the "...\Temp\" one does.


So I need to create, HKEY_CURRENT_USER\Software\Professional Grade Macros\Folders\Home right?

Link to comment
Share on other sites

There are many other registry entries for the PGM Functions library that need to be created, not just the two given as an example. There are two issues:


1. Previous versions of Macro Express Pro would create intermediate registry entries. At attempt to create this:


HKEY_CURRENT_USER\Software\Professional Grade Macros\Temp\T1


would also create these:


HKEY_CURRENT_USER\Software\Professional Grade Macros\

HKEY_CURRENT_USER\Software\Professional Grade Macros\Temp\


2. Macro commands Read Registry Value and Write Registry Value now correctly support the On Error feature. So when the Read Registry command tries to read from a location that does not exist, by default it will display an error instead of continuing.


The changes to support the On Error feature for the Registry commands is the correct behavior. Unfortunately it causes problems with the PGM Functions Library. The PGM Functions Library will run once the registry structure is created. You may do that by installing Macro Express 3 and then the PGM Functions Library or by modifying the "{ PGM Setup }" macro in the PGM Functions Library.


To modify the "{ PGM Setup }" macro you will need to:


1. Change the "Could not access the specified registry value" behavior in the On Error tab to "Ignore Error" for the Read Registry commands.


2. Add commands to create intermediate registry keys. Change lines like this:


Write Registry Value "%T[2]%" into HKEY_CURRENT_USER\Software\Professional Grade Macros\Folders\Me3Home

Write Registry Value "%T[2]%" into HKEY_CURRENT_USER\Software\Professional Grade Macros\Folders

Write Registry Value "%T[2]%" into HKEY_CURRENT_USER\Software\Professional Grade Macros\Folders\Me3Home

Link to comment
Share on other sites

It worked! Thanks Kevin! :D

If anyone is curious, I did the "change error to ignore" option, above.

I had to change three components.

Lines 81, 83, and 87 of { PGM Setup }


Each has several possible error messages, but it's only the "Could not access the specified registry value" that you need to set to "Ignore."

Link to comment
Share on other sites

  • 5 months later...

Update: Our previous conclusions about the cause of this problem were incorrect. It turns out that this is a permissions issue. Some of the registry values can only be created if Macro Express Pro is running as administrator.


Do this to install the PGM Functions Library:

1. Make sure Macro Express Pro is not running (click File, Terminate Macro Express Editor and Player)

2. Find the startup shortcut for Macro Express Pro and right-click on it.

3. Click on Run as Administrator.

4. Answer Yes to the UAC prompt.

5. Run the "PGMFunctionsLibrary setup.exe" installer for the PGM Functions Library.

6. Follow the on screen prompts.


After the PGM Functions Library has been installed it will run the { PGM Setup } macro to initialize registry entries and set things up to run the library.


Macro Express Pro does not need to be running as administrator to use the PGM Functions Library. After installing you may wish to terminate Macro Express Pro and restart it without running as administrator.

Link to comment
Share on other sites

  • 3 weeks later...

Despite my April 29 post, there was still problems with the installation.

Today I re-read your original reply and saw the thing about installing MaxExp3, then PGM, then using PGM in MaxExpPro.

I tried doing that and it might have worked...


I'm still experimenting, but I wanted to document my efforts so far.

PGMacro Library seemed to install correctly, but after installation, when it was supposed to start, I got this error:



I tried redoing everything using the "Administrator Mode" option, but that didn't help.



The next thing I tried, was installing PGM to a non-default location. That didn't help either.

In retrospect, it occurs to me that uninstalling MEpro first probably would've helped. :)


I ended up just canceling the error, then opening ME3. The PGM Lib was not opened. I browsed to the non-default location and opened the PgmFl.mex file. I tried the Sample String Reverse macro and it worked fine.


After that, I exited ME3, then launched MEpro. I made a new Category in my main mex file, and called it "PGM imports." I imported the Library. (I can't remember if I imported PgmFl or PgmFL_Pro, but I just looked in the notes section and it has "2003.09.01 - Original Release Version 3.4.01," so it was probably the non-pro one.)



I'm able to call the String -- Reverse macro (that is imported into the same file) (see code)

<VARIABLE SET STRING Option="\x01" Destination="%T10%" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/>
<MACRO RUN Use_ID="FALSE" Name="{ String - Reverse }" ID="-1" Wait="TRUE"/>
<TEXT BOX DISPLAY Title="Result of String Reverse" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0{\\fonttbl{\\f0\\fnil Tahoma;}{\\f1\\fnil\\fcharset0 Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\lang1033\\f0\\fs16 ReverseString: %T\\f1 10\\f0 %\r\n\\par \r\n\\par Result\\f1  T[1]\\f0 : %T[1]%\r\n\\par \r\n\\par Result\\f1  T1\\f0 : %T1%\r\n\\par \r\n\\par \r\n\\par }\r\n" Left="Center" Top="Center" Width="800" Height="400" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>

Unfortunately the reversed string is not getting back into my variables. :(

But I'm also not getting the previously mentioned chash at Setup Line 81. So I guess that's a move in the right direction.


Also, I'm seeing the expected folders in my registry now (imp)



So that's good--right?


I'll post on this thread if I get this thing working better.


*Side note: I "stepped through" my sample macro as it called all the other PCM macros... Holy moly there's a lot of steps involved!!! :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...