Page 1 of 1 1
Topic Options
#20569 - 2002-04-25 06:37 AM Hiding batch file window
ash wilson (kyosei) Offline
Getting the hang of it

Registered: 2002-04-22
Posts: 58
Loc: auckland new zealand
Currently I use a batch file to check that all KiXtart files are present on client (NT and 9x) and then start an initial Kix script.

This Kix script is small and basically is used to check if the latest version of the 2nd (main) Kix script is present on the client and download it if not.

Using setconsole("hide") in the Kix scripts works fine to hide the Kix windows but the initial Dos window from the batch file still shows on screen, how can this be hidden also?

Appreciate any help
_________________________
KYOSEI. There are only three groups of people that can count. Those that can, and those that can't.

Top
#20570 - 2002-04-25 07:58 AM Re: Hiding batch file window
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Hello kyosei,

So far in the time I've been on this board I have not seen anyone offer a method to completely hide the DOS box. i.e. you are running either CMD.EXE or COMMAND.COM to run this batch file and so it does produce a box.

If you only have Windows 2000/XP systems you might be able to run KIX32.EXE LOGON.KIX (have not tried it myself as we have many Windows 9x systems still)

You can though run the DOS window minimized to the taskbar.

START /MIN %0\..\KIX32.EXE LOGON.KIX

Top
#20571 - 2002-04-25 08:31 AM Re: Hiding batch file window
ash wilson (kyosei) Offline
Getting the hang of it

Registered: 2002-04-22
Posts: 58
Loc: auckland new zealand
NTDOC,
Thanks for your reply.

I recall that under WFW and win9x you could change the properties of a DOS program to run minimized/maximized etc and it created a PIF file to control it. So I thought there may be a way to do the same under NT.

Perhaps if I put the batch file on a 9x pc, changed the properties and then copied the resultant PIF file to the netlogon share it might work.

Has anyone tried this?

I'm not back at work until Monday so cannot tey it until then.

rgds ash
_________________________
KYOSEI. There are only three groups of people that can count. Those that can, and those that can't.

Top
#20572 - 2002-04-25 11:25 PM Re: Hiding batch file window
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Yes,

I think MCA has done this already and it should also work just fine.

Top
#20573 - 2002-05-20 05:06 PM Re: Hiding batch file window
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

(earlier published information. thanks NTDOC pointing to that)

Another possibility is the way you are calling the script in your usermanager.
Put f.e. logon.bat in your logonscript field.
The batch file can have the contents:
code:
  @echo off
%0\..\kix32.exe %0\..\your_script.kix
exit
@echo off

But possible you need another file (= LOGON.PIF), which will close that box.
Why?

During some tracing of "what activities of registry are there" and "which
file handling things are going on" we saw that the system is trying to
locate PIF files.
In our case we run the CLEANUP.BAT file without an existing PIF file.
The code is something like this:
code:
  @echo off
deltree /y c:\temp\.
exit
@echo off

  • we start the BAT file by our windows explorer
    Result:
    commands were executed normally and the exit statement
    in that BAT file wasn't executed. The box remains open.
  • we start the BAT file from a DOS box by entering CLEANUP.BAT
    Result:
    commands were executed normally and the exit statement
    in that BAT file seems to be executed. The box was closed.
What was the differences between both: the DOS box was started by a PIFfile with the option Close on exit active.
What did we do: we try to change the properties of the file CLEANUP.BAT
and it was possible to set the option Close on exit active. After Apply
and OK a new file was created with the name CLEANUP.PIF.

After running the BAT file by our windows explorer the commands were
executed properly and the box was closed also. File tracing shows us
that the system tries to find the cleanup.pif file after
starting the cleanup.bat file. The PIF file just contains
the Close on exit setting.

Our advise is: try to create also a PIF file from your BAT file with
Close on exit set to active
and
place it in the same directory where your LOGON.BAT is
located.

Greetings.

[ 20 May 2002, 17:07: Message edited by: MCA ]
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.102 seconds in which 0.073 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org