Executing a external file (.bat, .vbs, etc) from a configuration file at start up of MicroStation?

We have a situation where we need to execute a file (.bat, .vbs) on MicroStation startup from an existing centralized (on a server) MicroStation Configuration File.  We need to know what code we would need to add to this central file to read a external file, again, something like a .bat or .vbs file.  What we need to do is to copy one file from the server to the local "config" area of MicroStation V8i.  Once this new file is copied to the local computer it will redirect to the new area we now have our Company configuration.

Does anyone know how to read, from a MicroStation Configuration File, a file that can copy a different file from the server to the local computer.  Maybe there is a way to copy a file within the Configuration file which could work as well.

Thanks,

  • There is no way that I know of to do this from a configuration file. You might be able to accomplish what you want through a MicroStation VBA program that is configured to autoload.

    Another option in the config file, instead of copying a server file, is to do  %if  exists at the server location. If it's found then do a %include to load it.

    Rod Wing
    Senior Systems Analyst

  • Is this just to copy a config redirection file after installing MicroStation?

    If so a simple batch file can be added to your windows login scripts. See MicroStation - QuickConfig Standard for an example of such a file.

    Marc

  • No, this is actually to override a configuration (Pointer File) file which resides on the local computer. This local config file is simple and only points/reads a "Site" config file (which houses our corporate variables) on a corporate Drive letter (Same data in all offices - SCCM). The Pointer config file is already on computers with MicroStation Installed. We want to replace this "Pointer" configuration file with a new one that points to a new place on our servers (basically to a new Site configuration file). We were going to have the "old Site" config file replace the "Pointer" file on the local system. Right now we just put code in the old "site" file to point to include the new "site" config file in the new location.

    For new installs we have the new pointer file installed with MicroStation (both v8i and v10) through our SCCM System.

    Login Script might be what we need to do but we were trying to avoid this if we could.
  • As it is just a one off operation to replace out of date 'pointer' files, I suggest your IT team write a batch file that copies and overwrites the existing file, then put it on a read-only server share that a user can access and run. Or you could just add a temporary group policy that would run it, removing the policy once all the machines are up to date.
    How many machines are involved?

    Syntax:
    IF EXIST <"Yourpath\filename.ext"> xcopy <"SourcePath\filename.ext"> <"TargetPath\filename.ext"> /<switches appropriate to your situation>
    You may need to set it up to run as admin if the target folder is not user-writable, there is plenty of general IT advice online regarding that.

    Marc