Scripting

Expand all | Collapse all

Does anyone have a script that can be run when a s

Marc Cregan

Marc Cregan06-12-2015 10:46

  • 1.  Does anyone have a script that can be run when a s

    Posted 01-09-2015 14:49
    Does anyone have a script that can be run when a server is rebooted that starts the Application Server as an application without interaction?


  • 2.  RE: Does anyone have a script that can be run when a s

    Posted 01-09-2015 14:56
    You can use the Autologon tool from Sysinternals (http://technet.microsoft.com/en-us/sysinternals/bb963905) to log in to the server automatically, and then you can just throw the Application Server Startup in the Start Menu \ All Programs \ Startup folder of that user.


  • 3.  RE: Does anyone have a script that can be run when a s

    Posted 01-09-2015 15:07
      |   view attached
    Will that start the application server or will it just launch the configuration?


  • 4.  RE: Does anyone have a script that can be run when a s

    Posted 01-09-2015 16:20
    Look in the Sage folder under the programs menu. You should see a shortcut to start the application without first starting the configuration. This is the shortcut to copy into the Startup folder.


  • 5.  RE: Does anyone have a script that can be run when a s

    Posted 01-10-2015 06:18
    I have a customer who does this - I think they're using @SteveIwanowski method. There are a couple ways I found -- the biggest gotcha is that running as an application requires the user to login first and if you don't automate that then if your server reboots you may find that everyone is logged out of Sage until someone runs into the server room with the proper login. Not ideal for today's reality where people run the server and have multiple remote users and offices connecting. Obviously if you run as a service you bypass the above issues but many times running as a service is (inexplicably) unstable once you reach the mystical 20+/- user mark in Sage 100 Advanced.


  • 6.  RE: Does anyone have a script that can be run when a s

    Posted 01-10-2015 06:56
    There is a way to have the administrator automatically logged in on a reboot (I forget the details but I'm sure Google knows), but it is a security risk as it leaves the administrator password in plain text in the registry.


  • 7.  RE: Does anyone have a script that can be run when a s

    Posted 01-13-2015 10:24
    For daily usage, the combination of AutoLogon + copying the App Server Startup shortcut to the Windows StartUp folder is best. It will encrypt the user, pswd, domain in the registry


  • 8.  RE: Does anyone have a script that can be run when a s

    Posted 01-13-2015 17:19
    I typically suggest Autologon, but recently I became aware of the following from a client: Added the following key to the Windows Registry on the Sage 100 Server: HKLM > Software > Microsoft > Windows > CurrentVersion > Run Name: SAGE Value: ""C:\Sage\Sage 100 Advanced ERP\MAS90\Home\pvxwin32.exe"" -mn lib\_appserv\apssrv.ini lib\_appserv\server -ARG SAGE (Of course, that whole first section in quotes would be changed to the path of the MAS90 directory for that server's installation.) This starts the Sage 100 Server application upon startup of the server. No one needs to log into Windows. You can verify that it will run at startup by going to Start > Run and typing MSCONFIG. Then go to the Startup tab and you should see it there.


  • 9.  RE: Does anyone have a script that can be run when a s

    Posted 01-13-2015 18:00
    Oh yeah that's the system Run key in the registry under HKLM. I totally forgot about that! Very good trick! But the one possible thing I would raise an eyebrow about is it does the App Server now run under the context of the LocalSystem account? With AutoLogon you get to specify the user, pswd, domain so you can for sure run the App Server with a domain account.


  • 10.  RE: Does anyone have a script that can be run when a s

    Posted 02-13-2015 07:11
    @BrettZimmerman I was able to implement your solution and it worked like a charm. Thanks!!


  • 11.  RE: Does anyone have a script that can be run when a s

    Posted 06-12-2015 08:13
    Hi all - Just tried @BrettZimmerman suggestion for MSCONFIG on server 2012 OS and it does not appear in the Startup tab. A little Googling suggests this is not enabled/working in server 2012? Has anyone got this working on server 2012?


  • 12.  RE: Does anyone have a script that can be run when a s

    Posted 06-12-2015 10:43
    It's funny because that works in Windows 8, but not in Server 2012 (they share the same kernel), so that's just Microsoft being Microsoft. You can use Sysinternals Autoruns (http://live.sysinternals.com/autoruns.exe) to confirm that it is starting up, as well as everything else on that box. And while you're in there, unhceck SageAutoUpdate/Sage Advisor :).


  • 13.  RE: Does anyone have a script that can be run when a s

    Posted 06-12-2015 10:46
    Thank you Steve - i'll give that a whirl