Page 1 of 1 1
Topic Options
#212633 - 2017-08-17 05:57 PM win 9x logon script for new user
madmax Offline
Just in Town

Registered: 2017-08-17
Posts: 2
Loc: UK
hey,

I have been experimenting with kixtart in a virtual domain environment on an NT 4.0 with 9x clients (95/98/me).
Kixtart version I am using is 2001.423

I have kixtart on the Netlogin folder alongside a bat that starts it which works. Having little to no coding experience I was looking to do something like below.

This can be done with a bat file but i feel a kixtart script would be better suited/cleaner to altering the registry?
The below is a simple .bat written without kixtart but also shows some error messages when ran like: file not found, folder already exists or cannot create directory.

Maybe someone has written something similar to what I want to do? If not I am hoping someone can help me write what I would like to achieve.

 Code:
del C:\Windows\Cookies\*.txt
echo SETTING USER ENVIRONMENT VARIBLES
\\NTSERVER\NETLOGON\logon\putinenv.exe L
\\Ntserver\NETLOGON\logon\Winset USERNAME=%USERNAME%
\\Ntserver\NETLOGON\logon\Winset COMPUTERNAME=%COMPUTERNAME%
\\Ntserver\NETLOGON\logon\Winset LOGONSERVER=%LOGONSERVER%
echo FINISHED SETTING USER ENVIRONMENT VARIBLES
rem DELETE THE WIN9X PROFILES SUBDIRECTORY
echo Clearing up old profiles...
DELTREE /y C:\WINDOWS\PROFILES
rem RECREATE PROFILES FOLDER
rem CHANGE TO THE WINDOWS DIRECTORY
CD\WINDOWS
rem DELETE ANY PREVIOUS COPIES OF THE PROFILES.REG FROM OTHER USERS
del profiles.reg
rem LINE WHICH IDENTIFIES PROFILES.REG AS A REGISTRY FILE
echo REGEDIT4 >> profiles.reg
rem KEY WHICH APPENDS THE USER TO THE PROFILE LIST
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProfileList\%username%] >> profiles.reg
rem SAVE LOCATION OF THE USER'S LOCAL PROFILE TO REGISTRY KEY
echo "ProfileImagePath"="C:\\WINDOWS\\PROFILES\\%username%">> profiles.reg
rem RESTRICT SAVING PROFILE TO LOCAL ONLY
echo [HKEY_LOCAL_MACHINE\Network\Login] >> profiles.reg
echo "UseHomeDirectory"=dword:00000000 >> profiles.reg
rem STOPPING PROFILE ERRORS FROM DISPLAYING
echo [HKEY_USERS\.Default\Software\Microsft\Windows\CurrentVersion] >> profiles.reg
echo "DisplayProfileErrors"=dword:00000000 >> profiles.reg
rem CREATE LOCAL SUBDIRECTORY FOR THE USER'S PROFILE
MD C:\WINDOWS\PROFILES\%username%
rem MERGE THE REGISTRY FILE TO THE LOCAL REGISTRY
echo Setting user registry values
REGEDIT /S profiles.reg


Edited by madmax (2017-08-17 05:59 PM)

Top
#212634 - 2017-08-17 11:42 PM Re: win 9x logon script for new user [Re: madmax]
madmax Offline
Just in Town

Registered: 2017-08-17
Posts: 2
Loc: UK
Worked this out for myself, mostly \:\)
Top
#212642 - 2017-08-24 09:20 PM Re: win 9x logon script for new user [Re: madmax]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Wait - is it April First? Did you really say "NT4" and Win-9x??? or was this message stuck in a process queue for the past 18 years? \:D

Welcome to KORG - anyway - I think... ;\)

For this stuff - If Exist(filespec) and WriteValue() functions are your friends. Post if you need specifics.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

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
0 registered and 507 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.096 seconds in which 0.075 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