+ Post New Thread
Results 1 to 12 of 12
Coding Thread, VB coding for bespoke SIMS launcher in Coding and Web Development; Hi guys and girls... Will start by saying thank you in advance. I/we have recently performed the SIMS Summer 2 ...
  1. #1

    Join Date
    Jul 2011
    Location
    Leicester
    Posts
    73
    Thank Post
    18
    Thanked 2 Times in 2 Posts
    Rep Power
    7

    VB coding for bespoke SIMS launcher

    Hi guys and girls...

    Will start by saying thank you in advance.

    I/we have recently performed the SIMS Summer 2 upgrade.

    However, we have 3 schools on campus, all of which have their own SIMS installation, but they all share access to out music school which needs access to all 3 SIMS.

    We have a bespoke launcher however the raw code has been long lost

    I have converted a .bat file to an .exe file, however I need to call this .exe in VB, sadly I haven't done any VB programming since about 1995.

    For example, I have created a VB project called SIMS launcher, 4 buttons, 1 for each school and a cancel/exit button (which actually works...woohoo)

    When a user clicks on LGS, I need it to call LGS SIMS Launcher v3.5.exe..... How do I do that?!?

    Also, how do I export my project in VB to an exe file?

    please note I am using VB 2010 Express.

    Any advice is welcome.

    Many thanks and kind regards,

    Cookie

  2. #2

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    If it's just literally calling an exe:

    It's shell("item"), and options etc.

    e.g.

    Code:
    Shell("""C:\my.exe"" SendThisStuffAsCommandLineOptions", vbHide)
    Would run the exe, with those commands and hide it from view.


    Code:
    Shell("""C:\my.exe"" SendThisStuffAsCommandLineOptions")
    would run it with command lines, and not change default view.

    Code:
    Shell("C:\my.exe")
    would just run simple exe.

    Steve

  3. Thanks to Steve21 from:

    cookie_monsta (22nd October 2013)

  4. #3

    Join Date
    Jul 2011
    Location
    Leicester
    Posts
    73
    Thank Post
    18
    Thanked 2 Times in 2 Posts
    Rep Power
    7
    Hi Steve,

    thanks for your prompt reply..

    Do I need to copy the 3 .exe files into a particular folder where I am creating the VB project? (they are currently sitting on a network drive at the moment)

    thanks,

    Cookie

    Quote Originally Posted by Steve21 View Post
    If it's just literally calling an exe:

    It's shell("item"), and options etc.

    e.g.

    Code:
    Shell("""C:\my.exe"" SendThisStuffAsCommandLineOptions", vbHide)
    Would run the exe, with those commands and hide it from view.


    Code:
    Shell("""C:\my.exe"" SendThisStuffAsCommandLineOptions")
    would run it with command lines, and not change default view.

    Code:
    Shell("C:\my.exe")
    would just run simple exe.

    Steve

  5. #4

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    That's up to you. You can run it locally, or just put the UNC/local paths into the Shell which is my preferred method . (Assuming they have access anyway?)

    It depends what your exe does I guess? Don't really see any reason to put it into the project, unless it's something you need to deploy out manually anyway?

    Steve

  6. #5

    Join Date
    Jul 2011
    Location
    Leicester
    Posts
    73
    Thank Post
    18
    Thanked 2 Times in 2 Posts
    Rep Power
    7
    All the exe does is to check is the correct SIMS client files are installed (if not it will run pulsar to do the upgrade) and then maps the correct drive across and then launches SIMS ready for the user to login.

    Ive entered:

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LGS.Click
    Shell("\\nfs02\networks$\cookie\documents\visual studio 2010\Projects\SIMS\SIMS\LGS Sims Launcher V3.5.exe")
    End Sub

    And now it wont compile (no errors or warnings though )

    Quote Originally Posted by Steve21 View Post
    That's up to you. You can run it locally, or just put the UNC/local paths into the Shell which is my preferred method . (Assuming they have access anyway?)

    It depends what your exe does I guess? Don't really see any reason to put it into the project, unless it's something you need to deploy out manually anyway?

    Steve

  7. #6

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    How do you mean by it won't compile without warning/error?

    As in what's not working? It'll always error out if it's not happy with something.

    Steve

  8. #7

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,720
    Thank Post
    3,248
    Thanked 1,049 Times in 971 Posts
    Rep Power
    364
    Would it help or make any difference if the UNC Path was mapped as a drive letter onto the local pc and then from there shell("X:\directory\file.exe")

    ???

  9. #8

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    In terms of compiling it makes no difference. End of day you could try to compile it to run, ILikeJaffaCakes/%?%?%%?%?%??!!"$$ and it'll compile successfully Just wouldn't run the file.

    Steve

  10. Thanks to Steve21 from:

    mac_shinobi (22nd October 2013)

  11. #9

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,720
    Thank Post
    3,248
    Thanked 1,049 Times in 971 Posts
    Rep Power
    364
    Would using the Shell API vs the Shell function work better or give you any more functionality etc ( should be a pre made module etc that uses the Shell API and just call the relevant method / function etc to launch said exe etc ??

    Just a thought .......

  12. #10

    matt40k's Avatar
    Join Date
    Jun 2008
    Location
    Ipswich
    Posts
    4,388
    Thank Post
    368
    Thanked 637 Times in 519 Posts
    Rep Power
    158
    If you contact your SIMS support team first, they would tell you that SIMS supports what your after out the box - SIMS.net and multiple connect.ini files. If you just copy the shortcut, then add /CONNECT point it at connect.ini file for that school or create a connect.ini will all the options then when you click SIMS you'll get a drop-down. Just saying...

  13. Thanks to matt40k from:

    mac_shinobi (24th October 2013)

  14. #11

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,720
    Thank Post
    3,248
    Thanked 1,049 Times in 971 Posts
    Rep Power
    364
    Quote Originally Posted by matt40k View Post
    If you contact your SIMS support team first, they would tell you that SIMS supports what your after out the box - SIMS.net and multiple connect.ini files. If you just copy the shortcut, then add /CONNECT point it at connect.ini file for that school or create a connect.ini will all the options then when you click SIMS you'll get a drop-down. Just saying...
    Sounds better, after all why re-invent the wheel if it already gives you the option to sort it out that way.

  15. #12

    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    32
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    If your SIMS installations are always kept at the same level, you could just use the native connect.ini SIMS client config file to offer the user multiple options on launch. The choice is then represented as a drop down box under the username and password, upon launch of pulsar.exe. These could point at the three discrete SQL instances. We use this for development platforms quite a bit. Apologies if I've not understood correctly.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 5
    Last Post: 29th January 2013, 10:16 AM
  2. SIMS Launcher Module NO ID
    By ndavies in forum MIS Systems
    Replies: 4
    Last Post: 29th February 2008, 12:54 PM
  3. SIMS Launcher Module - Station needs defining
    By randle in forum MIS Systems
    Replies: 7
    Last Post: 18th June 2007, 12:35 PM
  4. Replies: 0
    Last Post: 21st May 2007, 11:10 AM
  5. VBS script for prestaging computers anyone?
    By ChrisH in forum Scripts
    Replies: 7
    Last Post: 23rd June 2006, 09:59 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •