Page 1 of 4 1234>
Topic Options
#51142 - 2000-08-29 12:36 AM I want to add a progress bar in my login script
Anonymous
Unregistered


Hi,

the following problem:

I have a script that among many other things copy´s a lot of stuff locally, but the problem is that you see this happening on the screen. So I made a very nice LogonScreen that shows all kind of information depending on who´s login in. BUT:
even though i stated all the xcopy commands with >null I still get some stuff on the screen I don´t want to see, I only want that loginscreen with userinformation on the screen and everything else must be on the background, and even when I tackle that, I want a progress bar, because that way a user can see that actually something is going on....


How to do all this??
Any help would be greatly appreciated

Top
#51143 - 2000-08-29 09:10 AM Re: I want to add a progress bar in my login script
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
dfy,
i am thinking of the same , not for a logon
but a Script that installs something on a remote client ...
Hmmmm , why not List all actions in a column
leave some space between and nest a changing
color, changing status prompt foreach action :
Like COLOR y+/n "in progress"
Color g+/n "done"
Color r+/n "failed"

clear this every time before a change with
$clear = " "

for the visibility of command results :

i once had success with the switch /q that acts like @echo off :
SHELL "%ComSpec% /q /c /e:1024 ...."

good luck

Jochen

_________________________



Top
#51144 - 2000-08-29 09:29 AM Re: I want to add a progress bar in my login script
Anonymous
Unregistered


Hi all,

Maybe it is possible to make an image of about for examp. 10px by 10px color red.

You use the IE script (somewhere else on this page) and call from that script possible other scripts until all those scripts are finished. Between those scripts you can put output info in the IE Screen. So you fix something like

code:

...<IESCRIPT CODE>....
$= olecallfunc ( $doc, "write", "s", "Progress indicator<br>" )

CALL <YOUR SCRIPT.KIX>

$= olecallfunc ( $doc, "write", "s", "<img src='<that 10px 10px red image'>" )

CALL <YOUR next SCRIPT.KIX>

$= olecallfunc ( $doc, "write", "s", "<img src='<that 10px 10px red image'>" )


and so on. It is a possibility. I have something like that cooking at the moment so i'll let you know later on.

Top
#51145 - 2000-08-29 03:34 PM Re: I want to add a progress bar in my login script
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
dfy:

You might try piping stdout AND stderr to the bit bucket like this ...

xcopy ... >nul 2>nul

[by the way, the correct syntax is >NUL not >NULL. If you look, you'll probably find a file call NULL in your default directory somewhere]. I make this mistake all the time

If this doesn't help, post your code or at least some of your xcopy lines for all to see.

Shawn.

Top
#51146 - 2000-08-29 03:42 PM Re: I want to add a progress bar in my login script
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
agreed,
in nearly every root dir You'll find sooner or later a textfile called Null
I think Simon Travaglia firstly invented this
to be the only Backup device that makes sense!

dfy , i think a combination of '/q' and > nul
2> nul' will protect You from any possible output .... (/q can be ommited in the most cases)

J.

[This message has been edited by jpols (edited 29 August 2000).]

_________________________



Top
#51147 - 2000-08-29 04:38 PM Re: I want to add a progress bar in my login script
Anonymous
Unregistered


Hi all,

Back again. Made the IE sreen work. Just fill in the blanks or call before the 'sleeps'. Good luck


Gilles

code:

break on
setconsole("HIDE")
flushkb
;Creating the IE form
$ie = olecreateobject ( "internetexplorer.application" )
$= oleputproperty ( $ie, "addressbar", "s", "0" )
$= oleputproperty ( $ie, "menubar", "s", "0" )
$= oleputproperty ( $ie, "statusbar", "s", "0" )
$= oleputproperty ( $ie, "toolbar", "s", "0" )
$= oleputproperty ( $ie, "width", "s", "520" )
$= oleputproperty ( $ie, "height", "s", "90" )
$= oleputproperty ( $ie, "left", "s", "40" )
$= oleputproperty ( $ie, "top", "s", "60" )
$= olecallfunc ( $ie, "Navigate", "s", "about:blank" )

;Getting the IE form
$= oleputproperty ( $ie, "Visible", "s", "1" )
while olegetproperty ( $ie, "Busy" ) <> "0" loop
$doc = val ( "&" + olegetproperty ( $ie, "Document" ) )
$= olecallfunc ( $doc, "open" )

;Style defined

$HTMLCode = '<html>'+chr(10)+
'<div id="Layer1" style="position:absolute; width:420px; height:20px; z-index:2; left: 43px; top: 16px; visibility: visible"> '+chr(10)+
'<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Progress Indicator</b></font></div></div>'+chr(10)+
'<div id="Layer1" style="position:absolute; width:420px; height:10px; z-index:2; left: 43px; top: 36px; visibility: visible"> '+chr(10)+
'<div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">'+chr(10)
$HTMLProgress = '<img src="10px.gif" width="40" height="10">'

;Fill the IE Screen
$= olecallfunc ( $doc, "write", "s", "$HTMLCode" )

sleep 1

$= olecallfunc ( $doc, "write", "s", "$HTMLProgress" )

sleep 1

$= olecallfunc ( $doc, "write", "s", "$HTMLProgress" )

sleep 1

$= olecallfunc ( $doc, "write", "s", "$HTMLProgress" )

sleep 1

$= olecallfunc ( $doc, "write", "s", "$HTMLProgress" )

sleep 1

$= olecallfunc ( $doc, "write", "s", "$HTMLProgress" )

sleep 1

$= olecallfunc ( $doc, "write", "s", "$HTMLProgress" )

sleep 1

$= olecallfunc ( $doc, "write", "s", "$HTMLProgress" )

sleep 1

$= olecallfunc ( $doc, "write", "s", "$HTMLProgress" )

sleep 1

$= olecallfunc ( $doc, "write", "s", "$HTMLProgress" )

sleep 1

$= olecallfunc ( $doc, "write", "s", "$HTMLProgress" )

sleep 2
$= olecallfunc ( $doc, "close" )
$= olecallfunc ( $ie, "Quit")
$= olereleaseobject ( $ie )
sleep 1

exit



Top
#51148 - 2000-08-29 04:41 PM Re: I want to add a progress bar in my login script
Anonymous
Unregistered


Thank you very much so far!
You have been helping me a lot with all your suggestions, jpols: not cool enough, i want a real progressing bar, but thanks anyway, SCAdmin: I´ll look into that!
Shawn: you probably won´t believe this, but only 2 minutes before I saw you post I discovered the same.... >nul I already knew, but the 2>nul is just what i needed! And you were right about the NULL file, search and replace with NUL

So I have all the screenoutput filtered away, I´m a very happy man! There´s still the problem that I have a static screen with no moving parts that will worry the user, so i need to have a progress bar (the coolest thing I can Think of is of course a % bar Is there some1 that can help me with that?

But a big thank you for all the reply´s already!!

DFY

Top
#51149 - 2000-08-29 05:27 PM Re: I want to add a progress bar in my login script
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
SCAdmin:

I just ran you IE4 progress bar !

Sweet !!!

Got any other IE4 goodies to share ?

Gang:

I always thought that a KiX user funtion that will display a progress bar EXACTLY like the one used with Windows 2000 bootup (you know - the first one, not the second one), would be VERY cool !

I don't know - there's something about the look and feel of that progress bar that instills confidence and a feeling that something is actually progressing - I can't express it any better than that !

Shawn.

Top
#51150 - 2000-08-29 05:53 PM Re: I want to add a progress bar in my login script
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
Gee guys. I thought I knew quite a bit about using kixtart but reading this thread is like reading greek which of course I can not read.
_________________________
Jack

Top
#51151 - 2000-08-29 06:03 PM Re: I want to add a progress bar in my login script
Anonymous
Unregistered


Shawn:

Blush

For the rest:

IE is kinda cool for this stuff. Will be working on the ADSI stuff to create a script what will be something like:
sit-on-your-ass-while-we-do-the-rest-creating-usernames-emailboxes-assigning-permissions-and-other-funky-stuff-eating-a-box-of-chocolate-crisp-doughnuts
Something like that.

Going home, it's 18:00 and I started at 7:45 so...maybe...just maybe..

See ya'll morrow.

Gillez

Top
#51152 - 2000-08-29 06:28 PM Re: I want to add a progress bar in my login script
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Gillez:

Hold on !

Funny you should mention that...

I've been communicating off-line (email) with a nice chap named Ivan that has some of the same ideas (not sure if he's posted here yet or not -Ivan- are you there ?)

His plan is to create an Excel spreadsheet of domain work (ie, new users, groups, group assignments, shares, etc) - convert the spreadsheet to a CSV file - then automagically process the changes with a KiX/ADSI script.

The idea being that someone without Windows NT Admin skills or priviledges (say - a company clerk or secretary) can gather the information in Excel, than either process the changes themselves or hand it off to a domain admin.

With the KiX/ADSI script in place, and a cleverly crafted spreadsheet, the domain admin could be back to eating donuts within minutes.

Plus, off-loading the administrative aspects of domain administration to someone skilled in administration (whew) is maybe a good thing !?

Have you done any rough design work or have any other thoughts on this subject ? Anyone ?

Shawn.

Top
#51153 - 2000-08-29 07:55 PM Re: I want to add a progress bar in my login script
Anonymous
Unregistered


Shawn and Ivan:

Didn't do nuthing yet but will do shortly. Thinking about a VB and KIX combined program like:

VB Textboxes & Nice Userform will show the nescessary User Info, Permss, Domain, Emailadress.
Kix gets variabels from the VB App and does the processing.
Later it is possible to expand the VB Functions to read from the CSV XLS or whatever.

Good ideas. Great plans. Greetz.


Gillez

Top
#51154 - 2000-08-29 08:02 PM Re: I want to add a progress bar in my login script
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
I tried this kind of stuff. I have the "MS NT Communication Tools for Schools" that includes an Excel spreadsheet for generating student IDs plus a utility to create the accounts from the output of the excel macro. I have wrestled with it for 3 years now & I gave up on it and wrote a command script based upon the resource kit utilities instead. I must say in the end the script is better. In writing the scripts I was highly influenced by the NTReghack site ( http://www.jsiinc.com/reghack.htm ) which gives some tremendous ideas on writing command scripts. It seems primitive but I personally think it is the best choice.
_________________________
Jack

Top
#51155 - 2000-08-29 09:20 PM Re: I want to add a progress bar in my login script
Anonymous
Unregistered


This is getting kinda cool:
SCadmin: I tried it, Respect! BUT, you have to have IE installed, and although I can check if it is, I have to make sure that every1 sees the progressbar, even the 1's without IE, so I keep this script in my inventory, but I can't use it at this time, I am working something out, but it isn't exactly what I want, but I'll post it when it's ready....

I see some interesting stuff here concerning automatically Import/exporting of Users and stuff, we have something similar here, but without the kix, maybe if I have some spare time I'll look into that!

Still hoping for that 1 person that has the perfect progress bar (animation) for a script, but is HAS to be inside the Kix DOS-BOX, and not with the aid of IE or a seperate window...

Thanks for all your help so far!

MF

Top
#51156 - 2000-08-29 09:57 PM Re: I want to add a progress bar in my login script
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Jack/MF:

Either of you care to share how you automated (scripted) your creation of user accounts, groups, shares or whatever ?

Is it driven from a text file, spreadsheet or ini type file and if yes, how did you format this file ?

We could use something like that over here !

Shawn.

[This message has been edited by Shawn (edited 29 August 2000).]

Top
#51157 - 2000-08-29 10:24 PM Re: I want to add a progress bar in my login script
Anonymous
Unregistered


Hi All,

Thanks Shawn for mentioning me. My idea is to create and user spreadsheet which is maintain by a non-IT person. Then write a script to

· convert the xls file to csv file or even read straight off the cells (though, converting the file first may have a better performance)
· base on the info within the the xle file such as name, Title, Team, and department, users are updated with the standard descriptions and added to the appropriate groups. Hopefully, these updates can be done directly to the SAM through OLE/ADSI.
· update the folder structure on the Departmental File Server. This may include create new share, move folders, change NTFS permissions etc.

There could be a "Update Flag" field to signify new or changed records which would be reset by the script once they are done.

There is a VB script ModifyUsers.vbs that comes with 2000 Resouce Kit that has a lot of lines that I am interested in. e.g. in the sub ModifyoneUser()

· Case "accountexpirationdate"
· If IsDate(strPropertyValueArray(i)) Then
· If DateDiff("d", now, CDate(strPropertyValueArray(i))) < 2 Then
· Print " Expiration date is too close."
· Else
· ********************** objUser.AccountExpirationDate = CDate(strPropertyValueArray(i))*********************
· Print " AccountExpirationDate = " & _
· CDate(strPropertyValueArray(i))
· End If
· Else
· Print " Warning: " & strPropertyValueArray(i) & _
· " is not a valid date."
· Print " The expiration date is not set."
· End If

The problem is that, though I did Pascal and Cobal years ago, I am rather new to KIX/VB/ADSI. So I don't quite know how to, for example, translate the above highlighted line into something like (I am probably totally wrong here):

OLECALLFUNC ($User, “SetValue”. “D”, $ExpirationDate)

I think if I can get hold of some info about the functionalities and usages of the Methods and names of the Objects (or the Object hierarchy) for SAM/ADSI/Excel, I should be able to come up with the scripts.

So, any info would be appreciated.

Ivan

Top
#51158 - 2000-08-29 10:27 PM Re: I want to add a progress bar in my login script
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
Remember this for a high school - may not be practical for all

The hard part was the excel spreedsheet. Each year we create all new student accounts & delete old ones. Each student must have a unique student id based upon their name & user directory.

We import a student list for the school of First name, Middle Name, Last Name, Grade group & the excel macro generates a unique list of student ID and passwords based upon there names plus a field of Full name & comment which equals there grade group. The macro also generates 2 bat files - 1 for account creation & 1 for account deletion plus various list for teachers.

Each line in the creation bat file looks something like:

crestd userid password fname comment edate


the creation bat file looks something like this

NET USER %USERID% %password% /add
NET USER %USERID% /scriptpath:LOGON.BAT /passwordchg:no /passwordreq:yes
NET USER %USERID% /times:M-F,7AM-6PM
NET USER %USERID% /fullname:%fname% /comment:%comment% /expires:%edate%
NET GROUP STUDENT %USERID% /ADD
MD d:\USERS\Z%USERID%
XCACLS.EXE D:\USERS\Z%USERID% /t /c /g administrator:fo;fo webmaster:f;f %USERID%:f;f /y
NET USER %USERID% /homedir :\USERS\Z%USERID%
RMTSHARE \\server\%USERID%$=D:\USERS\Z%USERID% /grant %USERID%:f users:2 /remark:%FNAME%
RMTSHARE \\server\%USERID%$ /grant administrators:f
RMTSHARE \\server\%USERID%$ /grant %USERID%:f

The above is not the exact file since the parameters would be %1%, %2%, etc. Also I don't have the actual files on hand so I made this up on the spot. Thus there may be errors.

I also played around with the adduser utility and using the for command but this method seems simpler & more direct.

[This message has been edited by JackLothian (edited 29 August 2000).]

_________________________
Jack

Top
#51159 - 2000-08-29 11:07 PM Re: I want to add a progress bar in my login script
Anonymous
Unregistered


I created a nice looking VB app to be a "status" front end for kix based application installs. If anyone is interested, I could put or email the source somewhere. I tried to make it as dumb as possible, yet functional. Almost all the information in the VB status app is kix driven, except for reduntant stuff I hard coded.... so, in the source you'd just need to use your company logo or delete the picture box... and change the title body text, which now says something about "call the help desk at........."

Note: this is a Visual Basic app, not VBScript.... and would need to be compiled. There is just one dependancy which is about 600k, and this status app compiles to 32k. We distributed the status app like any other kix based application install.

enjoy...

Top
#51160 - 2000-08-29 11:54 PM Re: I want to add a progress bar in my login script
Anonymous
Unregistered


This is a great thread (and a good example of how easily people can somehow go off on a tangent! )

Anyway, here is my humble submission on a progress bar. I threw it together in a few minutes, but it seems to get the job done. I'm sure it can spark someone's imagination!

code:

BREAK ON
CLS
COLOR r+/r

$X = 2

WHILE $X < 20
BOX(2,1,2,$x,"full")
$X = $X + 2
SLEEP 1
LOOP

COLOR w/n


[This message has been edited by icatar (edited 29 August 2000).]

[This message has been edited by icatar (edited 30 August 2000).]

Top
#51161 - 2000-08-30 03:22 PM Re: I want to add a progress bar in my login script
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Gang:

Lookie at icatar's post above !!!

To me, this is sweet and an example of elegant kix scripting !

Shawn.

[This message has been edited by Shawn (edited 30 August 2000).]

Top
Page 1 of 4 1234>


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

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

Generated in 0.041 seconds in which 0.013 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