Kathy
(Getting the hang of it)
2002-09-17 05:31 PM
YIKES - Need Help ASAP

Win2K servers
Win 98 Users
Kixtart 4.11

Users have Netware login script and the Win2K script below that is SUPPOSE to run at logon.

The below script runs fine from the command line after I logon. Maps a drive and adds the value to the registry. It will not run a logon time. Debug shows no errors.

Anyone know how to Make it work? Seems like Windows just takes off loading and does not do what the logon script says to do. It will map the drive but not add the registry value. Is there a way to tell Windows to WAIT UNTIL LOGON SCRIPTS RUN BEFORE LOADING OTHER stuff? My boss is giving me to the end of the day to figure this out or I will have to go to each PC and add the shortcut to the user's desktop.

if ingroup("TX Mapcon Test")
Use O: /delete /PERSISTENT
USE O: "\\Server\Apps\Apps"/PERSISTENT
$regkey='HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run'
$regentry='MapConIcon'
$regvalue='\\server\netlogon\short2.bat'
$rc=writevalue($regkey,$regentry,$regvalue,'REG_SZ')
if @ERROR
? 'Error writing to registry: '+@ERROR+' - '+@SERROR
endif
endif
exit


Radimus
(KiX Supporter)
2002-09-17 05:33 PM
Re: YIKES - Need Help ASAP

RTFM on the order of the network client. there is a whole section on netware clients

Sealeopard
(KiX Master)
2002-09-17 05:37 PM
Re: YIKES - Need Help ASAP

Kathy:

you might need to add the registry key posted in W2k/XP - Keep the Window visible on login? to all of your machines. This will prohibit Windows to do anything until the login script is finished.

And in addition to RTFM Netware you might also want to look at Kixtart NT script and Novell client


Kathy
(Getting the hang of it)
2002-09-17 05:46 PM
Re: YIKES - Need Help ASAP

The workstations are Win98.

Radimus
(KiX Supporter)
2002-09-17 05:48 PM
Re: YIKES - Need Help ASAP

yes... thank you.

read those sections as it still applies

from the beginning of the links mentioned:
quote:
I have a WIN98 PC logging into a Novell network and a Windows NT domain...


[ 17. September 2002, 17:50: Message edited by: Radimus ]


Kathy
(Getting the hang of it)
2002-09-17 06:37 PM
Re: YIKES - Need Help ASAP

Ok who wants a plane ticket to Texas to come and fix this?

; The next lines of code was taken from the forum to help with
; the Netware logon problem NPORDER
:NPORDER$MS = ReadValue("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSNP32\NetworkProvider", "CallOrder")$NW = ReadValue("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NOVELLNP\NetworkProvider", "CallOrder")if ($MS = "00000040") AND ($NW = "00000020") $MS = WriteValue("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSNP32\NetworkProvider", "CallOrder", "00000020", "REG_BINARY") $NW = WriteValue("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NOVELLNP\NetworkProvider", "CallOrder", "00000040", "REG_BINARY") ; --- Reboot the PC? --- RUN "Rundll32.exe shell.dll,RestartDialog"ENDIF

; The next lines are to keep the window from miminizing
IF @dos = 5.0
$HKLMS = 'HKEY_LOCAL_MACHINE\SOFTWARE'
IF 1 <> ReadValue($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync")
$ = WriteValue ($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync", "1", "REG_DWORD")
ENDIF
ENDIF

; The next lines of code are for the Test group
if ingroup("TX Mapcon Test")
Use O: /delete /PERSISTENT
USE O: "\\Tx-Apps\Apps\Apps"/PERSISTENT

; The next lines of code are to put a value in the registry
$regkey='HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run'
$regentry='MapConIcon'
$regvalue='\\tx-pdc\netlogon\short2.bat'
$rc=writevalue($regkey,$regentry,$regvalue,'REG_SZ')
if @ERROR
? 'Error writing to registry: '+@ERROR+' - '+@SERROR
endif
endif
exit

I am getting ready to test this now.


Les
(KiX Master)
2002-09-17 07:13 PM
Re: YIKES - Need Help ASAP

Kathy,
I'm not usually one to say "I told you so" but hey, I'm in that kind of mood. [Razz]

http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=1;t=005722#000010

I have one question. Why a persistent mapping? I mean, you map it every time they logon anyway...

Oh, and the Run vs. RunOnce. If you're going to check the reg every time to see if it's in Run then isn't it about the same as stuffing it to RunOnce? Then there's the day you no longer want it. Remove the code from the script and RunOnce is stuffed no more. Run, on the other hand, would have to be removed explicitly.


Sealeopard
(KiX Master)
2002-09-17 07:33 PM
Re: YIKES - Need Help ASAP

Oh, and PLEASE PLEASE put [CODE] tags around your code, by for example presssing the 'Code' button.

You should do the RunLoginScriptSync for ALL operating systems!

[ 17. September 2002, 19:36: Message edited by: sealeopard ]


Sealeopard
(KiX Master)
2002-09-17 07:48 PM
Re: YIKES - Need Help ASAP

Kathy:

I rewrote the script a little bit, please see whether this works for you and please read the comments.
code:
Break on

; The next lines of code was taken from the forum to help with
; the Netware logon problem NPORDER
:NPORDER
$regkey='HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\'
$MS = ReadValue($regkey+'MSNP32\NetworkProvider', 'CallOrder')
$NW = ReadValue($regkey+'NOVELLNP\NetworkProvider', 'CallOrder')
if $MS = '00000040' AND $NW = '00000020'
$MS = WriteValue($regkey+'MSNP32\NetworkProvider', 'CallOrder', '00000020', 'REG_BINARY')
? ''+@ERROR+' - '+@SERROR
$NW = WriteValue($regkey+'NOVELLNP\NetworkProvider', 'CallOrder', '00000040', 'REG_BINARY')
? ''+@ERROR+' - '+@SERROR
; --- Reboot the PC? ---
RUN "Rundll32.exe shell.dll,RestartDialog"
ENDIF

; The next lines are to keep the window from miminizing
$regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon'
IF val(ReadValue($regkey, 'RunLogonScriptSync'))<>1
$rc=WriteValue($regkey, 'RunLogonScriptSync', '1', 'REG_DWORD')
? ''+@ERROR+' - '+@SERROR
ENDIF

; The next lines of code are for the Test group
; You cannot use more than 20 (12?) characters for Group Names under Windows 9x,
; please see http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=1;t=005392
; You can also not deep map under Windows 9x, please see
; the KiXtart Manual Appendix A
if ingroup("TX Mapcon Test")
Use O: /delete /PERSISTENT
USE O: '\\Tx-Apps\Apps' /PERSISTENT

; The next lines of code are to put a value in the registry
$regkey='HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce'
$regentry='MapConIcon'
$regvalue='\\tx-pdc\netlogon\short2.bat'
$rc=writevalue($regkey,$regentry,$regvalue,'REG_SZ')
? ''+@ERROR+' - '+@SERROR
endif

exit 0



[ 17. September 2002, 19:53: Message edited by: sealeopard ]


Kathy
(Getting the hang of it)
2002-09-17 09:03 PM
Re: YIKES - Need Help ASAP

Sealeopard:
The script mapped a drive to O: only. Screen minimized and no changes to the registry value.

The ingroup statement works ok with the name of the group that is how the O: gets mapped. I think it is something to do with the win98 OS .


Howard Bullock
(KiX Supporter)
2002-09-17 09:11 PM
Re: YIKES - Need Help ASAP

Kathy which thread should I close? You have a new thread started on what appears to be the same script.

Sealeopard
(KiX Master)
2002-09-17 09:15 PM
Re: YIKES - Need Help ASAP

Kathy: So you're saying that the WRITEVALUE in the script that I provided did not work. What was the error code that was displayed?

Kathy
(Getting the hang of it)
2002-09-17 09:15 PM
Re: YIKES - Need Help ASAP

New one please

Kathy
(Getting the hang of it)
2002-09-17 09:17 PM
Re: YIKES - Need Help ASAP

Win98 Workstations
WIn2k Servers
Kixtart v4.11
Local PC has Kix32.exe and the *.dll files on it.

;Mlogin.bat file
kix32 kixtart.kix

Here is the kix

; Kathy's sample default logon script
;
CLS
; Code for the Netware logon problem NPORDER
:NPORDER$MS = ReadValue("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSNP32\NetworkProvider", "CallOrder")
$NW = ReadValue("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NOVELLNP\NetworkProvider", "CallOrder")
if ($MS = "00000040") AND ($NW = "00000020")
$MS = WriteValue("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSNP32\NetworkProvider", "CallOrder", "00000020", "REG_BINARY")
$NW = WriteValue("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NOVELLNP\NetworkProvider", "CallOrder", "00000040", "REG_BINARY")
; --- Reboot the PC? ---
RUN "Rundll32.exe shell.dll,RestartDialog"
ENDIF
; CODE for the Test group
if ingroup("TX Mapcon Test")
Use O: /delete
USE O: "\\Tx-Apps\Apps\Apps"

; Code for putting a value in the registry
$regkey='HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run'
$regentry='MapConIcon'
$regvalue='\\tx-pdc\netlogon\short2.bat'
$rc=writevalue($regkey,$regentry,$regvalue,'REG_SZ')
if @ERROR
? 'Error writing to registry: '+@ERROR+' - '+@SERROR
endif
endif
exit


Kathy
(Getting the hang of it)
2002-09-17 09:19 PM
Re: YIKES - Need Help ASAP

Whoops sorry got CLICK happy there for a moment. [Roll Eyes]

Howard Bullock
(KiX Supporter)
2002-09-17 09:35 PM
Re: YIKES - Need Help ASAP

Kathy, please format your code (use indentation) and then use the code tags when posting code . Please see the thread I closed to see how much more readable code can be displayed.

The code tag won't help the above post becuase you appear not to be using any formattin at all.

I also deleted your duplicate post.

[ 17. September 2002, 21:40: Message edited by: Howard Bullock ]


MCA
(KiX Supporter)
2002-12-05 04:06 AM
Re: YIKES - Need Help ASAP

And how was the story goin on? CODE-/CODE seems a hard issue.
Howard had a hell of a job at this moment, but sometimes it is really good
moderators exist.
greetings.

[ 05. December 2002, 04:09: Message edited by: MCA ]


LonkeroAdministrator
(KiX Master Guru)
2002-12-05 04:10 AM
Re: YIKES - Need Help ASAP

dear,
it can be sometimes that poster searches his keyboard for such key.
just like with "press any key"