4,359 bytes added,
22:05, 16 November 2011 == Overview ==
The SmartSimple plug-ins retain the last configured settings. If you frequently switch between multiple instances, it can become tedious to continually have to change these settings. As such, the following quick solution is available to accommodate users working within multiple instances requiring frequent access to the plug-ins.
Using a [http://en.wikipedia.org/wiki/Batch_file DOS Batch File], we can create a simple menu allowing the user to save multiple plugin configurations and switch easily between them.
== Sample Configuration Batch File ==
<pre>
@ECHO OFF
CLS
GOTO MENU
:MENU
ECHO.
ECHO .....................................
ECHO . SMARTSIMPLE INSTANCE SETTING COPY .
ECHO .....................................
ECHO.
ECHO This will copy your SmartSimple settings for Office and Online Edit
ECHO Tool into a folder on your local hard drive.
ECHO.
ECHO ** This is a REQUIRED step for SMART SWITCH to function **
ECHO.
ECHO - INSTRUCTIONS -
ECHO In Word, configure your SmartSimple Settings as you normally would for
ECHO the instance you are logging into. Once you have done this and saved
ECHO the settings, close out of all Office applications and select the
ECHO instance you are currently configured to access using the menu below.
ECHO.
ECHO Repeat this step for the second instance. When you are done, EXIT.
ECHO.
ECHO.
ECHO PRESS 1 or 2 to select your instance, or 3 to EXIT.
ECHO.
ECHO 1 - INSTANCE A
ECHO 2 - INSTANCE B
ECHO 3 - EXIT
ECHO.
SET /P M=Type 1, 2, or 3, then press ENTER:
IF %M%==1 GOTO INST_A
IF %M%==2 GOTO INST_B
IF %M%==3 GOTO EOF
:INST_A
MD %USERPROFILE%\SmartSimple\INSTANCE_A
CLS
ECHO.
ECHO.
XCOPY "%APPDATA%\SmartSimple\SETTING.INI" "%USERPROFILE%\SMARTSIMPLE\INSTANCE_A" /Q /R /Y
ECHO.
ECHO.
ECHO If you see any errors above, please contact SmartSimple Administrator.
PAUSE
GOTO MENU
:INST_B
MD %USERPROFILE%\SmartSimple\INSTANCE_B
CLS
ECHO.
ECHO.
XCOPY "%APPDATA%\SmartSimple\SETTING.INI" "%USERPROFILE%\SMARTSIMPLE\INSTANCE_B" /Q /R /Y
ECHO.
ECHO.
ECHO If you see any errors above, please contact your SmartSimple Administrator.
PAUSE
GOTO MENU
:EOF
CLS
</pre>
== How It Works ==
The settings are stored in the following location:
<blockquote>'''VISTA/WIN 7:''' C:\Users\''username''\AppData\Roaming\SmartSimple\SETTING.INI<br>
'''WINDOWS XP:''' C:\Documents and Settings\''username''\Application Data\SmartSimple\SETTING.INI</blockquote>
The batch file creates a folder called SmartSimple within the user profile folder:
<blockquote>'''VISTA/WIN 7:''' C:\Users\''username''\SmartSimple<br>
'''WINDOWS XP:''' C:\Documents and Settings\''username''\SmartSimple</blockquote>
Within that folder, subfolders are created to accommodate storing the SETTING.INI for each instance.
<blockquote>'''VISTA/WIN 7:''' C:\Users\''username''\SmartSimple\INSTANCE_A<br>
'''VISTA/WIN 7:''' C:\Users\''username''\SmartSimple\INSTANCE_B<br>
'''WINDOWS XP:''' C:\Documents and Settings\''username''\SmartSimple\INSTANCE_A<br>
'''WINDOWS XP:''' C:\Documents and Settings\''username''\SmartSimple\INSTANCE_B</blockquote>
In our example, there are only two instances to switch between, but the batch file can be modified to work with any number of instances.
With the folders in place, the Config batch will copy the SETTING.INI to the appropriate folder based on the user’s input.
It is possible for the user to copy the their SETTING.INI into the wrong folder as there is no verification aside from the user visually confirming that the correct settings were applied and saved in the SmartSimple Plug-in prior to initiating the copy.<br>
It is advisable to make a habit of checking the settings twice to confirm they were applied correctly prior to initiating the copy.
After initiating the copy, there is a pause which prompts the user to visually confirm that there were no errors received during the copy process. It then returns the user to the main menu options to allow for them to configure another instance if needed, otherwise they can exit the application.
With the configuration complete, the SmartSwitch file will then enable the user to switch quickly between the instances using a menu. The batch file closes instantly after the copy is completed.