|
|
|||||||
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 |
||||||||
|
|
|||||||
RTFM on the order of the network client. there is a whole section on netware clients |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
The workstations are Win98. |
||||||||
|
|
|||||||
yes... thank you. read those sections as it still applies from the beginning of the links mentioned: quote: [ 17. September 2002, 17:50: Message edited by: Radimus ] |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
Kathy, I'm not usually one to say "I told you so" but hey, I'm in that kind of mood. 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. |
||||||||
|
|
|||||||
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 ] |
||||||||
|
|
|||||||
Kathy: I rewrote the script a little bit, please see whether this works for you and please read the comments. code:Break on [ 17. September 2002, 19:53: Message edited by: sealeopard ] |
||||||||
|
|
|||||||
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 . |
||||||||
|
|
|||||||
Kathy which thread should I close? You have a new thread started on what appears to be the same script. |
||||||||
|
|
|||||||
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? |
||||||||
|
|
|||||||
New one please |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
Whoops sorry got CLICK happy there for a moment. |
||||||||
|
|
|||||||
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 ] |
||||||||
|
|
|||||||
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 ] |
||||||||
|
|
|||||||
dear, it can be sometimes that poster searches his keyboard for such key. just like with "press any key" |