#199711 - 2010-09-01 03:46 PM
.bat file runs on my PC but not through kix login script
|
pink_stig
Fresh Scripter
Registered: 2010-09-01
Posts: 10
Loc: Lincoln
|
Hi guys,
I was wondering if you could help me... We currently use kix login scripts in our network and I am trying to delete some files on each machine when the users login. To do this I have created a .bat file that works perfectly on my machine. But, when I run it from the kix login it doesnt find the locations.
The code to call the .bat file is
IF INGROUP("ETC ETC ETC") RUN '\\SERVER\NETLOGON\test.bat' ENDIF
exit
This then runs the .bet file fine....
The .bat file is made up of this
Echo off Cls :menu echo. echo................. echo Deleting ACAD Virus Files echo................. echo. DEL /F /S /Q "acad.dvb" DEL /F /S /Q "acaddoc.lsp" DEL /F /S /Q "acadapq.lsp" exit
It runs ok, but then says cannot find c:/Windows/R - and there is no reference to this folder in the script anywhere.
Can you help me????
|
|
Top
|
|
|
|
#199712 - 2010-09-01 04:24 PM
Re: .bat file runs on my PC but not through kix login script
[Re: pink_stig]
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Try this:
If InGroup("ETC ETC ETC")
go C:
Shell '"'+%COMSPEC%+'" /C \\SERVER\NETLOGON\test.bat'
EndIf
|
|
Top
|
|
|
|
#199715 - 2010-09-01 05:54 PM
Re: .bat file runs on my PC but not through kix login script
[Re: ChristopheM]
|
pink_stig
Fresh Scripter
Registered: 2010-09-01
Posts: 10
Loc: Lincoln
|
Wow, thanks for a quick response guys!!!
I have amended the kix file to
If InGroup("ETC ETC ETC") go C: Shell '"'+%COMSPEC%+'" /C \\SERVER\NETLOGON\test.bat' EndIf
As suggested and it works a treat... and also changed the .bat file to
DEL /F /S /Q "C:\acad.dvb" DEL /F /S /Q "C:\acaddoc.lsp" DEL /F /S /Q "C:\acadapq.lsp"
I have moved lots of files in different locations on the c: and it gets rid of all of them!!!
Thanks so much! recon I'll roll this out for tomorrow to start the cleanup process of the CAD virus... friggin thing.
Thanks again!
|
|
Top
|
|
|
|
#199727 - 2010-09-02 11:41 AM
Re: .bat file runs on my PC but not through kix login script
[Re: pink_stig]
|
pink_stig
Fresh Scripter
Registered: 2010-09-01
Posts: 10
Loc: Lincoln
|
Hey, just so you know, all went great with the script and its now been rolled out.
thanks again for all your help!
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 320 anonymous users online.
|
|
|