Page 1 of 1 1
Topic Options
#210348 - 2015-06-15 08:21 AM Help with logon script. AD profile path
Xofah Offline
Just in Town

Registered: 2015-06-15
Posts: 3
Loc: Denmark, Fyn
Hello fellow Kix scripters!
My boss has given me a task which I find hard to solve with my knowledge.. hence is why I am here

What I need is:
When a user logs into Windows, whether it's on Windows XP or 7 the script need to determine which OS it logs into first.

If its Windows XP it needs to be directed to a profile path on one of our servers where the home/desktop folder is located.(We have created 2 folders for this purpose; one for each OS) In our AD,(at the user profile settings, Profile Path) we have disabled the profile path because we want to use it in the login script. Is this even remotely possible?

Our current login script is the following:
if "%OS%" == "Windows_NT" goto WINNT

REM Script for Windows 95 og 98 m.v.
:WIN9X
goto SLUT

REM Script for Windows NT
:WINNT
net use l: \\xena\pta /persistent:no
net use n: \\xena\sabusers /persistent:no
net use r: \\xena\caddata /persistent:no
net use t: \\10.10.30.21\huskvarna /user:sintermetal tangokat
net use u: \\storage\research /persistent:no
net use w: \\storage1\fj_funk /persistent:no

:SLUT
:LicenseWatch
rem \\w2kmangan\lwclient\lwinstall.bat
EXIT

Let me know if I am unclear about what I am asking for \:\)
Thanks in advance

Best regards
Andreas


Edited by Xofah (2015-06-15 11:00 AM)

Top
#210349 - 2015-06-15 09:29 AM Re: Help with logon script. AD profile path [Re: Xofah]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
 Code:
$ProductType=ReadValue('HKLM\Software\Microsoft\Windows NT\CurrentVersion','ProductName')

If Instr($ProductType,"Windows 7")
  ;Do Win 7 Stuff
EndIf

If Instr($ProductType,"Windows XP")
  ;Do Win XP Stuff
EndIf

Top
#210350 - 2015-06-15 10:11 AM Re: Help with logon script. AD profile path [Re: Arend_]
Xofah Offline
Just in Town

Registered: 2015-06-15
Posts: 3
Loc: Denmark, Fyn
Hey Arend_ ! Thanks for it!

The part "Do win 7 stuff" etc .. I guess that's where the AD profile settings should be, right? I got absolute no idea how to resolve this though.. How to locate the profile path ? In my AD at profile path this is what we're using: \\storage1\mandatory

For Windows 7 we will be using \\storage1\mandatory_Windows7
For WindowsXP we will be using \\storage1\mandatory_WindowsXP

Top
#210351 - 2015-06-15 10:22 AM Re: Help with logon script. AD profile path [Re: Xofah]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
I would not change this using Kix.
It would be better if you would set up your shares better.
Use one for both, this saves you a lot of hassle.
Since for Windows 7 it would create the following profile:
\\server\share\userprofile.V2
For Windows XP it would create the following profile:
\\server\share\userprofile
This way they do not interfere with eachother.
However to get this to work you need some additional tricks with NTFS and pre-creating the profile folders (and for that is a trick too) with the respective NTFS permissions.

Also keep this share separate from any Folder Redirection shares.
But this is more of a AD/NTFS thing then a KiX thing.

Top
#210352 - 2015-06-15 01:16 PM Re: Help with logon script. AD profile path [Re: Arend_]
Xofah Offline
Just in Town

Registered: 2015-06-15
Posts: 3
Loc: Denmark, Fyn
Thanks once again for your help. Really appreciate it.
As you suggested we are now looking at group policies instead of Kix. In any case, thank you for your time \:\)

*Thumbs up*

Top
#210353 - 2015-06-15 07:06 PM Re: Help with logon script. AD profile path [Re: Xofah]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
No need for GPO's, just Share permissions + AD.
Top
Page 1 of 1 1


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

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.059 seconds in which 0.028 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org