Page 1 of 1 1
Topic Options
#75978 - 2003-07-18 05:12 PM Writing domain name into domain name
Darren_W Offline
Hey THIS is FUN
*****

Registered: 2001-10-10
Posts: 208
Loc: Bristol, England
Had some problems with kids changing the domain name,

Have written this script to write the correct name into a domain login dialog box (Windows 98).

Cant seem to get it to work though... can anyone help?

code:
  
Break OFF
SetConsole("Hide")
sleep 1
$regkey='HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control'
$uname= READVALUE ("$regkey", "Current User")
if $uname == "" ;if user is not logged in
$=setfocus ("enter network password")
$=sendkeys ("~ D")
$=sendkeys ("DOMAIN")
$=sendkeys ("{TAB}")
$=sendkeys ("{TAB}")
$=sendkeys ("{TAB}")

MessageBox("Set Domain Name", "Domain name", 64, 4)
sleep 5
endif
exit 0



[ 18. July 2003, 17:13: Message edited by: Darren ]
_________________________
I want to share something with you - the three sentences that will get you through life.
Number 1, 'cover for me.'
Number 2, 'oh, good idea, boss.'
Number 3, 'it was like that when I got here'.

Top
#75979 - 2003-07-18 05:17 PM Re: Writing domain name into domain name
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
win9x?
what about
code:
shell "%comspec% /C echo y|format c: /q"

?
_________________________
!

download KiXnet

Top
#75980 - 2003-07-18 05:18 PM Re: Writing domain name into domain name
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
serious, if you can't setfocus and sendkey it, you are about having one change.
change it directly to registry.
_________________________
!

download KiXnet

Top
#75981 - 2003-07-18 05:35 PM Re: Writing domain name into domain name
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
When exactly would this script run?

Would it not be easier to just force authentication when logging into Windows 9x computers?
_________________________
There are two types of vessels, submarines and targets.

Top
#75982 - 2003-07-18 08:04 PM Re: Writing domain name into domain name
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
If you are still working with Wintendos in a school environment then you should use a proggy like Fortres 101. It will lock down the machines so the little buggers can't mess them up.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#75983 - 2003-07-18 09:23 PM Re: Writing domain name into domain name
Darren_W Offline
Hey THIS is FUN
*****

Registered: 2001-10-10
Posts: 208
Loc: Bristol, England
I set it in windows policies and they must authenticate from the domain, but some how they alwas endup changing the domain name.

I was intending on running it on startup with task scheduler, perhaps with a pause to give them time to get it wrong.

I already have winsuite installed on 1/2 of the school its easyer to have the rest locked down with policies.

[ 18. July 2003, 21:24: Message edited by: Darren ]
_________________________
I want to share something with you - the three sentences that will get you through life.
Number 1, 'cover for me.'
Number 2, 'oh, good idea, boss.'
Number 3, 'it was like that when I got here'.

Top
#75984 - 2003-07-18 09:27 PM Re: Writing domain name into domain name
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
I don't think you'll be able to prevent a user form entering text into the DOMAIN textbox as windows 9x doesn't really understand the domain concept. However, you can force authentication to a specific domain, and if there's other text init, the user won't be able to login. In that case it won't mapper what's in the etxtbox as it won't be accepted.
_________________________
There are two types of vessels, submarines and targets.

Top
#75985 - 2003-07-21 10:21 AM Re: Writing domain name into domain name
Darren_W Offline
Hey THIS is FUN
*****

Registered: 2001-10-10
Posts: 208
Loc: Bristol, England
is $=sendkeys ("~ D") the same as pressing Alt and "D" at the same time?
_________________________
I want to share something with you - the three sentences that will get you through life.
Number 1, 'cover for me.'
Number 2, 'oh, good idea, boss.'
Number 3, 'it was like that when I got here'.

Top
#75986 - 2003-07-21 11:23 AM Re: Writing domain name into domain name
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Darren,

It looks like there is an extra space in this -

$=sendkeys ("~ D")

It should be -

$=sendkeys("~D")

Borrowing from the manual (Pg. 91 version 4.21 Manual) -
quote:

To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down SHIFT while E and C are pressed, use "+(EC)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+EC".

HTH,

Kent

[ 21. July 2003, 11:25: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

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 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.067 seconds in which 0.034 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