Page 1 of 1 1
Topic Options
#68330 - 2002-07-15 09:48 AM Roaming users profile
gregb Offline
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 Offline
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 Offline
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
#68333 - 2002-07-15 03:10 PM Re: Roaming users profile
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
See also extensive documentation to this problem in the FAQ section: Sequence of events during logon
_________________________
There are two types of vessels, submarines and targets.

Top
#68334 - 2002-07-17 06:45 AM Re: Roaming users profile
gregb Offline
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 Offline
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 Offline
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 Offline
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 Offline
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
#68339 - 2002-07-19 05:56 PM Re: Roaming users profile
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
For Windows 9x
code:
start /W %0\..\wkix32.exe %0\..\script1.KIX

For Windows NT/2000/XP
code:
start /W wkix32.exe script1.KIX

Also, in order to write to HKEY_LOCAL_MACHINE, one needs local administrative provileges on Windows 2000/XP.

[ 19 July 2002, 17:59: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#68340 - 2002-07-21 12:24 AM Re: Roaming users profile
ash wilson (kyosei) Offline
Getting the hang of it

Registered: 2002-04-22
Posts: 58
Loc: auckland new zealand
About 5 years ago I stopped using roaming profiles (wintendo pcs) when I discovered a strange fault.

If the user logs in on multiple workstations it seems it is possible to corrupt their profile.

If shows as a problem when they logout and then try to log in again, they cannot type anything into any of the login box panels.

Other than crowbarring the pc the only way I found around it was to use the mouse to cancel out of login then start regedit, open any key then close it again, exit regedit and logoff.

Login box then behaved normally.

Getting them to log out of all current pcs and deleting their profile also worked, I think.

I never bothered to try roaming profiles again but perhaps someone has further information on this.

rgds ash
_________________________
KYOSEI. There are only three groups of people that can count. Those that can, and those that can't.

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 290 anonymous users online.
Newest Members
Praveer, Ollero, rayyo, Foxlicht, DonChild
17742 Registered Users

Generated in 0.052 seconds in which 0.029 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