Gary O
(Lurker)
2003-08-25 02:09 PM
Using Kixtart to run ez-audit trhough login script

I have written a small script to run EZ-Audit on machines, in which the users are in a specifc group (EZAUDIT), as they log in. I have been able to get the script to run on Windows XP, NT, and 2000. But it does not seem to run on any Windows 95 machines. I have found that I can launch Kixtart from the command prompt and the program will run on Windows 95 clients. Below is the scipt I am using. Any help would be greatly appreciated:

:setcmd
if @INWIN = 1 ; 1 = NT, 2 = Win95
$CMD = "cmd /E:1024 /C" ; e.g., shell "$CMD whatever.bat"
$DllDir = "%SYSTEMROOT%\System32"
else
$CMD = "command.com /E:1024 /C"

endif

:runeza
IF INGROUP("EZAUDIT")
CLS
AT (12,12) "YOUR WORKSTION IS BEING INVENTORIED BY EZ AUDIT"
SLEEP 10
CLS
USE V: /DEL
USE V: "\\ipmcs01\ezaudit"
SHELL "$Cmd V:\ezscan.exe /Auto"
USE V: /DELETE
Return
endif
Return


LonkeroAdministrator
(KiX Master Guru)
2003-08-25 02:16 PM
Re: Using Kixtart to run ez-audit trhough login script

there is no problems foundable in the part you showed.
well, except...

instead of:
code:
:setcmd
if @INWIN = 1 ; 1 = NT, 2 = Win95
$CMD = "cmd /E:1024 /C" ; e.g., shell "$CMD whatever.bat"
$DllDir = "%SYSTEMROOT%\System32"
else
$CMD = "command.com /E:1024 /C"
endif

:runeza
IF INGROUP("EZAUDIT")
CLS
AT (12,12) "YOUR WORKSTION IS BEING INVENTORIED BY EZ AUDIT"
SLEEP 10
CLS
USE V: /DEL
USE V: "\\ipmcs01\ezaudit"
SHELL "$Cmd V:\ezscan.exe /Auto"
USE V: /DELETE
Return
endif
Return

you should use:
IF INGROUP("EZAUDIT")
CLS
AT (12,12) "YOUR WORKSTION IS BEING INVENTORIED BY EZ AUDIT"
USE V: /DELETE
USE V: "\\ipmcs01\ezaudit"
SHELL "%comspec% /c V:\ezscan.exe /Auto"
USE V: /DELETE
endif


see the FAQ forum for more about shell and run and console usage.


Gary O
(Lurker)
2003-08-25 02:35 PM
Re: Using Kixtart to run ez-audit trhough login script

I made the changes you recommended. I still have the same problem, which I neglected to put in my first post, which is I get a Kernel 32 error when I run the script and it stops executing.

Kdyer
(KiX Supporter)
2003-08-25 02:38 PM
Re: Using Kixtart to run ez-audit trhough login script

Gary,

Windows 9x, will need COMMAND.COM, not CMD.EXE.

COMMAND.COM is also available on nt-class machines too..

Thanks,

Kent

[ 25. August 2003, 14:41: Message edited by: kdyer ]


Gary O
(Lurker)
2003-08-25 03:15 PM
Re: Using Kixtart to run ez-audit trhough login script

This is what I had in my script to handle Win 95.

:setcmd

if @INWIN = 1 ; 1 = NT, 2 = Win95

$CMD = "cmd /E:1024 /C"

else

$CMD = "command.com /E:1024 /C"

endif

Shouldn't this work?


cwick
(Fresh Scripter)
2003-08-25 03:31 PM
Re: Using Kixtart to run ez-audit trhough login script

GaryO,

Just a suggestion, try using the server\share name and not a drive mapping. I just got this working last week with the following code.
IF INGROUP ("ezaudit")
RUN "%COMSPEC% /c \\server\share$\ezaudit\ezscan.exe auto"
ENDIF

Win9x may just be a little slow with the drive mappings.

Thank you to everyone I have really learned a lot from this forum in the last few weeks.


Gary O
(Lurker)
2003-08-25 04:39 PM
Re: Using Kixtart to run ez-audit trhough login script

That did it. Using server\share name instead of mapping a drive took care of the problem.

Thanks for the help.


LonkeroAdministrator
(KiX Master Guru)
2003-08-25 04:48 PM
Re: Using Kixtart to run ez-audit trhough login script

you still should update your script according to my suggestion.

1) you get rid of those gosubs
2) your script is simpler as it will automatically determine which command-interpreter to use
3) as I wrote it [Big Grin]