MIS Systems Thread, Automating the report import process after SOLUS update in Technical; The CommandReportImporter forms the basis of the script but the main issue for support teams is that you must specify ...
-
10th April 2007, 10:07 AM #1
- Rep Power
- 0
Automating the report import process after SOLUS update
The CommandReportImporter forms the basis of the script but the main issue for support teams is that you must specify which rptdef to import. I have written a short batch script which should eliminate this problem. This script relies on the fact that the newest rptdef will also be the most recently created file. The batch file makes a copy of the most recent file and saves it as 'Latest-Report.rptdef'. This is then imported by the CommandReportImporter:
[copy the following code to a notepad and save with .bat extension. You will need to change the USER, PASSWORD and sims.net path as necessary.]
Code:
c:
cd \
cd program files\sims\sims .net
SIMSLOAD.exe
del Latest-Report.rptdef /F /Q
for /F "usebackq" %%A IN (`dir /O:D /B Predefined_Reports*.rptdef`) do (
set FI=%%A
)
copy %fi% Latest-Report.rptdef
CommandReportImporter.exe /user:damon /PASSWORD:damon /report:"Latest-Report.rptdef"
The above code should be run after a Solus upgrade has completed. It can be launched from any machine but I would advise using the server. Unfortunately you cannot simply paste this on the bottom of your automated Solus script as the batch file will need to be written to wait for the solus upgrade to complete before it attempts to import the latest reports. The most straight forward method is to simply schedule this bat to run a few hours after the upgrade to allow Solus to complete. For those of you that are more technically minded, you can script your bat to wait for the Solus upgrade to end. I would advise simply using the sleep.exe from the Windows 2003 Resource kit:
http://www.microsoft.com/downloads/d...DisplayLang=en
Add the following command between the solus.exe and the simsload for a 2 hour pause (the parameter value is in seconds).
Sleep 7200
I've been looking at adding a wait command for solus to finish before launching the importer but the problem is that solus.exe launches solapp.exe and then exits. Due to this, the batch script continues with the commands as soon as solus.exe closes rather than waiting for the solapp. The workaround will probably need to use vbs or something like Auto-IT as I believe you can create a wait for window function. You could then launch the exe at the end of the solus automation. The exe would need to wait for the solapp window to close and then run the above batch script. If I find time over Easter I will create a file which can be used by support teams.
Please note: SIMSLOAD.EXE is launched prior to the CommandReportImporter.exe to ensure that the most recent report definition file is installed in the sims.net dir. As far as I remember, Solus does not automatically upgrade the client install on the server. If I'm proven wrong, you can remove simsload from the script.
I wrote this batch file very quickly today so I haven’t had a chance to test it thoroughly. There's not alot that can go wrong as far as I can see but I will produce an update and perhaps an installer soon so that it can be rolled out with ease by support teams if they choose to do so.
Hope this helps
-
-
IDG Tech News
-
10th April 2007, 11:58 AM #2
- Rep Power
- 0
Re: Automating the report import process after SOLUS update
Yes nice. I like the repeated assignments with /OD. Very sneak 
The one problem you may have is that the script assumes SIMSLoad will always be successful.
Can SIMSLOad run without access to a GUI?
-
-
10th April 2007, 01:15 PM #3
- Rep Power
- 0
Re: Automating the report import process after SOLUS update
Thanks NG good point 
I can't see a way to run simsload silently but perhaps this line would suffice:
start /wait S:\setups\SIMSApplicationSetup.exe /S {QuietMode} {NoServerApps} [SIMSDirectory]="S:\sims" [SIMSDotNetDirectory]="C:\Program Files\SIMS\SIMS .net"
Thus avoiding simsload completely. Thats assuming the rptdef is installed by SIMSApplicationSetup.exe
I'm not sure what happens if an error occurs whilst running the installer like that though so it may end up being the same result as a failed simsload.
-
SHARE: 
Similar Threads
-
Replies: 3
Last Post: 14th December 2007, 01:13 PM
-
By NetworkGeezer in forum Scripts
Replies: 2
Last Post: 9th May 2007, 08:00 PM
-
By philjones2000 in forum MIS Systems
Replies: 7
Last Post: 16th March 2007, 07:30 PM
-
By djm968 in forum Hardware
Replies: 2
Last Post: 4th October 2006, 07:49 AM
-
By woody in forum Windows
Replies: 22
Last Post: 2nd November 2005, 01:11 PM
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
-
Forum Rules