Cavester
(Fresh Scripter)
2006-11-29 10:10 AM
Script not run on logon

Hi Guy's

I have wrote a new logon script which works fine when I execute it manually. However if I place a call to it from inside of our logon.bat file it will not map drives or printers?

Is there any obvious things to check for? As I say it works fine if I execute it once logged into windows.

Thanks,

Lee.


Richard H.Administrator
(KiX Supporter)
2006-11-29 10:43 AM
Re: Script not run on logon

Is the script actually running?

Are you logging any errors?

Have you checked the event log on the client machine to see if anything is recorded?

Consider using the LogEvent() command to write your own status information as the script executes. I give each event a level from 0-9 (0=error, 3=warning, 5=information, 7=debugging, 9=verbose debugging) and then assign the logging level on the command line. If the logging level is equal or greater than the event level then the event gets logged.


Björn
(Korg Regular)
2006-11-29 11:28 AM
Re: Script not run on logon

Just pondering are you actually writing call newlogon.kix within the logon.bat ?

JochenAdministrator
(KiX Supporter)
2006-11-29 11:37 AM
Re: Script not run on logon

Can you post the line in the batch file that 'calls' the KiX script ?

Cavester
(Fresh Scripter)
2006-11-29 11:52 AM
Re: Script not run on logon

call %0\..\Kix32.exe %0\..\N-E-Logon.kix

The script actually runs but just doesn't run some of the code inside on logon, e.g. adding drives and printers. Yet it does if I run the batch file by double clicking on it once logged in hence one would assume that the code is ok.

L.


Mart
(KiX Supporter)
2006-11-29 12:01 PM
Re: Script not run on logon

I’d add some error checking to the script.
If you put this

Code:
?"Some text the tell you what the script is doing now"
?@error
?@serror
sleep 3


after the lines that give errors you’d see what is going wrong and where to look.


Cavester
(Fresh Scripter)
2006-11-29 12:31 PM
Re: Script not run on logon

man this is weird!

the error checks show...

0
The opperation completed successfully.


Mart
(KiX Supporter)
2006-11-29 12:33 PM
Re: Script not run on logon

If @error shows 0 then the stuff should be done.
Can you post your script