#150574 - 2005-10-25 06:18 PM
Kixtart problem? Or just me [again]?
|
tsmith
Fresh Scripter
Registered: 2005-10-19
Posts: 27
|
I've written a script that I'd like to implement at logon. I know it works, at least when running it interactively. When I try to execute it at logon, however, I get...NOTHING.
Each Dept has their own logon script. Each is about 1kb in size (according to Explorer). And all they do is map several drives.
In the one for us here in "IT", I added:
if not %username%==tom then goto End
kix32 InventoryTXT
:END
And I know this too works, as I've tried it with smaller scripts, and even with a 'pause' statement.
But when I replace the old "InventoryTXT.kix" script with the new (about 12kb in size), I get...I get...NOTHING. I just get logged on as usual, with *no* indication that my kix script is running. (When it runs, the person logging on should see a banner indicating that "IT" is collecting some data.) No error, no msg, no nothing.
I remember something about the size of a logon script, but I thought that was for the script called from ones profile (the one to which I added), and not an issue for me, because I had this working.
Any help would be appreciated. I've spent several days getting to this point, and now...nothing. All for naught. (I sure hope this is a simple fix.)
Thanks again,
Tom
|
|
Top
|
|
|
|
#150575 - 2005-10-25 06:24 PM
Re: Kixtart problem? Or just me [again]?
|
maciep
Korg Regular
   
Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
|
hmmm, i see you hav an "==" in there and you mention the use of "pause". So i'm guessing what you have here is a batch file - which is why it doesn't work in kix 
ooops, i think i mis-read the question
Edited by maciep (2005-10-25 06:25 PM)
|
|
Top
|
|
|
|
#150577 - 2005-10-25 06:37 PM
Re: Kixtart problem? Or just me [again]?
|
tsmith
Fresh Scripter
Registered: 2005-10-19
Posts: 27
|
Yes. I checked. (We only have 2.) And the logon script itself isn't a batch file (it isn't a ".bat"), but it is a command script (".cmd").
Thanks
|
|
Top
|
|
|
|
#150578 - 2005-10-25 06:55 PM
Re: Kixtart problem? Or just me [again]?
|
tsmith
Fresh Scripter
Registered: 2005-10-19
Posts: 27
|
Perhaps I should mention that I moved a copy of Kix32.exe to the logon share where the logon script resides. Is this not correct? Do I have to install Kix32.exe on each PC first?
|
|
Top
|
|
|
|
#150580 - 2005-10-25 08:07 PM
Re: Kixtart problem? Or just me [again]?
|
tsmith
Fresh Scripter
Registered: 2005-10-19
Posts: 27
|
Good idea, thanks. Here's the results:
------------------------------------------ kix32 InventoryTXT
echo 0 ------------------------------------------ kix32 InventoryTXT.kix
echo 0 ------------------------------------------ call kix32 InventoryTXT
echo 0 ------------------------------------------ kix32 call InventoryTXT
ERROR : failed to find/open script [call]!
echo 1 ------------------------------------------
Still isn't executing. 
Anyone know of some docs where the logon script setup is explained in detail? I don't know what else I can do.
Thanks,
Tom
|
|
Top
|
|
|
|
#150581 - 2005-10-25 08:34 PM
Re: Kixtart problem? Or just me [again]?
|
tsmith
Fresh Scripter
Registered: 2005-10-19
Posts: 27
|
Well.... I have good news, and I have bad news. Which to tell first... 
I played with it some more, just to see. And I got it to work. (Obviously the 'good' news.) But I had to disable part of my script to do so. Let me explain.
From the beginning, I wanted to be able to turn it on and off easily, without messy msgs which would make the users call us. So I did this:
Code:
; ; if we've already done this machine for this month, skip it ; If Not Exist ("C:\InventoryDone_@YEAR@MONTHNO.txt") ; ; if we want to do it at all ; If Exist ("InventoryON.txt") ; ; if we want to look for .mpeg files ; If Exist ("InventoryFILES.txt") chk drive "C:" for .mp? files EndIF EndIF EndIF
When I commented out the first IF, and its ENDIF, it still didn't work. When I commented out the second IF and its ENDIF, it did work. (Although the check for .mpeg files still didn't work.)
These IFs work when run interactively. But it would seem that Windows doesn't like it at logon time.
Anyone have any ideas that would accomplish the same thing? And *work*? 
Thanks,
Tom
|
|
Top
|
|
|
|
#150582 - 2005-10-25 08:44 PM
Re: Kixtart problem? Or just me [again]?
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
when you run the script interactively your default directory may be different from when you execute the script as a logon script.
Please use fully qualified file names for "If exist" checks.
|
|
Top
|
|
|
|
#150583 - 2005-10-25 11:08 PM
Re: Kixtart problem? Or just me [again]?
|
tsmith
Fresh Scripter
Registered: 2005-10-19
Posts: 27
|
Well...I *thought* I had read where Kixtart would use the default directory, which I *thought* was NETLOGON, as one is logging on.
I made the change you suggested. And it works. That's the *good* news. (Thanks! )
No, no *bad* news. Exactly. But I do wonder...
My logged data goes to a share I map, temporarily, just to grab the data. So I can't put my "switch" files there, as the share isn't available until I map it, and I don't want to map it if I'm not going to run the script.
So I used the domain controller, the NETLOGON share. But I only test for my switch files on *ONE* controller. And isn't the idea of multiple controllers to share the load, not just be a spare in case one barfs? So what happens when the controller I've coded in my script is too busy to authenticate me? And I get pushed off on to the other? Does my script hang until the controller it's looking at gets to me?
I don't know the answers. I'm just asking. Perhaps I need to find a better location to place my switch files. Somewhere that's always available. (Well, unless the server barfs, that is.)
Tom
|
|
Top
|
|
|
|
#150584 - 2005-10-26 01:39 AM
Re: Kixtart problem? Or just me [again]?
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
First, I would never map a drive as you described. Instead, use a fully qualified UNC (\\server\share\directory\file) to reference a remote file.
The NETLOGON share is readonly to all users except domain admins so the netlogon share is not a good location for your user specific data files.
You have not provided any information that describes your network/doman architecture or the size of your network. Nowhere do I see a complete description of the process(es) you want to put in place, the business problem you are attempting to solve, and the final goal of the project. All of these factors will potentially alter the suggested solution.
|
|
Top
|
|
|
|
#150585 - 2005-10-26 03:18 PM
Re: Kixtart problem? Or just me [again]?
|
tsmith
Fresh Scripter
Registered: 2005-10-19
Posts: 27
|
Ahh...just to make sure you didn't misunderstand here, I wasn't saying that I'm trying to write my data log files to the NETLOGON share. I only placed my "switch" files there, because I thought they'd be easily found. I have another share, on another server, to which anyone has access (farther down the tree), which I map just long enough to log my data. Map it, log it, disconnect it.
Tom
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 1607 anonymous users online.
|
|
|