Jump to content
Macro Express Forums

Config File for Custom Setup


Recommended Posts

I'm creating a custom setup for my organization and I want to export my configuration for use with the CONFIGFILEPATH in my setup. The documentation says to specify the path to the .wcfg file using the CONFIGFILEPATH setting in my setup file. No problem. However, I'm not sure how to use that .wcfg file in my setup.

 

In the Help file, it shows an example like this:

 

CONFIGFILEPATH=c:\macexpro.wcfg

 

However, it seems to me that you would want to include the .wcfg file in whatever folder contains the Macro Express setup files so that it can be applied when users install the app.

 

Has anyone used this setting? Can you offer any insight? Thanks.

 

Jim

Link to comment
Share on other sites

I've been working on this to try and get it to work, but it doesn't seem to be working. If anyone has any experience in multi-user installs with preconfigured paths to shared macros, etc., I'd love to hear details on what you did.

 

Thanks.

 

Jim

Link to comment
Share on other sites

I have two clients with a single company shared macro and controlled configuration. In fact I even have an unattended macro that rolls out upgrades when they arrive. Works slick. I can't go into great detail as that would take a lot of time but I can tell you I only use the config file for initial installation. I tried using it to control my setups but that was problematic. Here’s my basic formula.

 

Oh, but first know that the config file is just an XML file and I delete all the entries besides the ones I differ from the standard install. Easier to keep straight or have multiples.

 

I do not install the start menu items.

 

I do not enable the option in MEP to run at start. Instead I created a run value in HKLM of the registry. This run option includes the poorly named ‘no browse’ option that prevents users from opening Macro Explorer and making changes.

 

I create a value in the HKLM\Software\Insight Software Solutions\Macro Express 4\Files\File0 to be the shared macro which is in a network file share.

 

Now here’s a trick. MEP looks first to the registry settings in HKCU first then if it doesn’t find them it looks to HKLM. I set all my custom configuration settings in HKLM. Now when my macro fires up it destroys any of those same settings in HKCU. EG I do not have them configured for backup. Oh, and I destroy all of the entries in the Files key. The reason I do this is to force it to look at HKLM because no matter what the user changes it cannot modify HKLM. All their changes go to HKCU! Slick!

 

One exception on the HKCU is my macro looks up the current user in a table in the macro folder to determine their name, email address and a couple things like that. Then I check to make sure the email address is correct in their config. This ensures every user has proper custom email settings for which I use in all kinds of things like help requests, error reporting, and other things.

 

Anyway there’s probably more things I’m forgetting but that should give you an idea. Also I’m available for hire which might save you some time setting this up and getting it working.

Link to comment
Share on other sites

Here's my unattended batch file. The ping is the only reasonable way to do a delay.

REM next line waits 5 seconds
ping 1.1.1.1 -n 1 -w 5000
"\\server\ClientApps\MEP\macexpro.exe" /s /m="\\server\ClientApps\MEP\mep-ui.txt"

 

This is my unattended install file mep-ui.txt contents. redacted the licensee info.

RunQuiet=Y
Startup=N
NoQuickStart=Y
NoHelp=Y
CONFIGFILEPATH=\\server\ClientApps\MEP\IPSD Default Install.wcfg
LicenseName=XXXXXXX
LicenseCode= XXXXXXX

 

Here's my wcfg.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE Macro_Express_Pro_Preferences>
<Macro_Express_Pro_Preferences version="4.0.3.1">
<!-- Windows version 5.0.2195 -->
 <Macro_Express_Pro>
   <PerMachine>
     <Email_Server>
       <Server type="string">Server</Server>
     </Email_Server>
     <Files>
       <file_0 type="string">\\server\ipdata\Apps\Macros\IPSD.mex</file_0>
     </Files>
     <Playback>
       <Abort_Key type="integer">3</Abort_Key>
       <Pause_Key type="integer">2</Pause_Key>
     </Playback>
     <ShortKeys>
       <Use_Suffix type="integer">1</Use_Suffix>
     </ShortKeys>
     <System_Tray>
       <Left_Click_Action type="integer">1</Left_Click_Action>
       <Left_Click_Macro type="string">Main</Left_Click_Macro>
       <Left_Click_Macro_File type="string">\\server\ipdata\Apps\Macros\IPSD.mex</Left_Click_Macro_File>
     </System_Tray>
     <ShortKeys>
       <Use_Suffix type="integer">1</Use_Suffix>
     </ShortKeys>
   </PerMachine>
 </Macro_Express_Pro>
 <Quick_Start_Guide>
 </Quick_Start_Guide>
</Macro_Express_Pro_Preferences>

Link to comment
Share on other sites

Thanks again, Cory. I have all of this working fine now. It's unfortunate that Macro Express Pro will simply crash with an AV if there's an error in your configuration file. It would have been nice to have an error message that points out the problem, but all is good now.

 

Jim

Link to comment
Share on other sites

I take it back. All is working except that when my configuration is imported, it's not using the <Files> section. I see all of my other configuration settings are added to the Registry, but the macro file that should be loaded isn't loaded and the Files Registry key just has the default macex.mex entry.

 

Still working on it. :)

 

Jim

Link to comment
Share on other sites

I use a .reg file for the Run section of the HKLM and the files section of the HKLM. Save this below to a .reg file and launch it. THis can also be done with MEP.

 

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"MEP"="C:\\Program Files\\Macro Express Pro\\MacExp.exe /B"

[HKEY_LOCAL_MACHINE\SOFTWARE\Insight Software Solutions\Macro Express 4\Files]
"file 0"="\\\\server\\IPData\\Apps\\Macros\\IPSD.mex"

Link to comment
Share on other sites

To close this out and for anyone who happens to run into this same issue:

 

You can set the shared macro file location (whether per-user or per-machine) using the .wcfg file and it works perfectly. However, if you have an underscore in your macro file name, it won't work because Macro Express replaces the underscore with a space in the Registry. I have filed a bug on this.

 

Jim

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.

Guest
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.

Loading...
 Share

×
×
  • Create New...