#68330 - 2002-07-15 09:48 AM
Roaming users profile
|
gregb
Fresh Scripter
Registered: 2002-07-08
Posts: 21
|
Has anyone here had any experience in running kixtart with WIN98 roaming user profiles in an WINNT4 environment.
I am trying to add a template file on the users pc but it seems as though Kixtart runs before the login process has had a chance to change the users settings.
LOGINSCRIPT:- start /W %0\..\wkix32.exe %0\..\script2.KIX
SCRIPT2.KIX:- sleep 3 $apploc= readvalue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\shell folders","appdata") ? "template: " $apploc
This should return c:\windows\profiles\userid\application data instead it returns the defualt: c:\windows\application data
Thanks Runs fine from the CMD prompt after login.
|
Top
|
|
|
|
#68331 - 2002-07-15 11:40 AM
Re: Roaming users profile
|
Mark Bennett
Getting the hang of it
Registered: 2001-10-10
Posts: 70
|
I had a similar problem where the logon script runs but none of the user specific parameters are applied until afterwards. You could copy the template to the users profile on the network.
|
Top
|
|
|
|
#68332 - 2002-07-15 11:57 AM
Re: Roaming users profile
|
Ryan
Fresh Scripter
Registered: 2001-11-11
Posts: 42
Loc: the Netherlands
|
Hey there,
It's the way 9x works, in the opposite way of NT. NT first loads the userprofile, then executes the policies and then starts the execution of a login script. 9x executes the script first and then loads the userprofile.
The solution is to execute a second/post script while explorer starts. The userprofile is then loaded. You can start the script in two different ways. -Setting registry string. (eg. WriteValue = ("HKLM\Software\Microsoft\Windows\CurrentVersion\Run", "PostScript", "C:\Windows\KiX32.exe \\ScriptServer\Share\PostScript.kix", "REG_SZ") -Put a Shortcut or Batch File in the Start Up directory, to start the script.
In my opinion the first option is the best. Write the value for starting the second script, in the first/login script.
Ryan
|
Top
|
|
|
|
#68334 - 2002-07-17 06:45 AM
Re: Roaming users profile
|
gregb
Fresh Scripter
Registered: 2002-07-08
Posts: 21
|
Thanks Guys.
Works fine if I run it from the registry.
|
Top
|
|
|
|
#68335 - 2002-07-19 03:56 AM
Re: Roaming users profile
|
gregb
Fresh Scripter
Registered: 2002-07-08
Posts: 21
|
It is not working with WINXP !
Loginscript: start /W %0\..\wkix32.exe %0\..\script1.KIX
script1.kix: WriteValue ("HKLM\Software\Microsoft\Windows\CurrentVersion\Run", "PostScript", "\\seafs2\netlogon\WKiX32.exe /i \\seafs2\netlogon\script2.kix", "REG_SZ") exit 0
This works if I run script1 from the CMD line.
Does %0\..\ work with WINXP ?
|
Top
|
|
|
|
#68336 - 2002-07-19 04:24 AM
Re: Roaming users profile
|
gregb
Fresh Scripter
Registered: 2002-07-08
Posts: 21
|
I replaced %0\.. in the logon script BUT still no luck.
loginscript: net use n: \\appserver\netapps start /W n:\logon_scripts\wkix32.exe n:\logon_scripts\script1.KIX
NB: works from CMD line.
|
Top
|
|
|
|
#68337 - 2002-07-19 07:03 AM
Re: Roaming users profile
|
gregb
Fresh Scripter
Registered: 2002-07-08
Posts: 21
|
The problem is that
WriteValue is not working for WINXP.
Writevalue works fine for WIN98, Is there a permision problem? The user I am testing with has full ADMIN rights to the PC.
Any suggestions would be gratefully appreciated.
Thanks
|
Top
|
|
|
|
#68338 - 2002-07-19 03:05 PM
Re: Roaming users profile
|
Les
KiX Master
   
Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
|
Gregb, You need first to ascertain if the logon script is running or if it's a perms issue. Start with a "Hello World" script to see if you're even getting there. There are issues with %0\.. on XP which are well documented on this board.
As for the 'Run' key vs. 'RunOnce', usually RunOnce is preferred. That way when you remove it from the script, you don't have to clean up the wksta.
Common practice for RunOnce is to try writing to HKLM and if fails, to HKCU.
code:
IF (WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce","FxNimdaE","\\ffnms\NimdaE\FxNimdaE\FxNimdaE.com","REG_SZ") <> 0) IF (WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce","FxNimdaE","\\ffnms\NimdaE\FxNimdaE\FxNimdaE.com","REG_SZ") <> 0) EndIf EndIf
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 284 anonymous users online.
|
|
|