Page 1 of 1 1
Topic Options
#29181 - 02/09/17 05:31 PM YIKES - Need Help ASAP
Kathy Offline
Getting the hang of it

Registered: 02/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 - 02/09/17 05:33 PM Re: YIKES - Need Help ASAP
Radimus Moderator Offline
Moderator
*****

Registered: 00/01/06
Posts: 5186
Loc: Tampa, FL
RTFM on the order of the network client. there is a whole section on netware clients
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#29183 - 02/09/17 05:37 PM Re: YIKES - Need Help ASAP
Sealeopard Offline
KiX Master
*****

Registered: 01/04/25
Posts: 11161
Loc: Boston, MA, USA
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
_________________________
There are two types of vessels, submarines and targets.

Top
#29184 - 02/09/17 05:46 PM Re: YIKES - Need Help ASAP
Kathy Offline
Getting the hang of it

Registered: 02/09/09
Posts: 96
Loc: Marshall, TX
The workstations are Win98.
_________________________
Stupid is forever - Ignorance can be fixed.

Top
#29185 - 02/09/17 05:48 PM Re: YIKES - Need Help ASAP
Radimus Moderator Offline
Moderator
*****

Registered: 00/01/06
Posts: 5186
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 ]
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#29186 - 02/09/17 06:37 PM Re: YIKES - Need Help ASAP
Kathy Offline
Getting the hang of it

Registered: 02/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
#29187 - 02/09/17 07:13 PM Re: YIKES - Need Help ASAP
Les Offline
KiX Master
*****

Registered: 01/06/11
Posts: 12734
Loc: fortfrances.on.ca
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.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#29188 - 02/09/17 07:33 PM Re: YIKES - Need Help ASAP
Sealeopard Offline
KiX Master
*****

Registered: 01/04/25
Posts: 11161
Loc: Boston, MA, USA
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 ]
_________________________
There are two types of vessels, submarines and targets.

Top
#29189 - 02/09/17 07:48 PM Re: YIKES - Need Help ASAP
Sealeopard Offline
KiX Master
*****

Registered: 01/04/25
Posts: 11161
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 - 02/09/17 09:03 PM Re: YIKES - Need Help ASAP
Kathy Offline
Getting the hang of it

Registered: 02/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 - 02/09/17 09:11 PM Re: YIKES - Need Help ASAP
Howard Bullock Offline
KiX Supporter
*****

Registered: 00/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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#29192 - 02/09/17 09:15 PM Re: YIKES - Need Help ASAP
Sealeopard Offline
KiX Master
*****

Registered: 01/04/25
Posts: 11161
Loc: Boston, MA, USA
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?
_________________________
There are two types of vessels, submarines and targets.

Top
#29193 - 02/09/17 09:15 PM Re: YIKES - Need Help ASAP
Kathy Offline
Getting the hang of it

Registered: 02/09/09
Posts: 96
Loc: Marshall, TX
New one please
_________________________
Stupid is forever - Ignorance can be fixed.

Top
#29194 - 02/09/17 09:17 PM Re: YIKES - Need Help ASAP
Kathy Offline
Getting the hang of it

Registered: 02/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
#29195 - 02/09/17 09:19 PM Re: YIKES - Need Help ASAP
Kathy Offline
Getting the hang of it

Registered: 02/09/09
Posts: 96
Loc: Marshall, TX
Whoops sorry got CLICK happy there for a moment. [Roll Eyes]
_________________________
Stupid is forever - Ignorance can be fixed.

Top
#29196 - 02/09/17 09:35 PM Re: YIKES - Need Help ASAP
Howard Bullock Offline
KiX Supporter
*****

Registered: 00/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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#29197 - 02/12/05 04:06 AM Re: YIKES - Need Help ASAP
MCA Offline
KiX Supporter
*****

Registered: 00/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 ]
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#29198 - 02/12/05 04:10 AM Re: YIKES - Need Help ASAP
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 01/06/05
Posts: 22294
Loc: Claremore, OK
dear,
it can be sometimes that poster searches his keyboard for such key.
just like with "press any key"
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Chris S., Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Shawn) and 90 anonymous users online.
Newest Members
B1GHawkeyes, GeoHamm, register, Marcus_Dunne, stuvwx656262
17397 Registered Users

Generated in 0.239 seconds in which 0.137 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