How to Create a Short-Cut or Windows Batch File for Visual Integrator Import Job, or Export Job in Sage 100

How to create a short-cut or Windows batch file to run a Visual Integrator import job, export job, or other Sage 100 task outside the program

Sage 100 Advanced and Premium only, or Sage MAS 200 versions and higher 

The Sage 100 Application Server must be used to run the Visual Integrator jobs (or other such tasks) externally from a workstation client using a batch (.bat) file so that the ODBC path to the Sage 100 server is not modified, causing Sage 100 to fail to launch certain tasks.

First, there is the information needed from Import or Export Job Maintenance to create the Shortcut, Batch, or new APP item properly later in this instructional

  1. Open Import Job Maintenance or Export Job Maintenance depending on the job that will be used for this new shortcut or batch file
  2. Select the Job Name or create a new Job Name for this VI Job
    • Note the Job Name given
  3. Proceed with opening the Import or Export Job
    • Look to the upper right corner of the Import or Export Job Maintenance screen where it says Compiled File Name
    • Note the Compiled File Name given (VI Program Name) i.e. VIW###

After completing the steps to add to APPS tab of Application Server Configuration, all users will need to exit Sage 100 to complete the creation of the APP. Application Server Configuration can be used to stop the program if running as an application on the Server tab then restarted. If running Sage 100 as a Service then use Windows Services to stop the service and restart.

Next, the APPS tab in Application Server Configuration will be used to create a new link to the Job to be ran. This is in conjunction with the Batch or Shortcut that will be used together when executing the job

How to create the new item on the APPS tab of the Application Server Configuration program on the Server

  1. These steps are to be performed at the Sage 100 Advanced server
  2. From Windows, Start, Sage, Sage 100 (version) directory do the following:
  3. Open Application Server Configuration.
  4. Click on the Apps tab
  5. Click on the New button. The screen New – App Props for Server: “SAGE” will open
  6. Enter the Job Name given when the Job was created in Import of Export Job Maintenance. Should have been noted in first steps of this article
    • Note: The ‘App Name’ will be referenced in the batch file to execute the VI Job or similar task so it MUST match
  7. Enter the following values
    • ProvideX EXE: leave
    • Server INI: Enter ..\Launcher\Sota.ini
    • Lead Program: Enter StartUp.M4P
    • Leave the Extra CMD Options and Arguments fields blank
    • Start-In Directory: Enter the path to the ..\MAS90\Home folder from the Sage 100 Advanced server’s perspective. (Note: It will be the same as in Sage 100 Start-in Directory)
    • Init Window: Select Hidden
    • In the Options section, select “Allow Client Arguments“. The rest of the options must be unchecked.
  8. Click OK to close the New – App Props for Server: “SAGE” screen Click Apply button to save the new Application Name settings in Application Server Configuration.
  9. To verify settings once saved highlight the existing Sage 100 item listed on the APPS tab and click on the Detail button and compare it to the new item created. Providex EXE: thru Init Windows should be identical for both
  10. For this item to be usable all users must exit Sage 100 so the Service or Application can be stopped and started again on the server

How to create a Batch command string or Shortcut command string. Pathing used in the string will be based on the user’s Workstation installation path, not the servers.

  1. There are 3 lines in the batch file. Use the following steps to create the batch file:
    • Open Notepad in Windows
    • Right-click the Sage 100 ERP shortcut on the workstation and select Properties
  2. Copy the entire path from the Start in the directory and paste it into Notepad.
    • This will be Line 2
    • Insert CD followed by a space at the beginning of Line 2 so it looks similar to this: CD “C:\Sage\MAS 200 Client\Version4\MAS90\HOME”
    • For Line 1 – Enter the Drive letter followed by a colon that is found in Line 2. Our first 2 lines should look similar to this: CD “C:\Sage\MAS 200 Client\Version4\MAS90\HOME”
    • To create the 3rd line, copy the entire path in the Target folder. It should look similar to this: “C:\Sage\MAS 200 Client\Version4\MAS90\HOME\pvxwin32.exe” ../launcher/sota.ini *Client -ARG “SERVER1” “10000” “MAS 200
  3. Make the following adjustments to Line 3:
        • insert -hd after pvxwin32.EXE”. Line 3 should now look similar to this: “C:\Sage\MAS 200 Client\Version4\MAS90\HOME\pvxwin32.exe” -hd ../launcher/sota.ini *Client -ARG “SERVER1” “10000” “MAS 200
        • Replace the Application name with the name used in VI and on the APPS tab of Application Server Configuration. This is listed after the Port number. Line 3 should now look similar to this:”C:\Sage\MAS 200 Client\Version4\MAS90\HOME\pvxwin32.EXE” -hd ../launcher/sota.ini *Client -ARG “SERVER1” “10000” “VIIMPORTJOBNAME
  4. The remainder of Line 3 needs the following: -ARG= DIRECT UION UserLogon Password Company VIWxxx AUTO.
    • a. No Spaces are used here -ARG=DIRECT
      b. VIWxxx=compliled VI name found in the upper right corner of job in Maintenance
      c. UserLogon=Sage 100 user login that has permissions to run VI Job
      d. Company= Company Code to be used for VI Job
  5. Line 3 should now look similar to this: “C:\Sage\MAS 200 Client\Version4\MAS90\HOME\pvxwin32.EXE” -hd ../launcher/sota.ini *Client -ARG “Server Name” “Port” “App Name” -ARG= DIRECT UION John Doe ABC VIWI00 AUTO
  6. The batch file should now be complete and look similar to the following:
    • C:
    • CD “C:\Sage\MAS 200 Client\Version4\MAS90\HOME”
    • C:\Sage\MAS 200 Client\Version4\MAS90\HOME\pvxwin32.EXE” -hd ../launcher/sota.ini *Client -ARG “Server Name” “Port” “App Name”-ARG= DIRECT UION John Doe ABC VIWI00 AUTO
  7.  Save the Notepad file with an extension of .bat to create the batch file. Double-click the batch file to execute the file.

Sage 100 Standard only, or MAS 90 versions 4.00 and higher, or MAS 200 versions 4.00 to

  1. Verify that the task exists as a menu item that can be given access in Role Maintenance.
  2. Verify that Visual Integrator jobs exist on the Jobs Menu.
    • Note: This is automatic for jobs importing into modules upgraded to level 4 standards, but must be added manually if the job imports into legacy modules.
  3. Give the user login access to the menu task in Role Maintenance. For more information, see How to set up user roles and permissions.

Create a command-line with the following information:
Note: Enter all text in the case indicated. Some arguments are case-sensitive.

  • ..\MAS90\Home\Pvxwin32.exe ..\launcher\sota.Ini ..\SOA\Startup.M4P -ARG DIRECT (UI State) (User Logon) (Password) (CompanyCode) (Program Name) (Program Argument)


  • If a field in the argument is not needed (for example, passwords are not used), enter “” (two quotes) as a placeholder.
  • Enter the user logon from the User Logon field in User Maintenance, not the User Code field.
  • Set UIState to either UION or UIOFF. This setting specifies whether there will be any user interface. For example, whether the user will receive error notifications in a message box.
  • Set Program Argument to AUTO or MANUAL. Note: AUTO must be uppercase or the interface will still display.
  • The manual option displays the interface for the import job and requires the user to click Accept. Use the manual option for testing purposes before using Auto.
  • Use AUTO for the program argument after verifying that the job is successful using the manual option.
  • If the command line is run in a batch file (for example, Jobs.bat), enter the command similar to the following: Note: The current directory is first set to ..\Mas90\Home before running the command, and the program argument is initially set to MANUAL.
  • F:
  • CD F:\Version4\MAS90\Home                                                                        Pvxwin32.exe .. \Launcher\Sota.Ini ..\SOA\Startup.M4P -ARG DIRECT UION myuser mypassword ABC VIWI00 MANUAL
  • If a mapped drive letter is used, make sure the drive letter is mapped to a directory above the “..\MAS90” directory where Sage 100 ERP (or MAS 90/200) is installed, not to the “..\MAS90” directory itself.