WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Server Configurations
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

WinBatch with Systems Management Server

Keywords:    SMS

Question:

How does Winbatch work with SMS, in other words, Winbatch is just another version of WuickBasic for script writing? Does it have the ability to work with SMS to create unattended installation files fairly easily?

Answer:

WinBatch is just another scripting language. No special hooks to SMS.

Note that one FEATURE of SMS is that when using the administrative security context, a job will only run as a background job and therefore will ignore all keystrokes. So unless you can come up with a way to change the user's context before running a job you will not be able to send any keystrokes to apps under SMS.

One of our users reporting the following:

I have just started using WinBatch with SMS and am quite pleased with the installation routines I am now able to come up with.

For example. Norton AV definition files in quiet mode (/q) used to take up to two minutes to install and used "ugly" DOS boxes for batch scripting. Now I use WIL Message boxes, WinExist statements, and Button presses to run a normal install that is controlled by WIL. This routine also uses the registry peeks to make sure that the user has the Large Volume Update installed (necessary for the latest definitions) and gets the correct path to NAV. It uses the path to check a file to see if the definitions are current. It does all this with error handling a little over 50 lines of code. The new routine takes between 20 and 30 seconds.

Remember to set your networked files as read only.

I highly recommend this product (with its extenders and the compiler) for SMS.


Question on Hiding SMS Remote control Icon:

How can I remove (hide) the SMS client remote control Icon on the task bar to prevent user from disabling it. "RunHide" won't work. I want the user has no access to the agent. Please help...

Answer:

Two suggestions...
  1. Sarcastic suggestion is to upgrade to Windows NT and implement policies.

  2. A more realistic approach is to have remote control run from HKLM\Software\Microsoft\Windows\Run and have a WinBatch script run after it that hides the Remote Control program (wuser).

  3. If that doesn't work then create a WinBatch program that sits in the background and waits for the Remote Control program to not exist and then start it.

Question (cont'd):

Well, I came up with this scipts that is 90% solve my problem:
******************************************
intcontrol (1002, 0, 0, 0, 0)

RunHide("d:\ms\sms\bin\wuser.exe", "")
WinHide("~Remote")
:hidesms
WinWaitExist("~Remote", -1)
if WinExist("~Remote") == @TRUE Then WinHide("~Remote")
goto hidesms

*********************************************
But when I terminate the agent manually (this can be an act of shutting down windows95)I get the "windows not found" error. I know I am close but... There should be something that sense agent's termination and stop winbatch from running in the back ground anymore.

Answer:

Try...
intcontrol (1002, 0, 0, 0, 0)

RunHide("d:\ms\sms\bin\wuser.exe", "")
WinWaitExist("~Remote", -1)
while 1
if !AppExist("wuser.exe") then break
ws=WinState("~Remote") 
if ws==@NORMAL || ws==@ZOOMED
ErrorMode(@off)
WinHide("~Remote")
ErrorMode(@CANCEL)
endif
TimeDelay(0.5)
endwhile

Message("WUSER","Exited")


WinHide("~Remote")
:hidesms
if WinExist("~Remote") == @TRUE Then WinHide("~Remote")
goto hidesms

Article ID:   W13504
Filename:   Winbatch with Systems Management Server.txt
File Created: 1999:08:24:11:43:26
Last Updated: 1999:08:24:11:43:26