#29181 - 2002-09-17 05:31 PM
YIKES - Need Help ASAP
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
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
_________________________
Stupid is forever - Ignorance can be fixed.
|
Top
|
|
|
|
#29182 - 2002-09-17 05:33 PM
Re: YIKES - Need Help ASAP
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
RTFM on the order of the network client. there is a whole section on netware clients
|
Top
|
|
|
|
#29184 - 2002-09-17 05:46 PM
Re: YIKES - Need Help ASAP
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
The workstations are Win98.
_________________________
Stupid is forever - Ignorance can be fixed.
|
Top
|
|
|
|
#29185 - 2002-09-17 05:48 PM
Re: YIKES - Need Help ASAP
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
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 ]
|
Top
|
|
|
|
#29186 - 2002-09-17 06:37 PM
Re: YIKES - Need Help ASAP
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
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.
_________________________
Stupid is forever - Ignorance can be fixed.
|
Top
|
|
|
|
#29189 - 2002-09-17 07:48 PM
Re: YIKES - Need Help ASAP
|
Sealeopard
KiX Master
Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
|
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 ]
_________________________
There are two types of vessels, submarines and targets.
|
Top
|
|
|
|
#29190 - 2002-09-17 09:03 PM
Re: YIKES - Need Help ASAP
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
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 .
_________________________
Stupid is forever - Ignorance can be fixed.
|
Top
|
|
|
|
#29191 - 2002-09-17 09:11 PM
Re: YIKES - Need Help ASAP
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Kathy which thread should I close? You have a new thread started on what appears to be the same script.
|
Top
|
|
|
|
#29193 - 2002-09-17 09:15 PM
Re: YIKES - Need Help ASAP
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
New one please
_________________________
Stupid is forever - Ignorance can be fixed.
|
Top
|
|
|
|
#29194 - 2002-09-17 09:17 PM
Re: YIKES - Need Help ASAP
|
Kathy
Getting the hang of it
Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
|
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
_________________________
Stupid is forever - Ignorance can be fixed.
|
Top
|
|
|
|
#29196 - 2002-09-17 09:35 PM
Re: YIKES - Need Help ASAP
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
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 ]
|
Top
|
|
|
|
#29197 - 2002-12-05 04:06 AM
Re: YIKES - Need Help ASAP
|
MCA
KiX Supporter
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
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 ]
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 507 anonymous users online.
|
|
|