Page 1 of 1 1
Topic Options
#161831 - 2006-05-12 12:09 AM Continuation of "Where is @LDRive
Shaba1 Offline
Fresh Scripter

Registered: 2005-08-20
Posts: 44
Original post
kixtart.org Forum post @LDRIVE
Here is the code that I have played with since I posted that thread. It stil does not work and does even more strange things.

Code:

CLS
FLUSHKB
BREAK OFF

;
; This is the Windows 9x logon script
;
; In here should go Windows 9x specific registry mods
;

; ------------------------------------------------------
; Require Validated logins
; ------------------------------------------------------

?
?
?

? " Requiring Network validation" +@CRLF
$junk = WriteValue( "HKEY_LOCAL_MACHINE\Network\Logon", "MustBeValidated", "1", "REG_DWORD")

; ------------------------------------------------------
; Disable Password Caching
; ------------------------------------------------------
? " Disabling Password Caching" +@CRLF
$junk = WriteValue( "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Network" , "DisablePwdCaching" , "1" , "REG_DWORD" )

; ------------------------------------------------------
; Blank out last user name (Doesn't work with OEM versions of Win95)
; ------------------------------------------------------
? " Fixing Last Logon Name" +@CRLF
$junk = WriteValue( "HKEY_LOCAL_MACHINE\Network\Logon", "DontShowLastUser", "1", "REG_DWORD")
;




IF NOT EXIST("C:\Program Files\Grisoft\AVG\")
? @ERROR
? @SERROR
? @CRLF


MD "C:\Program Files\Grisoft\AVG7\"

? @ERROR
? @SERROR
? @CRLF

$Logondrive = @LDRIVE +@CRLF

? $Logondrive +@CRLF

COPY @LDRIVE + "\upgrade files\AVGAGENT.EXE" "C:\Program Files\Grisoft\AVG7\"

?@ERROR + @SERROR + @CRLF



COPY "0%\..\upgrade files\AVGAGENT.ini" "C:\Program Files\Grisoft\AVG7\"

?@ERROR @SERROR @CRLF



COPY "0%\..\upgrade files\AVGAGENT.lng" "C:\Program Files\Grisoft\AVG7\"

? @ERROR @SERROR @CRLF



SHELL "C:\Program Files\Grissoft\AVG7\avgagent.exe /install /start"

? @ERROR @SERROR @CRLF




I am intially trying to get the avg network resident portion install on all my windows 98 machines. But this will be expanded to install the JRE and other software on all machines. Of course Will not have the registery setting for window98 in the files that I use for win2000 and win2k machines. So ingore those. but the code after that is what is giving me problems.

Here is a link to a screenshot I took of the DOS window when I tried to use kixtart's debug feature to find out what was wrong.



Just to let you know that the files do exist here is the upgrade file folder on the netlogon directory



I am stumped as to what is going wrong. If I cannot get something this simple to copy to the local drive and install I do not want to even try something like JAVA,Blender or 7Zip

Thanks in advance.

Top
#161832 - 2006-05-12 12:18 AM Re: Continuation of "Where is @LDRive
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Well if this is the full code you're missing an ENDIF

Not sure about any other possible issues will look more later if someone else hasn't helped you by the time I get back to it.

Top
#161833 - 2006-05-12 12:22 AM Re: Continuation of "Where is @LDRive
Shaba1 Offline
Fresh Scripter

Registered: 2005-08-20
Posts: 44
I must have missed the ENDIF. I just but it in and STILL get the same errors.
Top
#161834 - 2006-05-12 12:28 AM Re: Continuation of "Where is @LDRive
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Is this running from a Windows 9x logon?

If so, my guess is that the @LDrive does not exist properly for the Windows 9x system.

Can you run this please and tell me what it says.



Code:

@KIX ?
@DOS ?
@LDrive ?
'press a key to continue...' ?
Get $pause


 

Top
#161835 - 2006-05-12 01:14 AM Re: Continuation of "Where is @LDRive
Shaba1 Offline
Fresh Scripter

Registered: 2005-08-20
Posts: 44
NTDOC.

I ran if from a logon 98 machine. Not in the logon script though I an if you need me to.
here is the response I got. I saved it as test.kix

-------------------------------------------------------------------------------
C:\WINDOWS\Desktop>kix32.exe test.kix
4.51
4.10

press a key to continue...

C:\WINDOWS\Desktop>type test.kix
@KIX ?
@DOS ?
@LDrive ?
'press a key to continue...' ?
Get $pause
-----------------------------------------------------------------------------

Top
#161836 - 2006-05-12 01:20 AM Re: Continuation of "Where is @LDRive
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Yes please run it from the LOGON script.

I'm guessing that the @LDrive doens't work or doesn't work well enough on Windows 9x or something else.

Are you sure you have the KiXtart DLL files there on the NETLOGON share as well?

Show me the results from the LOGON script, you can create a test script with just that above.

Top
#161837 - 2006-05-12 02:40 AM Re: Continuation of "Where is @LDRive
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Here, give this code a try.

Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')
;
; This is the Windows 9x logon script
; In here should go Windows 9x specific registry mods
; ------------------------------------------------------
; Require Validated logins
; ------------------------------------------------------
Dim $Junk, $Logondrive, $Msg
'Requiring Network validation' ?
$Junk = WriteValue('HKLM\Network\Logon','MustBeValidated',1,REG_DWORD)
; ------------------------------------------------------
; Disable Password Caching
; ------------------------------------------------------
'Disabling Password Caching' ?
$Junk = WriteValue('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Network','DisablePwdCaching',1,REG_DWORD)
; ------------------------------------------------------
; Blank out last user name (Doesn't work with OEM versions of Win95)
; ------------------------------------------------------
'Fixing Last Logon Name' ?
$Junk = WriteValue('HKLM\Network\Logon','DontShowLastUser',1,REG_DWORD)
If GetFileAttr('"C:\Program Files\Grisoft\AVG') & 16
;Folder arleady exists
Else
MD 'C:\Program Files\Grisoft\AVG7\'
EndIf
$Logondrive = @LDRIVE
If $Logondrive = ""
$Msg = MessageBox('The logon drive was not found, can not update AVG.'+@CRLF,'Drive Mapping Error',4112)
Exit 10
Else
COPY @LDRIVE + '\upgrade files\AVGAGENT.EXE' 'C:\Program Files\Grisoft\AVG7\'
'File Copy: ' + @ERROR + ' - ' + @SERROR ?

;COPY "0%\..\upgrade files\AVGAGENT.ini" "C:\Program Files\Grisoft\AVG7\"
;COPY "0%\..\upgrade files\AVGAGENT.lng" "C:\Program Files\Grisoft\AVG7\"
;These are not valid copy commands for KiXtart, this is batch.

SHELL 'C:\Program Files\Grissoft\AVG7\avgagent.exe /install /start'
'Installation : ' + @ERROR + ' - ' + @SERROR ?

;Note these files will copy every time the user logs on.
;You need to add code to not do this update every logon
EndIf


Top
#161838 - 2006-05-13 01:27 AM Re: Continuation of "Where is @LDRive
Shaba1 Offline
Fresh Scripter

Registered: 2005-08-20
Posts: 44
Ok NTDOC Thanks very much for you help. I tired the script you suggested above in my Win9x.kix portion of the long scripting casacade. There ended up being a white error message that flashed on screen to quickly for me to see it. Then the desktop appeared normally. No Dialog box.

Strangely when I compied this script to the win98 desktop and ran it from the command box the dialog box did pop up.

I am stumped. I thought I understood kix until now.

This script is key to my whole network change over. Right now I have 8 users(All admin staff using windowsXP or Windows200o) that do not have to log into our 1 Domain Controller Domain to get to the internet. I they are causeing me no end of problems with all the spyware and addware and viruses they download.
The 20 98 machines are in the classroom and already require logon to the DC in order to use the machines as you can see by the registry settings. I though tI would try out my scripting changes on these machies first.

Eventually I want to have automatic spyware scan,AVG virus scans and updates,banish games and cutesy background and cursor, and implement software restriction policies. But the first step is to be able to copy the things onto their hard drive and clean it. Thus AVG,CCleaner,7zip,kixforms.dll and ADawarepro.

Once things are cleaned then I will shift them over to the domain where they HAVE to log in to get to use thier computers.

Any suggestion?


Edited by Shaba1 (2006-05-13 01:29 AM)

Top
#161839 - 2006-05-13 02:37 AM Re: Continuation of "Where is @LDRive
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Did anyone ever tell you that Wintendos are crap? The network redirector is so bad that it cannot reliably handle UNC. That is why MS secretly maps the Z: drive during logon.

Wintendos just have no place on a corporate network. The sooner you stop supporting them, the sooner they go away.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#161840 - 2006-05-13 02:38 AM Re: Continuation of "Where is @LDRive
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Well the issue becomes making sure KiXtart is working correctly which it sounds like it's not.

Please review the FAQ and the Manual to make sure you understand and install the KiXtart RPC service for Windows 9x clients

Starting at PAGE 117 in the manual that ships with KiXtart you'll find further information about the KXRPC service and how to install it. I'd recommend installing it on the Domain Controller.

FYI - You need the KiXtart 4.51 to get the DLL files and Manual but I'd go ahead and use the KiXtart 4.52 beta 2 for the KIX32.EXE and WKIX32.EXE files. The DLL files from 4.51 are the latest and will work correctly with the 4.52 beta 2.
KiXtart 4.51 download
KiXtart 4.52 beta 2 download

 
Now, once you have KiXtart 4.52 beta 2 installed properly and running we can move on to further script testing.

As for controlling the Windows 9x clients that is going to be a bit difficult as they don't really understand "security" and don't get GPO policies, etc...
You would need to script your own stuff for them and they must be launched from a batch file unlike NT/2K/XP that only need KIX32.EXE or WKIX32.EXE and don't require a batch to launch.

If you have a little bit of money though there is a pretty good product for controlling the Windows 9x systems and newer.

Fortres 101
Proven Desktop Security Software
http://www.fortresgrand.com/products/f101/f101.htm

Supports Windows 98/Me and Windows 2000/XP

Not sure about 95 as they don't list it.

Educational Pricing
http://www.fortresgrand.com/products/f101/f101_pricing_ed.htm

************************************

I would start with making double sure you have KiXtart fully installed for supporting Windows 9x clients and that you're launching the batch file correctly.

Once you think you're there let me know and we can continue with further testing and setup.


Edited by NTDOC (2006-05-13 03:00 AM)

Top
#161841 - 2006-05-13 02:43 AM Re: Continuation of "Where is @LDRive
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
In order to fully control access to the Internet you will need either a freeware type proxy from Linux area, or the Microsoft ISA Server.

There is some limited support in some of the home units of the Routers but typically not enough to properly manage multiple users. As far as that goes just about any home unit router is not really satisfactory for handling multiple users on the Internet access.

Not sure what you have going there, but for that many people you probably need something a little better than a Linksys home router.

It may work, but not as well as one designed to handle say up to about 50 users and still be reasonably priced.

Top
#161842 - 2006-05-13 03:04 AM Re: Continuation of "Where is @LDRive
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
You can get Squid Proxy that has been ported to windows, and then use a GPO to force the users to use the proxy. It is extremely easy to do the basic setup (3 entries in the config file). But it can do much much more.

http://www.squid-cache.org
_________________________
Today is the tomorrow you worried about yesterday.

Top
#161843 - 2006-05-13 03:23 AM Re: Continuation of "Where is @LDRive
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Quote:

and then use a GPO to force the users to use the proxy




Not for the Windows 9x stations, you can't use GPO on a Windows NT/9X client as they don't understand it.
Now you "might" be able to finagle some type of NT4 type policy against them, but that would really be stretching it.
 

Top
#161844 - 2006-05-13 04:29 AM Re: Continuation of "Where is @LDRive
Shaba1 Offline
Fresh Scripter

Registered: 2005-08-20
Posts: 44
Quote:

Did anyone ever tell you that Wintendos are crap? The network redirector is so bad that it cannot reliably handle UNC. That is why MS secretly maps the Z: drive during logon.

Wintendos just have no place on a corporate network. The sooner you stop supporting them, the sooner they go away.



You know what Les I have seen you reply many time to many serious question with that sarcastic and derisive "Wintendoes" remark. Why don't you take a bit of advise I was given long ago. "If you cannot say anything good say nothing at all"

Top
#161845 - 2006-05-13 04:35 AM Re: Continuation of "Where is @LDRive
Shaba1 Offline
Fresh Scripter

Registered: 2005-08-20
Posts: 44
I already have a proxy and firewall set up. That is how those 8 win2k and winxp pro machines get access to the internet.But they are not part of the domain YET.


I debated weather to give a full description of what I ultimately am trying to do, becasue I thought somone would pick up on some of those items and go far afield on those topics. In anycase yes I know that windows 98 machines cannot implement group policies. I know that windows 98 machines cannot be part of the AD. Yes I do.

That is not the point I am testing this logon script on the 98 machines becasue it is convient to do so. I have a kix script that load before the one I put here that determines what the OS of the machine is and then picks which script to run. As I said I just put the win9x script here becasue it was convient to do so since I have full PHYSICAL access to those machines all the time. The win2k and winxp pro machines I would have to stop somone from doing thier daily work if I wanted to test and debug these scripts.


Edited by Shaba1 (2006-05-13 04:39 AM)

Top
#161846 - 2006-05-13 05:44 AM Re: Continuation of "Where is @LDRive
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Well let me know if/when you think KiXtart is setup for Windows 9x clients.

As an FYI you can get a free copy of VMware or Microsoft Virtual Server that would allow you to do tesing without any potential of damaging your own system.

There is no need to run different scripts for different OS as you can branch and condition check all within the same script.

Top
#161847 - 2006-05-13 05:51 AM Re: Continuation of "Where is @LDRive
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Quote:

I already have a proxy and firewall set up.




Well not trying to tell you what to do but unless I misread you, you didn't sound to happy with when/how/what those Windows 2000/XP machines were accessing the Internet.

With a full blown proxy application you can set all of those things and when/where/how they can connect.

As for not telling the whole picture, not sure but often that leads us to run around in circles as we don't see the whole picture. Speaking for myself I'm just trying to assist you in achieving the best solution possible given that I'm sure as with most Companies that money is tight if any at all. Unless you say or mention something that is just plain way off track, wrong, or illegal then I'm not here to tell you not to do it, but maybe I'll put in my two cents worth of opinion if I think something else is better which you can take it or leave it.

For now I'm mainly concerned that I don't think you have KiXtart setup correctly for Windows 9x as there is no reason that the MessageBox shouldn't show up for them.

If it's not an installation issue then maybe it's something to do with the larger script. For testing can you remove it from the bigger script and just run the portion I gave you as a stand alone script during logon.

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 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.072 seconds in which 0.029 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