**DONOTDELETE**
(Lurker)
2000-08-29 12:36 AM
I want to add a progress bar in my login script

Hi,

the following problem:

I have a script that among many other things copys 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 whos login in. BUT:
even though i stated all the xcopy commands with >null I still get some stuff on the screen I dont 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

JochenAdministrator
(KiX Supporter)
2000-08-29 09:10 AM
Re: I want to add a progress bar in my login script

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

**DONOTDELETE**
(Lurker)
2000-08-29 09:29 AM
Re: I want to add a progress bar in my login script

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.


ShawnAdministrator
(KiX Supporter)
2000-08-29 03:34 PM
Re: I want to add a progress bar in my login script

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.


JochenAdministrator
(KiX Supporter)
2000-08-29 03:42 PM
Re: I want to add a progress bar in my login script

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).]

**DONOTDELETE**
(Lurker)
2000-08-29 04:38 PM
Re: I want to add a progress bar in my login script

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




**DONOTDELETE**
(Lurker)
2000-08-29 04:41 PM
Re: I want to add a progress bar in my login script

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: Ill look into that!
Shawn: you probably wont 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, Im a very happy man! Theres 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 replys already!!

DFY

ShawnAdministrator
(KiX Supporter)
2000-08-29 05:27 PM
Re: I want to add a progress bar in my login script

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.

Jack Lothian
(MM club member)
2000-08-29 05:53 PM
Re: I want to add a progress bar in my login script

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.

**DONOTDELETE**
(Lurker)
2000-08-29 06:03 PM
Re: I want to add a progress bar in my login script

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

ShawnAdministrator
(KiX Supporter)
2000-08-29 06:28 PM
Re: I want to add a progress bar in my login script

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.


**DONOTDELETE**
(Lurker)
2000-08-29 07:55 PM
Re: I want to add a progress bar in my login script

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

Jack Lothian
(MM club member)
2000-08-29 08:02 PM
Re: I want to add a progress bar in my login script

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.

**DONOTDELETE**
(Lurker)
2000-08-29 09:20 PM
Re: I want to add a progress bar in my login script

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

ShawnAdministrator
(KiX Supporter)
2000-08-29 09:57 PM
Re: I want to add a progress bar in my login script

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).]

**DONOTDELETE**
(Lurker)
2000-08-29 10:24 PM
Re: I want to add a progress bar in my login script

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


Jack Lothian
(MM club member)
2000-08-29 10:27 PM
Re: I want to add a progress bar in my login script

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).]

**DONOTDELETE**
(Lurker)
2000-08-29 11:07 PM
Re: I want to add a progress bar in my login script

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...

**DONOTDELETE**
(Lurker)
2000-08-29 11:54 PM
Re: I want to add a progress bar in my login script

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).]

ShawnAdministrator
(KiX Supporter)
2000-08-30 03:22 PM
Re: I want to add a progress bar in my login script

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).]

JochenAdministrator
(KiX Supporter)
2000-08-30 05:56 PM
Re: I want to add a progress bar in my login script

Icatar,

Yeah , that's what i thought off when thinking of a progress bar in KIX !
[Kix code and nothing but pure Kix code]
had a rough frame , but this is much more
sophisticated , elegant , simple [what You prefer most]
You don't mind if i Use it ??? No ? Excellent!

For the Ie stuff :
Hats off to SCAdmin ! I have Greatest respect for people that invent something new
nobody tried before !

Ok, i have to restrict my admiration regarding performance ! I don't tested it yet
but can imagine that it will be not that performant...
I am an extremely impatient person @ logging on, and often been seen irrationaly destroying equipment !
Glad to be not responsible for logon Scripts

Greets
Jochen

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

ShawnAdministrator
(KiX Supporter)
2000-08-30 07:09 PM
Re: I want to add a progress bar in my login script

Based on icatar's excellent script - here's my humble submission based on that Window 2000 bootup thingy I was rambling on about earlier ...

code:

BREAK ON


CLS


AT(9,30) "Starting Windows..."


BOX(10,10,12,65,"single")


$COL = 12


WHILE $COL < 64


AT(11,$COL) CHR(166)


$COL = $COL + 1


IF ($COL & RND() ) = 0 ; simulate activiity


SLEEP 1


ENDIF


LOOP


AT(15,0) "Hit any key to continue..." get $k


EXIT



Shawn.

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

JochenAdministrator
(KiX Supporter)
2000-08-30 07:19 PM
Re: I want to add a progress bar in my login script

Shawn,

cool stuff with that chr(166) ...
hey, just behaves like a real progress bar
[explain 'IF ($COL & RND() ) = 0' please ]

Jochen

Ahhh :: Pseudo Random , ok got it !

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

**DONOTDELETE**
(Lurker)
2000-08-30 07:37 PM
Re: I want to add a progress bar in my login script

Very cool progress bar Shawn. I knew you guys wouldn't be able to resist 'evolving' the code!

BTW, where can we get a list of ASCII codes that we can use with the CHR command?

Roneil

JochenAdministrator
(KiX Supporter)
2000-08-30 07:53 PM
Re: I want to add a progress bar in my login script


code:

BREAK ON

$x = 0
While $x < 256
AT($x,0)'$x = 'chr($x)
$x = $x + 1
Loop
Get $y
Exit


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

**DONOTDELETE**
(Lurker)
2000-08-30 07:57 PM
Re: I want to add a progress bar in my login script

I couldn't help doing a little evolution myself. Below is Shawn's code for the progress bar, except that I added a percentage indicator beneath the bar.

P.S. Thanx for the code for the ASCII characters Jochen!

code:

BREAK ON

CLS

AT(9,30) "Starting Windows..."

BOX(10,10,12,65,"single")

$COL = 12

WHILE $COL < 64

AT(11,$COL) CHR(166)

$COL = $COL + 1

$Y = 100 * ($COL - 12) / 52

IF ($COL & RND() ) = 0 ; simulate activiity

SLEEP 1

ENDIF

AT(13,37) "$Y %"

LOOP

AT(15,0) "Hit any key to continue..." get $k

EXIT




JochenAdministrator
(KiX Supporter)
2000-08-30 08:04 PM
Re: I want to add a progress bar in my login script

no prob,
didn't knew it myself till now

here some updtates i can remember :

chr(10) = [ENTER]
chr(34) = " ;quite important
chr(7-9)= don't know exactly but must be TAB, SPACEBAR and ESC

J.

**DONOTDELETE**
(Lurker)
2000-08-31 09:08 AM
Re: I want to add a progress bar in my login script

*Phew!* I've been working so hard a haven't been able to keep up with you guys... and what busy buggers you've been!
I just loved the progress-bar discussion - and especially the part where someone suggested using VB to get input for a script. I've been working on something but I've never actually got past modifying my script and making a VB form. *grin*

I've been sparked - and I'm off to get started!

(Radimus: I always GET $none.. )

[This message has been edited by Fuentez (edited 31 August 2000).]

Radimus
(KiX Supporter)
2000-08-31 01:15 PM
Re: I want to add a progress bar in my login script

hey... I just noticed that the get $k is getting around...


rollo
(Getting the hang of it)
2000-08-31 02:12 PM
Re: I want to add a progress bar in my login script

whats the get $k
I have not used it as of yet
also what would we have to do to make the progress bar actually work update the $col
with a value set from points in our script?
thanks
rollo


JochenAdministrator
(KiX Supporter)
2000-08-31 02:45 PM
Re: I want to add a progress bar in my login script

Rollo,
don't know either what the $k thingy means...
but i am quite excited to know [Rad? please..]

It might look and feel not that professional,
but i would prefer to put that progress bar in a subroutine to hop in with a changed var
Rather than wrap it around my code in a Monster - Loop ...
Any suggestions ?

Jochen

rollo
(Getting the hang of it)
2000-08-31 03:07 PM
Re: I want to add a progress bar in my login script

I am trying to get a activex control to work
I would like to pass a value back to the vb script in the html page to update the counter


break on

$info ='@fullname <h5>Your Password will expire in @pwage Days<h5>'

IF INGROUP("WG_ALL")
$all = '<p align="center"><img border="0" src="file://marble/afcert$/banner.jpg" width="400" height="45"></p>'
$group = '<p align="center"><img border="0" src="file://marble/afcert$/termite1.gif" width="100" height="100"></p>'
Endif

IF INGROUP("7_FTR")
$group = <p align="center"><img border="0" src="file:banner.jpg" width="703" height="66"></p>

ENDIF

$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", "500" )
$= oleputproperty ( $ie, "height", "s", "500" )
$= oleputproperty ( $ie, "left", "s", "159" )
$= oleputproperty ( $ie, "top", "s", "131" )


$= olecallfunc ( $ie, "Navigate", "s", "about:blank" )
$= oleputproperty ( $ie, "Visible", "s", "1" )


while olegetproperty ( $ie, "Busy" ) <> "0" loop

$doc = val ( "&" + olegetproperty ( $ie, "Document" ) )
$= olecallfunc ( $doc, "open" )
$= olecallfunc ( $doc, "write", "s", "<title>Logon script for %username%</title>" )

$= olecallfunc ( $doc, "write", "s", '<body bgcolor="#00A9E2">
$all
<OBJECT id=ProgressBar1 style="WIDTH: 452px; HEIGHT: 24px"
classid=clsid:0713E8D2-850A-101B-AFC0-4210102A8DA7><PARAM NAME="_ExtentX" VALUE="11959"><PARAM NAME="_ExtentY" VALUE="635"><PARAM NAME="_Version" VALUE="327682"><PARAM NAME="BorderStyle" VALUE="0"><PARAM NAME="Appearance" VALUE="1"><PARAM NAME="MousePointer" VALUE="0"><PARAM NAME="Enabled" VALUE="1"><PARAM NAME="OLEDropMode" VALUE="0"><PARAM NAME="Min" VALUE="0"><PARAM NAME="Max" VALUE="100"></OBJECT>
<p align="center"><table border="1" width="400" height="200">
<tr>
<td width="200" height="200"><SCRIPT LANGUAGE="VBScript">
progressbar1.value = 25
Document.Write time
</SCRIPT><HR>
$info</td>
<td width="200" height="200">$group</td>
</tr>
</table>

<HR>
')

;************************ Common drive mappings ************************
$= olecallfunc ( $doc, "write", "s", "<h4>Mapping network drives ...</h4>" )
use s: /delete
use p: /delete
use y: /delete
use y: "\\marble\files"
use v: "\\marble\cd"

;************************ Group drive mappings ************************
$done = 50


;************************ proxy and homepage settings ************************

$= olecallfunc ( $doc, "write", "s", "<h4>Setting Browser</h4>" )
$done = 75
I

;************************ Maintaining Administration NT ************************
$done = 100

$= olecallfunc ( $doc, "write", "s", "<h4>Logon script complete ...</h4>" )


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

get $x

exit


hey I figured it out!

add this.


$= olecallfunc ( $doc, "write", "s", '<SCRIPT LANGUAGE="VBScript">progressbar1.value = 10 </SCRIPT>')

just update the value for progress bar to update!


[This message has been edited by rollo (edited 31 August 2000).]

[This message has been edited by rollo (edited 31 August 2000).]

ShawnAdministrator
(KiX Supporter)
2000-08-31 03:42 PM
Re: I want to add a progress bar in my login script

Rollo:

Holy sh*t ! Your script is amazing !

But can you repackage this IE script to do something less harmfull (mapping drives, checking for groups,etc) and make it more generic.

How about an IE script that will display all your user settings, group memberships, date, time and all that stuff, and will work for everyone !

Shawn.


ShawnAdministrator
(KiX Supporter)
2000-08-31 04:04 PM
Re: I want to add a progress bar in my login script

On this other matter, this is how I thought a real work progress bar would work. I guess there are two ways of doing this.

1) Wrap the progress loop around your work

2) Call a progress function from "within" your work

This example takes the second approach and demonstrates how one might step through a script...

I encapsulated the progressbar variables within the function itself for ease of portability;. One can move them out for effecientcy if one desires !

Plus - I made the bar 50 chars wide for simplicity sake !

code:

break on


$pbPercent = 0
$pbMessage = "Enumerating Groups ..."
gosub pbUpdate


sleep 3 ; enumerate groups here


$pbPercent = 25
$pbMessage = "Mapping Drives ..."
gosub pbUpdate


sleep 3 ; map the drives


$pbPercent = 50
$pbMessage = "Changing the Registry ..."
gosub pbUpdate


sleep 3 ; change the registry ...


$pbPercent = 75
$pbMessage = "Resting for three seconds ..."
gosub pbUpdate


sleep 3 ; rest


$pbPercent = 100
$pbMessage = "Have a nice day ..."
gosub pbUpdate


sleep 3


exit


bUpdate


; place bar with $pbRow and $pbCol


$pbRow = 20
$pbCol = 1


$pbWidth = 50
$pbPattern = ""
$pbPadding = " "


if $pbPercent


at($pbRow,$pbCol+1) substr("$pbMessage$pbPadding",1,$pbWidth)
at($pbRow+2,$pbCol+2) substr($pbPattern,1,$pbPercent/2)


else


cls
at($pbRow,$pbCol+1) substr("$pbMessage$pbPadding",1,$pbWidth)
box($pbRow+1,$pbCol,$pbRow+3,$pbCol+$pbWidth+3,"single")
at($pbRow+2,$pbCol+2)


endif


return


Shawn.



JochenAdministrator
(KiX Supporter)
2000-08-31 04:20 PM
Re: I want to add a progress bar in my login script

exactly what i thought of Shawn,
problem is ,that one will lost look and feel
of a real progress bar ... [like we saw with that cool RND()].

anyway we have a progress bar working for us
and let the Users know how desperately slow
the logon process is ...

Jochen


rollo
(Getting the hang of it)
2000-08-31 04:35 PM
Re: I want to add a progress bar in my login script

hey shawn,
I was just playing a bit to see if and how a vbscript/ activex control would work in the IE.
you can echo kix @username Etc. to the html code

I was thinking of using the IE as a front end for users logging in for a more graphical
ewww ahhhh effect
I think for speed sake the plain kix black box is more than sufficient.

hmmmmm
lets start using flash4!!

maybe so!

-rollo

**DONOTDELETE**
(Lurker)
2000-08-31 04:36 PM
Re: I want to add a progress bar in my login script

Hi All,

Good stuf about that progress bar. I used the code from Icar to polish things up. It can also been done withe Shawn's code.

Code
__________________________________________________________________________________________

BREAK ON
CLS
AT(9,22) "Starting Windows in progress..."
BOX(10,10,12,65,"single")
$COL = 12
WHILE $COL < 64
COLOR c+/c
AT(11,$COL) CHR(16)
$COL = $COL + 1
$Y = 100 * ($COL - 12) / 52
IF ($COL & RND() ) = 0 ; simulate activiity
SLEEP 1
ENDIF
COLOR w/n
AT(13,37) "$Y %"
LOOP
AT(15,0) "Hit any key to continue..." get $k
EXIT

__________________________________________________________________________________________

I like polishing

Jos




JochenAdministrator
(KiX Supporter)
2000-08-31 04:39 PM
Re: I want to add a progress bar in my login script

flash would be great for speeds ache [ermm Sake]
Lets try to let Kix logon scripts control a flash movie on ie logon window !!!!!!!

Right on to work Jochen!

C YA ALL IN 2 Years

ShawnAdministrator
(KiX Supporter)
2000-08-31 04:41 PM
Re: I want to add a progress bar in my login script

Joshie:

It all depends on how you play the percentages.

If one knows the amount of work upfront, one might step through a loop with some sort of $index variable, calculate the percentages against a $total variable, and the bar will behave correctly and be quite smooth !

If the amount of work is unknown. one can benchmark a script by section, calculate the percentages ( section one takes 10% of total time, section two takes 30%, etc) and the bar will still behave correctly, but might seem a bit "chunky" !

I hear what your saying though !

Shawn.

Alright ! who made this thread "wide" again !

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

ShawnAdministrator
(KiX Supporter)
2000-08-31 04:51 PM
Re: I want to add a progress bar in my login script

Jos:

That one's so good it gives me the "willies".

It's almost "spooky"

dfy:

Are you still there ?

Shawn.

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

**DONOTDELETE**
(Lurker)
2000-08-31 05:05 PM
Re: I want to add a progress bar in my login script

Yo!!!

Just to let you all know that I havent disappeared!! I was working on another project today, so that explaines why I wasnt here

You guys are awesome!! I Like it that you all experiment with all the possibilities with Kix! Ill be trying some of the last posts this weekend, so Ill be back tomorrow!

I worked out something similar as Icatar, and it works perfectly, but I think it can be more advanced too, so keep up the good work!

I have to go home now, because else Ill be in a traffic jam

Thanks! (Ill be posting here some of the stuff we have in our loginscript next monday, maybe theres some stuff youll find usefull)


DFY

**DONOTDELETE**
(Lurker)
2000-08-31 07:14 PM
Re: I want to add a progress bar in my login script

Check out yet another variation of the progress bar with a different bar thingy going across.

code:

BREAK ON

CLS

COLOR w+/n

AT(9,30) "Starting Windows..."

COLOR b+/n
BOX(10,10,12,65,"single")

$COL = 12

WHILE $COL < 64
COLOR b+/n
AT(11,$COL) CHR(45) CHR(62)

$COL = $COL + 1

$Y = 100 * ($COL - 12) / 52

IF ($COL & RND() ) = 0 ; simulate activiity

SLEEP 1

ENDIF
COLOR w+/n
AT(13,37) "$Y %"

LOOP

COLOR w/n
AT(15,0) "Hit any key to continue..." get $k

EXIT




JochenAdministrator
(KiX Supporter)
2000-08-31 07:32 PM
Re: I want to add a progress bar in my login script

Hey,
a blue arrow heading to 100 % !!
ok, the next challenge would be a multicolor
smiley that changes mood from [red] over
[Yellow] to [Green]

if anyone can do this ?
I bet my kids would like that

J.


**DONOTDELETE**
(Lurker)
2000-09-01 03:25 AM
Re: I want to add a progress bar in my login script

Ask and you shall receive...

code:

BREAK ON

CLS

COLOR w+/n

AT(9,30) "Starting Windows..."

COLOR b+/n
BOX(10,10,12,65,"single")

$COL = 12

WHILE $COL < 64


COLOR b+/n
AT(11,$COL) CHR(45) CHR(62)
SELECT
CASE $COL <= 29
COLOR r+/n
CASE $COL > 30 AND $COL <= 47
COLOR y+/n
CASE $COL > 47
COLOR g+/n
ENDSELECT
CHR(2)

$COL = $COL + 1

$Y = 100 * ($COL - 12) / 52

IF ($COL & RND() ) = 0 ; simulate activiity

SLEEP 1

ENDIF
COLOR w+/n
AT(13,37) "$Y %"

LOOP

COLOR r+/n
AT(11,65) CHR(15)

COLOR w/n
AT(15,0) "Hit any key to continue..." get $k

EXIT


(now we're just getting goofy! )

Roneil

**DONOTDELETE**
(Lurker)
2000-09-01 03:55 AM
Re: I want to add a progress bar in my login script

;************************************************************
;** Script: Login Splash Screen
;** Version: 2.1
;** Created: June 04, 2000 - 09:14 PM
;**
;** Author: Ben Burnett
;** E-mail: BenBurnett@telusplanet.net
;**
;** Purpose / Comments:
;**
;** Show the user something nice while they are loged in.
;**
;** Original splash screen code - Ruud van Velsen
;**
;** Ben Burnett
;** - Oct/29/99 - Added Debug information
;** - Oct/29/99 - Added Company name banner
;** - Oct/31/99 - Added progress bar
;** - June/4/2000 - Minor enhancement to debug system
;**
;************************************************************

;************************************************************
;** Script Debuging
;**
;** On the command line define "$DEBUG=1" to get a
;** more detailed output. (Without quotes)
;**

;************************************************************
;** Common defines
;**

$TRUE = 1
$FALSE = 0

;************************************************************
;** Globals
;**

; Your institutions name goes here
$Title = "Version Zero Software Network Login"

;************************************************************
;** Script Start
;**

; Turn break on

Break On

; Start of Script
:MAIN

; Signal start of script
If $DEBUG = $TRUE
"*** Start of Script ***" ? ?
EndIf

; Set output to ASCII
Dim $PreviousASCIIState
$PreviousASCIIState = SetASCII ("ON")

; Clear the screen
Cls

; Show the splash screen
Gosub SPLASH_SCREEN

; Progress meter init
; NOTE: A Full bar is 34
$Progress = 0
$AjustProgress = 0

;
; Do something...
;

Sleep 1

; Update progress bar
$AjustProgress = 10 ; add 10 blocks
Gosub DRAW_PROGRESS

;
; Do something else...
;

Sleep 1

; Update progress bar
$AjustProgress = 10 ; add 10 more blocks
Gosub DRAW_PROGRESS

;
; Do something else, again...
;

Sleep 1

; Update progress bar
$AjustProgress = 14 ; were done
Gosub DRAW_PROGRESS

;********************************************
; The next few lines is only there so that you can
; actualy see the demo screen, in an actual login
; script you probably would'nt have them there
;
If $DEBUG = $TRUE

Color W+/N
At (16,28) "Press any key to continue."
Get $X

EndIf
;********************************************

; Reset the output mode
$X = SetASCII ($PreviousASCIIState)

; Clear the screen again
Cls

; Signal end of script
If $DEBUG = $TRUE

? ? "*** End of Script ***"

EndIf

Exit ; Quit

;************************************************************
;** Script Subroutines ( GOSUBs )
;**

; Draw screen information
:SPLASH_SCREEN

; Background grid
Color B+/N
Box (0, 0, 24, 79, GRID)

; Title banner
Color B/N
Box (3, 3, 5, Len ($Title + 8) + 5, ) ; shadow
Color G+/N
Box (2, 2, 4, Len ($Title + 8) + 4, FULL) ; box

; Information box
Color B/N
Box (8, 21, 18, 61, ) ; shadow
Color G+/N
Box (7, 20, 17, 60, FULL) ; box

; Draw the progress bar
Color B/N
Box (20, 21, 22, 61, ) ; shadow
Color G+/N
Box (19, 20, 21, 60, FULL) ; box

; Center the title on the screen
Color Y+/N
At ( 3, 4) $Title

; Display some text strings
Color W+/N
At ( 9, 25) "Userid : "
At (10, 25) "Full name : "
At (11, 25) "Privilege : "
At (12, 25) "Workstation : "
At (13, 25) "Domain : "
At (14, 25) "Logon Server : "

; ...and some macro's
Color Y+/N
At ( 9, 40) @USERID
At (10, 40) @FULLNAME
At (11, 40) @PRIV
At (12, 40) @WKSTA
At (13, 40) @DOMAIN
At (14, 40) @LSERVER

Return

; Draw progress bar
RAW_PROGRESS

; Setup progress bar ajustment
$AjustProgress = $Progress + $AjustProgress

; Bump progress up
While $Progress <= $AjustProgress

; Diplay curent progress
Color Y+/N
At (20, 22 + $Progress) Chr (219)
$Progress = $Progress + 1

Loop

Return

**DONOTDELETE**
(Lurker)
2000-09-01 09:54 AM
Re: I want to add a progress bar in my login script

Hi Jochen,

You ment this ?

Code
__________________________________________________________________________________________

BREAK ON
CLS
;$kleur1 = Color c+/c
AT(9,22) "Starting Windows in progress..."
BOX(10,10,12,65,"single")
$COL = 12
WHILE $COL < 64
Select
Case $Y < 33
Color r+/r
Case $y > 33 And $Y < 66
Color y+/y
Case $y > 66
Color g+/g
endselect
;Color c+/c
AT(11,$COL) CHR(2)
$COL = $COL + 1
$Y = 100 * ($COL - 12) / 52
IF ($COL & RND() ) = 0 ; simulate activiity
SLEEP 1
ENDIF
COLOR w/n
AT(13,37) "$Y %"
LOOP
AT(15,0) "Hit any key to continue..." get $k
EXIT
__________________________________________________________________________________________


Jos


JochenAdministrator
(KiX Supporter)
2000-09-01 11:36 AM
Re: I want to add a progress bar in my login script

lol,

Jos , thats the thing ! unfortunately there
is only a smiling smiley ....

i'll try the look with a BIG one that is always on the same cordinates changing his color like a rainbow til he reaches 100%;
... and then explodes !

What ?
No i won't post this one

Jochen

p.s.: I'll miss the board for the Next two weeks [Yes, lads and lassies : He made it , he has got 2 weeks of holiday !!!]
Bryce : hopefully i'll make the end-polish of the script i promised last week until todays evening ...[my beloved wife would never allow me to take my Notebook with me ]

[This message has been edited by jpols (edited 01 September 2000).]

**DONOTDELETE**
(Lurker)
2000-09-04 09:59 PM
Re: I want to add a progress bar in my login script


great topic ! excuse me for replying on a covered topic but I could not resist the temptation to post one more progress bar !

The only thing you have to do is to write the total number of your kix / shell commands or the total lenght of a loop.

here it is :


code:


; This is a progress bar code
; George Bouras
; root@novastar.dtdns.net

;---------------------------------------
; write here the total length of the job


$total_job=40


;----------------------------------------


setascii(on) cls break on
color y+/n box(17,1,19,15,single)
color g+/n at(18,2) "done : "
color y+/n box(20,1,23,78,single)
color c+/n at(18,13) "%"
$done_job=1

do
$percent_job=$done_job*100/$total_job
$previus_job=$bar_job
$bar_job=$percent_job*77/100

;----------------------------------------
; Place here your custom script commands.
; Be carefull so your total commands
; much the $total_job , or the loop you
; want to run end to $total_job number !!!
;
; command 1
; command 2
; .
; .
; .
; command n
;----------------------------------------

; <><><><><><><><><><><><><><><><><><><><><><>< ><><><><><>
; <><><><><><><><><><><><><><><><><><><><><><>< ><><><><><>


; Here is the graphics machine (!)

if $bar_job = $previus_job goto skip_bar endif
do
at(18,9) $percent_job
if $previus_job < 2
at(21,2) chr(219) at(22,2) chr(219)
else
at(21,$previus_job) chr(219) at(22,$previus_job) chr(219)
endif
$previus_job=$previus_job+1
until $previus_job=$bar_job+1
:skip_bar


; <><><><><><><><><><><><><><><><><><><><><><>< ><><><><><>
; <><><><><><><><><><><><><><><><><><><><><><>< ><><><><><>

$done_job=$done_job+1
until $done_job=$total_job+1

:end





**DONOTDELETE**
(Lurker)
2000-09-05 01:00 PM
Re: I want to add a progress bar in my login script

Im Back!

Ive seen some impressive and progressive scripts with those cool smileys, I liked all of them, but For now I stick with with the simple but effective bar Ive now got in our logonscript :

:PROGRESSBAR
COLOR r+/r
IF $PROGRESS = 60
$PROGRESS = 40
EndIF
BOX(15,30,14,$PROGRESS,"full")
$PROGRESS = $PROGRESS + 4
COLOR b/b
Return

and in various places I placed:

GOSUB PROGRESSBAR

I chose this, because all of the other scripts ive seen here, have 1 problem: you cant use them in an actual script, because kix will display the bar, and then go on with the rest of the script, but I want the progressbar allways in sight, and progressing with my script, so I am rebuilding the last smiley script, because I liked that very much


1 last thing: I find it really cool of you guys that you participate this much! If you keep working on that progressbar, we get the most advanced bar the kixworld has ever seen!

So the last step is: a progressbar that is actualy PROGRESSING with the script.... (although ive seen some examples, but they were effectively the same as Ive already got, so a smiley progressbar that is progressing with the script is what we want and need

Hoping for even more cool scripts,

MF



MCA
(KiX Supporter)
2000-09-06 06:26 AM
Re: I want to add a progress bar in my login script

see next reaction. currently a submit of information isn't directly available.
topic are separated on different pages.

[This message has been edited by MCA (edited 06 September 2000).]

MCA
(KiX Supporter)
2000-09-06 06:31 AM
Re: I want to add a progress bar in my login script

Dear,

Based on ICATAR's and SHAWN's scripts we have make an extension to
the KIXSTRIP.EXE program, which automatically do three things:


  • insert variable with actual line number.
  • insert a call of subroutine.
  • insert subroutine which calculates the progress and will showing it.

code:

$pcur= 1 gosub "pinfo" ; - code -
.....
$pcur= 341 gosub "pinfo" ; - code -


code:

at (9,25) "Starting Windows...completed"
at (20,1) " "
exit
:pinfo
$pstop=341
IF ($pcur <= 1)
cls
at (9,30) "Starting Windows..."
box (10,5,12,75,"single")
box (14,5,16,75,"single")
$pcolumn=6
ENDIF
$ppercentage=(100*$pcur)/$pstop
IF ($pcolumn > 74)
$pcolumn=6
ENDIF
$pcolumn=6+((74-6)*$ppercentage)/100
at (11,$pcolumn) CHR(166)
at (13,37) $ppercentage " %"
at (15,37) $pcur " .. " $pstop
return


Remarks: by using the option "/progress"


  • reserved label: pinfo
  • reserved variables: $pcur, $pstop, $ppercentage, $pcolumn
    (using them will not influence our values, but it influences your values)
  • progress indicator which let you see:
    - how much is your script completed.
    - which parts of your script were skipped.
    - at which line your are leaving your script.
  • how long a "LOOP" will run is difficult to calculate. each work-
    station hasn't the same structure.
    so we are using the progress-bar as an indicator which shows the
    current position of the script.
  • how long a "XCOPY" or other (external) command will run is difficult
    to calculate. an external program can ask the user for input.
  • code:

    IF setconsole("hide")
    ENDIF


    can influence your screen output.

site: http://home.wanadoo.nl/scripting
program: kixstrip.exe 1.71

Example of running "cleanup.kix" by "kixstrip /block_check /progress":

code:

$pcur= 1 gosub "pinfo" IF setconsole("hide")
$pcur= 2 gosub "pinfo" ENDIF
$pcur= 3 gosub "pinfo" ;
$pcur= 4 gosub "pinfo" ; NT/95 cleanup - Kixtart 3.62
$pcur= 5 gosub "pinfo" ;
$pcur= 6 gosub "pinfo" ; (c) scripting@wanadoo.nl - 2000
$pcur= 7 gosub "pinfo" ;
$pcur= 8 gosub "pinfo" ; vs 1.00 - program (cleanup recent list, set HKCR keys, set BOOT.INI, set TaskMgr)
$pcur= 9 gosub "pinfo" ;
$pcur= 10 gosub "pinfo" ; 1.00 (20000715) original version
$pcur= 11 gosub "pinfo" ;
$pcur= 12 gosub "pinfo" $prgrm_version="1.00"
$pcur= 13 gosub "pinfo" ;
$pcur= 14 gosub "pinfo" $debug_mode="no" ; - yes/no -
$pcur= 15 gosub "pinfo" IF (@inwin = 1)
$pcur= 16 gosub "pinfo" $nt_mode="yes"
$pcur= 17 gosub "pinfo" ELSE
$pcur= 18 gosub "pinfo" $nt_mode="no"
$pcur= 19 gosub "pinfo" ENDIF
$pcur= 20 gosub "pinfo" ;
$pcur= 21 gosub "pinfo" BREAK off
$pcur= 22 gosub "pinfo" FLUSHKB
$pcur= 23 gosub "pinfo"
$pcur= 24 gosub "pinfo" $info=""
$pcur= 25 gosub "pinfo"
$pcur= 26 gosub "pinfo" ; --------------------------------------------------------------------------
$pcur= 27 gosub "pinfo" ; - taskmgr settings. all counters -
$pcur= 28 gosub "pinfo" ; --------------------------------------------------------------------------
$pcur= 29 gosub "pinfo"
$pcur= 30 gosub "pinfo" $ikey="HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\TaskManager"
$pcur= 31 gosub "pinfo" IF (ExistKey($ikey) = 0)
$pcur= 32 gosub "pinfo" $ikey_ex="preferences"
$pcur= 33 gosub "pinfo" $taskmgr_prefs= "ac000000a00f00000200000001000000020000000000000020"
$pcur= 34 gosub "pinfo" $taskmgr_prefs=$taskmgr_prefs+"000000de030000d70200000200000000000000010000000200"
$pcur= 35 gosub "pinfo" $taskmgr_prefs=$taskmgr_prefs+"00000300000004000000050000000600000007000000080000"
$pcur= 36 gosub "pinfo" $taskmgr_prefs=$taskmgr_prefs+"00090000000a0000000b0000000c0000000d000000ffffffff"
$pcur= 37 gosub "pinfo" $taskmgr_prefs=$taskmgr_prefs+"6b000000320000002300000046000000460000004600000046"
$pcur= 38 gosub "pinfo" $taskmgr_prefs=$taskmgr_prefs+"000000460000004600000046000000460000003c0000003c00"
$pcur= 39 gosub "pinfo" $taskmgr_prefs=$taskmgr_prefs+"00003c000000460000004b0000000000000000000000"
$pcur= 40 gosub "pinfo" IF (ExistKey($ikey+"\"+$ikey_ex) = 0)
$pcur= 41 gosub "pinfo" $result_data_type=ReadType($ikey, $ikey_ex)
$pcur= 42 gosub "pinfo" ELSE
$pcur= 43 gosub "pinfo" $result_data_type="REG_BINARY"
$pcur= 44 gosub "pinfo" ENDIF
$pcur= 45 gosub "pinfo" IF (ReadValue($ikey, $ikey_ex) <> $taskmgr_prefs)
$pcur= 46 gosub "pinfo" IF (writevalue($ikey, $ikey_ex, $taskmgr_prefs, $result_data_type) <> 0)
$pcur= 47 gosub "pinfo" IF (writevalue($ikey, $ikey_ex, $taskmgr_prefs, "REG_BINARY") <> 0)
$pcur= 48 gosub "pinfo" ENDIF
$pcur= 49 gosub "pinfo" ENDIF
$pcur= 50 gosub "pinfo" $info=$info+" taskmgr."+$ikey_ex
$pcur= 51 gosub "pinfo" IF ($debug_mode = "yes")
$pcur= 52 gosub "pinfo" ? " taskmgr.["+$ikey_ex+"]="+$ivalue
$pcur= 53 gosub "pinfo" ENDIF
$pcur= 54 gosub "pinfo" ENDIF
$pcur= 55 gosub "pinfo" ENDIF
$pcur= 56 gosub "pinfo"
$pcur= 57 gosub "pinfo" ; --------------------------------------------------------------------------
$pcur= 58 gosub "pinfo" ; - update BOOT.INI timer -
$pcur= 59 gosub "pinfo" ; --------------------------------------------------------------------------
$pcur= 60 gosub "pinfo"
$pcur= 61 gosub "pinfo" IF ($nt_mode = "yes")
$pcur= 62 gosub "pinfo" $filename="c:\boot.ini" ; - NT boot menu -
$pcur= 63 gosub "pinfo" $file_attr=getfileattr($filename)
$pcur= 64 gosub "pinfo" IF setfileattr($filename, 128)
$pcur= 65 gosub "pinfo" ENDIF
$pcur= 66 gosub "pinfo" IF (readprofilestring($filename, "boot loader", "timeout") <> "1")
$pcur= 67 gosub "pinfo" IF (writeprofilestring($filename, "boot loader", "timeout", "1") = 0)
$pcur= 68 gosub "pinfo" $info=$info+" boot.timeout=1"
$pcur= 69 gosub "pinfo" IF ($debug_mode = "yes")
$pcur= 70 gosub "pinfo" ? " "+$filename+" (attr: "+$file_attr+") -> [boot loader] timeout=1"
$pcur= 71 gosub "pinfo" ENDIF
$pcur= 72 gosub "pinfo" ENDIF
$pcur= 73 gosub "pinfo" ENDIF
$pcur= 74 gosub "pinfo" IF setfileattr($filename, $file_attr)
$pcur= 75 gosub "pinfo" ENDIF
$pcur= 76 gosub "pinfo" ENDIF
$pcur= 77 gosub "pinfo"
$pcur= 78 gosub "pinfo" ; --------------------------------------------------------------------------
$pcur= 79 gosub "pinfo" ; - add "Quickview with Notepad" to menu, when no file association exist -
$pcur= 80 gosub "pinfo" ; --------------------------------------------------------------------------
$pcur= 81 gosub "pinfo"
$pcur= 82 gosub "pinfo" ; - enabling 'quickview with notepad' -
$pcur= 83 gosub "pinfo" IF (ExistKey("HKEY_CLASSES_ROOT\unknown") = 0)
$pcur= 84 gosub "pinfo" $result=AddKey("HKEY_CLASSES_ROOT\unknown\Shell")
$pcur= 85 gosub "pinfo" $result=AddKey("HKEY_CLASSES_ROOT\unknown\Shell\open")
$pcur= 86 gosub "pinfo" $result=AddKey("HKEY_CLASSES_ROOT\unknown\Shell\open\command")
$pcur= 87 gosub "pinfo" ENDIF
$pcur= 88 gosub "pinfo" ;
$pcur= 89 gosub "pinfo" $ikey="HKEY_CLASSES_ROOT\unknown\Shell\open"
$pcur= 90 gosub "pinfo" $ikey_ex=ENUMVALUE($ikey, 0)
$pcur= 91 gosub "pinfo" $default_notepad="Quickview with Notepad"
$pcur= 92 gosub "pinfo" IF (ExistKey($ikey+"\"+$ikey_ex) = 0)
$pcur= 93 gosub "pinfo" $result_data_type=ReadType($ikey, $ikey_ex)
$pcur= 94 gosub "pinfo" ELSE
$pcur= 95 gosub "pinfo" $result_data_type="REG_SZ"
$pcur= 96 gosub "pinfo" ENDIF
$pcur= 97 gosub "pinfo" IF (writevalue($ikey, $ikey_ex, $default_notepad, $result_data_type) = 0)
$pcur= 98 gosub "pinfo" IF (writevalue($ikey, $ikey_ex, $default_notepad, "REG_SZ") = 0)
$pcur= 99 gosub "pinfo" ENDIF
$pcur= 100 gosub "pinfo" ENDIF
$pcur= 101 gosub "pinfo" ;
$pcur= 102 gosub "pinfo" $ikey="HKEY_CLASSES_ROOT\unknown\Shell\open\command"
$pcur= 103 gosub "pinfo" $ikey_ex=ENUMVALUE($ikey, 0)
$pcur= 104 gosub "pinfo" $default_notepad_exe="notepad.exe %1"
$pcur= 105 gosub "pinfo" IF (ExistKey($ikey+"\"+$ikey_ex) = 0)
$pcur= 106 gosub "pinfo" $result_data_type=ReadType($ikey, $ikey_ex)
$pcur= 107 gosub "pinfo" ELSE
$pcur= 108 gosub "pinfo" $result_data_type="REG_SZ"
$pcur= 109 gosub "pinfo" ENDIF
$pcur= 110 gosub "pinfo" IF (writevalue($ikey, $ikey_ex, $default_notepad_exe, $result_data_type) = 0)
$pcur= 111 gosub "pinfo" IF (writevalue($ikey, $ikey_ex, $default_notepad_exe, "REG_SZ") = 0)
$pcur= 112 gosub "pinfo" ENDIF
$pcur= 113 gosub "pinfo" ENDIF
$pcur= 114 gosub "pinfo"
$pcur= 115 gosub "pinfo" ; --------------------------------------------------------------------------
$pcur= 116 gosub "pinfo" ; - change "regfile" + "vbsfile" to edit mode -
$pcur= 117 gosub "pinfo" ; --------------------------------------------------------------------------
$pcur= 118 gosub "pinfo"
$pcur= 119 gosub "pinfo" $ikey="HKEY_CLASSES_ROOT\regfile\shell"
$pcur= 120 gosub "pinfo" $ikey_ex=ENUMVALUE($ikey, 0)
$pcur= 121 gosub "pinfo" $default_key="edit"
$pcur= 122 gosub "pinfo" IF (ExistKey($ikey+"\"+$ikey_ex) = 0)
$pcur= 123 gosub "pinfo" $result_data_type=ReadType($ikey, $ikey_ex)
$pcur= 124 gosub "pinfo" ELSE
$pcur= 125 gosub "pinfo" $result_data_type="REG_SZ"
$pcur= 126 gosub "pinfo" ENDIF
$pcur= 127 gosub "pinfo" IF (ReadValue($ikey, $ikey_ex) <> $default_key)
$pcur= 128 gosub "pinfo" IF (writevalue($ikey, $ikey_ex, $default_key, $result_data_type) = 0)
$pcur= 129 gosub "pinfo" IF (writevalue($ikey, $ikey_ex, $default_key, "REG_SZ") = 0)
$pcur= 130 gosub "pinfo" ENDIF
$pcur= 131 gosub "pinfo" ENDIF
$pcur= 132 gosub "pinfo" $info=$info+" "+$ikey+"="+$default_key
$pcur= 133 gosub "pinfo" ENDIF
$pcur= 134 gosub "pinfo" ;
$pcur= 135 gosub "pinfo" $ikey="HKEY_CLASSES_ROOT\vbsfile\shell"
$pcur= 136 gosub "pinfo" $ikey_ex=ENUMVALUE($ikey, 0)
$pcur= 137 gosub "pinfo" $default_key="edit"
$pcur= 138 gosub "pinfo" IF (ExistKey($ikey+"\"+$ikey_ex) = 0)
$pcur= 139 gosub "pinfo" $result_data_type=ReadType($ikey, $ikey_ex)
$pcur= 140 gosub "pinfo" ELSE
$pcur= 141 gosub "pinfo" $result_data_type="REG_SZ"
$pcur= 142 gosub "pinfo" ENDIF
$pcur= 143 gosub "pinfo" IF (ReadValue($ikey, $ikey_ex) <> $default_key)
$pcur= 144 gosub "pinfo" IF (writevalue($ikey, $ikey_ex, $default_key, $result_data_type) = 0)
$pcur= 145 gosub "pinfo" IF (writevalue($ikey, $ikey_ex, $default_key, "REG_SZ") = 0)
$pcur= 146 gosub "pinfo" ENDIF
$pcur= 147 gosub "pinfo" ENDIF
$pcur= 148 gosub "pinfo" $info=$info+" "+$ikey+"="+$default_key
$pcur= 149 gosub "pinfo" ENDIF
$pcur= 150 gosub "pinfo"
$pcur= 151 gosub "pinfo" ; --------------------------------------------------------------------------
$pcur= 152 gosub "pinfo" ; - cleanup 'recent list' -
$pcur= 153 gosub "pinfo" ; --------------------------------------------------------------------------
$pcur= 154 gosub "pinfo"
$pcur= 155 gosub "pinfo" $max_ikeys=23
$pcur= 156 gosub "pinfo" DIM $ikeys[$max_ikeys+1]
$pcur= 157 gosub "pinfo" $ikeys[01]="HKEY_CURRENT_USER\Software\Binary Research Ltd\Ghost Explorer\Recent File List"
$pcur= 158 gosub "pinfo" $ikeys[02]="HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs"
$pcur= 159 gosub "pinfo" $ikeys[03]="HKEY_CURRENT_USER\Software\Microsoft\Microsoft Management Console\Recent File List"
$pcur= 160 gosub "pinfo" $ikeys[04]="HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Excel\Recent File List"
$pcur= 161 gosub "pinfo" $ikeys[05]="HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\MS Project\Recent File List"
$pcur= 162 gosub "pinfo" $ikeys[06]="HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\PowerPoint\Recent File List"
$pcur= 163 gosub "pinfo" $ikeys[07]="HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Excel\Recent File List"
$pcur= 164 gosub "pinfo" $ikeys[08]="HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\MS Project\Recent File List"
$pcur= 165 gosub "pinfo" $ikeys[09]="HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\PowerPoint\Recent File List"
$pcur= 166 gosub "pinfo" $ikeys[10]="HKEY_CURRENT_USER\Software\Microsoft\Outlook Express\Recent Stationery List"
$pcur= 167 gosub "pinfo" $ikeys[11]="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Paint\Recent File List"
$pcur= 168 gosub "pinfo" $ikeys[12]="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\WordPad\Recent File List"
$pcur= 169 gosub "pinfo" $ikeys[13]="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\DesktopStreamMRU"
$pcur= 170 gosub "pinfo" $ikeys[14]="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Doc Find Spec MRU"
$pcur= 171 gosub "pinfo" $ikeys[15]="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FindComputerMRU"
$pcur= 172 gosub "pinfo" $ikeys[16]="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\PrnPortsMRU"
$pcur= 173 gosub "pinfo" $ikeys[17]="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs"
$pcur= 174 gosub "pinfo" $ikeys[18]="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU"
$pcur= 175 gosub "pinfo" $ikeys[19]="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU"
$pcur= 176 gosub "pinfo" $ikeys[20]="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Preload"
$pcur= 177 gosub "pinfo" $ikeys[21]="HKEY_CURRENT_USER\Software\Netscape\Netscape Navigator\URL History"
$pcur= 178 gosub "pinfo" $ikeys[22]="HKEY_CURRENT_USER\Software\Nico Mak Computing\Winzip\extract"
$pcur= 179 gosub "pinfo" $ikeys[23]="HKEY_CURRENT_USER\Software\Nico Mak Computing\Winzip\filemenu"
$pcur= 180 gosub "pinfo" ;
$pcur= 181 gosub "pinfo" $i=1
$pcur= 182 gosub "pinfo" WHILE ($i <= $max_ikeys)
$pcur= 183 gosub "pinfo" $ikey=$ikeys[$i]
$pcur= 184 gosub "pinfo" $i=$i+1
$pcur= 185 gosub "pinfo" IF (ExistKey($ikey) = 0)
$pcur= 186 gosub "pinfo" IF ($debug_mode = "yes")
$pcur= 187 gosub "pinfo" ? "input -> ["+$ikey+"]"
$pcur= 188 gosub "pinfo" ENDIF
$pcur= 189 gosub "pinfo" $index=0
$pcur= 190 gosub "pinfo" DO
$pcur= 191 gosub "pinfo" $icode=ENUMVALUE($ikey, $index)
$pcur= 192 gosub "pinfo" IF (len($icode) <> 0)
$pcur= 193 gosub "pinfo" $ivalue=ReadValue($ikey, $icode)
$pcur= 194 gosub "pinfo" $result=DelValue($ikey, $icode)
$pcur= 195 gosub "pinfo" IF ($debug_mode = "yes")
$pcur= 196 gosub "pinfo" IF ($result = 0)
$pcur= 197 gosub "pinfo" ? " "+$icode+"="+$ivalue
$pcur= 198 gosub "pinfo" ELSE
$pcur= 199 gosub "pinfo" ? " error "+$icode+"="+$ivalue+" -> "+$result
$pcur= 200 gosub "pinfo" ENDIF
$pcur= 201 gosub "pinfo" ENDIF
$pcur= 202 gosub "pinfo" IF ($result <> 0)
$pcur= 203 gosub "pinfo" $index=$index+1
$pcur= 204 gosub "pinfo" ENDIF
$pcur= 205 gosub "pinfo" ENDIF
$pcur= 206 gosub "pinfo" UNTIL (len($icode) = 0)
$pcur= 207 gosub "pinfo" $index=$index+1
$pcur= 208 gosub "pinfo" DO
$pcur= 209 gosub "pinfo" $icode=ENUMVALUE($ikey, $index)
$pcur= 210 gosub "pinfo" IF (len($icode) <> 0)
$pcur= 211 gosub "pinfo" $ivalue=ReadValue($ikey, $icode)
$pcur= 212 gosub "pinfo" $result=DelValue($ikey, $icode)
$pcur= 213 gosub "pinfo" IF ($debug_mode = "yes")
$pcur= 214 gosub "pinfo" IF ($result = 0)
$pcur= 215 gosub "pinfo" ? " "+$icode+"="+$ivalue
$pcur= 216 gosub "pinfo" ELSE
$pcur= 217 gosub "pinfo" ? " error "+$icode+"="+$ivalue+" -> "+$result
$pcur= 218 gosub "pinfo" ENDIF
$pcur= 219 gosub "pinfo" ENDIF
$pcur= 220 gosub "pinfo" IF ($result <> 0)
$pcur= 221 gosub "pinfo" $index=$index+1
$pcur= 222 gosub "pinfo" ENDIF
$pcur= 223 gosub "pinfo" ENDIF
$pcur= 224 gosub "pinfo" UNTIL (len($icode) = 0)
$pcur= 225 gosub "pinfo" ENDIF
$pcur= 226 gosub "pinfo" LOOP
$pcur= 227 gosub "pinfo" ;
$pcur= 228 gosub "pinfo" $ikey="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
$pcur= 229 gosub "pinfo" IF (Exist($ikey) = 0)
$pcur= 230 gosub "pinfo" $ivalue=ReadValue($ikey, "Recent")
$pcur= 231 gosub "pinfo" IF ($debug_mode = "yes")
$pcur= 232 gosub "pinfo" ? "recent.user_shell_folders -> "+$ivalue+"="+ExpandEnvironmentVars($ivalue)
$pcur= 233 gosub "pinfo" ENDIF
$pcur= 234 gosub "pinfo" IF (len($ivalue) <> 0)
$pcur= 235 gosub "pinfo" DEL ExpandEnvironmentVars($ivalue)+"\*.lnk"
$pcur= 236 gosub "pinfo" ENDIF
$pcur= 237 gosub "pinfo" ENDIF
$pcur= 238 gosub "pinfo" ;
$pcur= 239 gosub "pinfo" $ikey="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
$pcur= 240 gosub "pinfo" IF (Exist($ikey) = 0)
$pcur= 241 gosub "pinfo" $ivalue=ReadValue($ikey, "Recent")
$pcur= 242 gosub "pinfo" IF ($debug_mode = "yes")
$pcur= 243 gosub "pinfo" ? "recent.shell_folders -> "+$ivalue+"="+ExpandEnvironmentVars($ivalue)
$pcur= 244 gosub "pinfo" ENDIF
$pcur= 245 gosub "pinfo" IF (len($ivalue) <> 0)
$pcur= 246 gosub "pinfo" DEL ExpandEnvironmentVars($ivalue)+"\*.lnk"
$pcur= 247 gosub "pinfo" ENDIF
$pcur= 248 gosub "pinfo" ENDIF
$pcur= 249 gosub "pinfo" ;
$pcur= 250 gosub "pinfo" DEL "c:\ffastun*.*"
$pcur= 251 gosub "pinfo" DEL "c:\file*.chk"
$pcur= 252 gosub "pinfo" DEL "c:\temp\~*.*"
$pcur= 253 gosub "pinfo" DEL "c:\temp\*.~*"
$pcur= 254 gosub "pinfo" DEL "c:\temp\*.??~"
$pcur= 255 gosub "pinfo" DEL "c:\temp\*.tmp"
$pcur= 256 gosub "pinfo" DEL "c:\temp\mscreate.dir"
$pcur= 257 gosub "pinfo" DEL "c:\temp\*.---"
$pcur= 258 gosub "pinfo" IF ($nt_mode = "yes")
$pcur= 259 gosub "pinfo" DEL "c:\winnt\~*.*"
$pcur= 260 gosub "pinfo" DEL "c:\winnt\*.~*"
$pcur= 261 gosub "pinfo" DEL "c:\winnt\*.??~"
$pcur= 262 gosub "pinfo" DEL "c:\winnt\*.tmp"
$pcur= 263 gosub "pinfo" DEL "c:\winnt\mscreate.dir"
$pcur= 264 gosub "pinfo" DEL "c:\winnt\*.---"
$pcur= 265 gosub "pinfo" DEL "c:\winnt\temp\~*.*"
$pcur= 266 gosub "pinfo" DEL "c:\winnt\temp\*.~*"
$pcur= 267 gosub "pinfo" DEL "c:\winnt\temp\*.??~"
$pcur= 268 gosub "pinfo" DEL "c:\winnt\temp\*.tmp"
$pcur= 269 gosub "pinfo" DEL "c:\winnt\temp\mscreate.dir"
$pcur= 270 gosub "pinfo" DEL "c:\winnt\temp\*.---"
$pcur= 271 gosub "pinfo" ELSE
$pcur= 272 gosub "pinfo" DEL "c:\windows\~*.*"
$pcur= 273 gosub "pinfo" DEL "c:\windows\*.~*"
$pcur= 274 gosub "pinfo" DEL "c:\windows\*.??~"
$pcur= 275 gosub "pinfo" DEL "c:\windows\*.tmp"
$pcur= 276 gosub "pinfo" DEL "c:\windows\mscreate.dir"
$pcur= 277 gosub "pinfo" DEL "c:\windows\*.---"
$pcur= 278 gosub "pinfo" DEL "c:\windows\temp\~*.*"
$pcur= 279 gosub "pinfo" DEL "c:\windows\temp\*.~*"
$pcur= 280 gosub "pinfo" DEL "c:\windows\temp\*.??~"
$pcur= 281 gosub "pinfo" DEL "c:\windows\temp\*.tmp"
$pcur= 282 gosub "pinfo" DEL "c:\windows\temp\mscreate.dir"
$pcur= 283 gosub "pinfo" DEL "c:\windows\temp\*.---"
$pcur= 284 gosub "pinfo" ENDIF
$pcur= 285 gosub "pinfo" ;
$pcur= 286 gosub "pinfo" $max_ikeys=8
$pcur= 287 gosub "pinfo" DIM $ikeys[$max_ikeys+1]
$pcur= 288 gosub "pinfo" DIM $sub_ikeys[$max_ikeys+1]
$pcur= 289 gosub "pinfo" $ikeys [01]="HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\4.0\AdobeViewer"
$pcur= 290 gosub "pinfo" $sub_ikeys[01]="AVPrecentFile" ; <nr>
$pcur= 291 gosub "pinfo" $ikeys [02]="HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\4.0\AdobeViewer"
$pcur= 292 gosub "pinfo" $sub_ikeys[02]="AVPrecentFile" ; <nr>
$pcur= 293 gosub "pinfo" $ikeys [03]="HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Access\Settings"
$pcur= 294 gosub "pinfo" $sub_ikeys[03]="MRU" ; <nr>
$pcur= 295 gosub "pinfo" $ikeys [04]="HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Access\Settings"
$pcur= 296 gosub "pinfo" $sub_ikeys[04]="MRUFlags" ; <nr>
$pcur= 297 gosub "pinfo" $ikeys [05]="HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Access\Settings"
$pcur= 298 gosub "pinfo" $sub_ikeys[05]="MRU" ; <nr>
$pcur= 299 gosub "pinfo" $ikeys [06]="HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Access\Settings"
$pcur= 300 gosub "pinfo" $sub_ikeys[06]="MRUFlags" ; <nr>
$pcur= 301 gosub "pinfo" $ikeys [07]="HKEY_CURRENT_USER\Software\Microsoft\Photo Editor\3.0\Microsoft Photo Editor"
$pcur= 302 gosub "pinfo" $sub_ikeys[07]="LastFile" ; <nr>
$pcur= 303 gosub "pinfo" $ikeys [08]="HKEY_CURRENT_USER\Software\Microsoft\Photo Editor\3.0\Microsoft Photo Editor"
$pcur= 304 gosub "pinfo" $sub_ikeys[08]="LastType" ; <nr>
$pcur= 305 gosub "pinfo" ;
$pcur= 306 gosub "pinfo" $i=1
$pcur= 307 gosub "pinfo" WHILE ($i <= $max_ikeys)
$pcur= 308 gosub "pinfo" $ikey=$ikeys[$i]
$pcur= 309 gosub "pinfo" $sub_ikey=$sub_ikeys[$i]
$pcur= 310 gosub "pinfo" IF (ExistKey($ikey) = 0)
$pcur= 311 gosub "pinfo" IF ($debug_mode = "yes")
$pcur= 312 gosub "pinfo" ? "input -> ["+$ikey+"]+["+$sub_ikey+"??]"
$pcur= 313 gosub "pinfo" ENDIF
$pcur= 314 gosub "pinfo" $k=0
$pcur= 315 gosub "pinfo" WHILE ($k <= 10)
$pcur= 316 gosub "pinfo" $ivalue=ReadValue($ikey, $sub_ikey+$k)
$pcur= 317 gosub "pinfo" $result=DelValue($ikey, $sub_ikey+$k)
$pcur= 318 gosub "pinfo" IF ($debug_mode = "yes")
$pcur= 319 gosub "pinfo" IF ($result = 0)
$pcur= 320 gosub "pinfo" ? " "+$sub_ikey+$k+"="+$ivalue
$pcur= 321 gosub "pinfo" ELSE
$pcur= 322 gosub "pinfo" ; ? " error "+$sub_ikey+$k+"="+$ivalue+" -> "+$result
$pcur= 323 gosub "pinfo" ENDIF
$pcur= 324 gosub "pinfo" ENDIF
$pcur= 325 gosub "pinfo" $k=$k+1
$pcur= 326 gosub "pinfo" LOOP
$pcur= 327 gosub "pinfo" ENDIF
$pcur= 328 gosub "pinfo" $i=$i+1
$pcur= 329 gosub "pinfo" LOOP
$pcur= 330 gosub "pinfo" ;
$pcur= 331 gosub "pinfo" $info=$info+" cleanup.recent"
$pcur= 332 gosub "pinfo"
$pcur= 333 gosub "pinfo" ; --------------------------------------------------------------------------
$pcur= 334 gosub "pinfo"
$pcur= 335 gosub "pinfo" :end_script
$pcur= 336 gosub "pinfo" IF ($debug_mode = "yes")
$pcur= 337 gosub "pinfo" ? $info
$pcur= 338 gosub "pinfo" ENDIF
$pcur= 339 gosub "pinfo" BREAK on
$pcur= 340 gosub "pinfo" FLUSHKB
$pcur= 341 gosub "pinfo" :end

;($begin)
;
; wed 06-sep-2000 05:32:10
;
;Informative KIXSTRIP: no errors found.
;
;Informative KIXSTRIP: 56 block_structures found.
;Informative KIXSTRIP: 2 labels found.
;Summary KIXSTRIP: CALL EXIT GOSUB GOTO QUIT RETURN RUN SHELL USE
;
;($end)

at (9,25) "Starting Windows...completed"
at (20,1) " "
exit
:pinfo
$pstop=341
IF ($pcur <= 1)
cls
at (9,30) "Starting Windows..."
box (10,5,12,75,"single")
box (14,5,16,75,"single")
$pcolumn=6
ENDIF
$ppercentage=(100*$pcur)/$pstop
IF ($pcolumn > 74)
$pcolumn=6
ENDIF
$pcolumn=6+((74-6)*$ppercentage)/100
at (11,$pcolumn) CHR(166)
at (13,37) $ppercentage " %"
at (15,37) $pcur " .. " $pstop
return


Greetings.


ShawnAdministrator
(KiX Supporter)
2000-09-06 02:02 PM
Re: I want to add a progress bar in my login script

MCA:

VERY CLEVER !

Taking this one step further - is there any way you can think of to build a KiX performance analyzer.

It could produce a detailed (by line or construct) listing showing elapsed time breakdown (breakout?).

This would be an invaluable tool to analyze logon script performance issues.


Shawn

[This message has been edited by Shawn (edited 06 September 2000).]

MCA
(KiX Supporter)
2000-09-06 10:08 PM
Re: I want to add a progress bar in my login script

Shawn,

We are already thinking about the creation of performance analyze tool for Kixtart scripts.
Currently we are using ideas of it. Reason: everybody thinks the script is slow, but mostly the usage of roaming profiles slowdown the performance of logon-process.

Our ideas are:


  • current construction will be used for creation of a detail report. not only the current position of script will be logged, but also the amount of lines executed will be logged. the impact of "LOOP" can influence the progress of a script enormously.
  • additional code can be added without influencing the script code. example of such command can be: ";($analyze)".
  • making subroutine an external script. so anyone can modify it easily.

All ideas for implementation of it are welcome.
Greetings.

BoxKite
(Hey THIS is FUN)
2000-09-07 01:42 AM
Re: I want to add a progress bar in my login script

I can't see the forrest for the trees"

I have a request. When all is said and done. Will someone post the final results of subject in a new post.

After reading 3 pages it's all a blurr. I'm an old man and my memory retention just can't handle 3 pages.

Thanks ahead of time.



MCA
(KiX Supporter)
2000-09-07 05:48 AM
Re: I want to add a progress bar in my login script

I will open a new item which will reference to this topic.
An update of our program will be there.
Greetings.


BoxKite
(Hey THIS is FUN)
2000-09-08 09:53 PM
Re: I want to add a progress bar in my login script

Jochen;

Just for your kids from all the guys at the fourm:

code:
BREAK ON
CLS
COLOR w+/n
AT(9,30) "Starting Update..."
COLOR b+/n
BOX(10,10,12,65,"single")
$COL = 12
SETASCII("on")
WHILE $COL < 64
COLOR b+/n
select
case $col < 32
color r+/n
$sign = chr(1) ; chr(176) for block bar "/"
case $col < 48
color y+/n
$sign = chr(2) ; chr(178) for block bar "\"
case $col < 64
color g+/n
$sign = chr(3) ; chr(177) for block bar "H"
endselect
AT(11,$COL) $sign
$COL = $COL + 1
$Y = 100 * ($COL - 12) / 52
IF ($COL & RND() ) = 0 ; simulate activiity
SLEEP 1
ENDIF
COLOR w+/n
AT(13,37) "$Y %"

LOOP
COLOR w/n
AT(15,0) "Hit any key to continue..." get $k
SETASCII("off")
EXIT


This code will give you the complete ASCII table:

code:
setascii("on")
$a = 1
cls
while $a < 6 ;Change this value to get more or less numbers
$y = 1
while $y <= 80
$z = 1
while $z <= 20
at($z,$y) "$x " + chr($x)
$z = $z + 1
$x = $x + 1
loop
$y = $y + 10
loop
? shell "%comspec% /c pause"
$a = $a + 1
loop
exit


------------------
BoxKite
FACTA NON VERBA

ShawnAdministrator
(KiX Supporter)
2000-09-08 10:07 PM
Re: I want to add a progress bar in my login script

Box:

I'm posting for four reasons:

1) Cool scripts, especially the ascii table !

2) Jochen went on holidays for two weeks.
I miss him already !

3) I want to contribute to making
this thread exceed 3 pages ! Think
the Perl script will "blow up real good" ?

4) Question - where the hell is CJ ? I
thought that he would've written a
version of this progress bar that would
"blow up" into itty pieces at the end
(like in the intro to his battleship game).

Shawn.


[This message has been edited by Shawn (edited 08 September 2000).]

cj
(MM club member)
2000-09-12 10:31 PM
Re: I want to add a progress bar in my login script

Hiya!

Did someone call? I have been out of work and not playing with KiX for some time now

I have been playing with Delphi instead and you can see the results at my home page on the software page (click the 5 inch disk).

I would recommend the Fish Counter. It shows you on a second by second basis how much money you have earned. Just enter your hourly rate and click the clock to start.

As for the progress bar, I would prob just make a delphi program to do it and you just call it from KiX

or

something like
[code]

? "Loading..."
shell "blah blah.exe"
"."
shell "blah blah.exe"
"."
shell "blah blah.exe"
"."
shell "blah blah.exe"
"."
shell "blah blah.exe"
"done!"
[no code]

Yeah, it's lame, but like I said - Delphi

How have you guys been anyway?

cj

P.S. I am making a Delphi version of the battleships game too - it's only part done, but is work-in-progress - have a look on the software page.


hmmm, I wonder...
ubb.execute: print"[This message has been edited by cj (edited 12 September 2000).]"

[This message has been edited by cj (edited 12 September 2000).]

Paul_Berquam
(Hey THIS is FUN)
2000-09-21 11:10 PM
Re: I want to add a progress bar in my login script

Morbid, I would be interesting in checking out the VB app that you wrote

Thanks

JochenAdministrator
(KiX Supporter)
2000-09-22 07:53 AM
Re: I want to add a progress bar in my login script

Hey Shawn ,
thanx for missin' [*Yearn*]

actually writing (still) on that script Bryce helped me twice 3 weeks ago ....
Guess Why !
Yap , the progress bar !!!
-> managed to implement it easily with a reference counter in the monster loop ... in
the test phase i worked with 682 Workstations to loop so it was always 100 % done ... then came the phase i wanted bring the main and 'purge log' - script in to a single one and worked 'offline' only with 5
WSs ---- and faced 'the thing that should not be' [ ] *integer bloody integer* !!!!
Reference count less than length of bar returns rounding errors,
3 Workstations blows up to 300 % ....
So i have to go back to my math roots and do some counter measures !

Bryce : will post as promised soon !

J.

[ ]
won't c ya so often the next time ....
THEM had cut off the Proxy while i was on holiday [raaah!!!]
so i have to Dial in from now on [garrrgl]
[/ ]

[This message has been edited by jpols (edited 22 September 2000).]

b.t.w. BOX: Very nice ASCII & bar -Scripts !

[This message has been edited by jpols (edited 22 September 2000).]

Uuuups , and another typo

[This message has been edited by jpols (edited 22 September 2000).]

**DONOTDELETE**
(Lurker)
2000-09-22 04:47 PM
Re: I want to add a progress bar in my login script

Paul, I will get the VB source up on my web site this afternoon. Once up, I will post another message here...

**DONOTDELETE**
(Lurker)
2000-09-22 10:48 PM
Re: I want to add a progress bar in my login script

JPols,

Can this little snippet be of use to you?

code:

$pbPercent = (($numerator * 1000) / $denominator)
$pbPercent = $pbPercent / 10

Just another way to come up with 100%...

Paul

JochenAdministrator
(KiX Supporter)
2000-09-23 11:14 AM
Re: I want to add a progress bar in my login script

Certainly Sir,
deep in mind i knew that i have to blow the integers up to max possible to keep rounding errors low...
Thanx Paul for Kixtarting my poor overstressed brain

Greets Jochen

JochenAdministrator
(KiX Supporter)
2000-09-25 01:20 PM
Re: I want to add a progress bar in my login script

Paul,

didn't saw the forrest for the trees !
It wasn't caused by 'rounding errors' but
by additional lines in the logfiles that worked against my ref_count ...
It was a colleague that saw it after looking 2 minutes to my script...SHAME!!!
[*Jochen thinks of giving back his Existence-licence*]

will post soon
J.

[This message has been edited by jpols (edited 25 September 2000).]

**DONOTDELETE**
(Lurker)
2000-10-24 04:56 PM
Re: I want to add a progress bar in my login script

Paul and all... sorry about the delay, but I finally got the Visual Basic status window up on my web site. The site doesn't refer to the page yet, so you'll need to hit the page directly. http://www.primenet.com/~morbid/Applications/Kix-Status


**DONOTDELETE**
(Lurker)
2000-10-26 04:41 PM
Re: I want to add a progress bar in my login script

Sorry... the animation file is now included with the kix-status distribution.

**DONOTDELETE**
(Lurker)
2000-10-30 03:28 PM
Re: I want to add a progress bar in my login script

er, eh.... well, as was originally intended, the source is now included with the archive. Sorry for the inconvenience, but I am not accustomed to including the source code for my applications....


ShawnAdministrator
(KiX Supporter)
2001-10-05 03:03 PM
Re: I want to add a progress bar in my login script

One more concept bar for posterity ...

break on
color w+/b
cls
box(0,0,24,80,chr(176))
$wait = 40 ; max number of seconds to wait
$count = 0 ; count of seconds so far
color w+/n
box(7,22,18,52," ")
color w+/b+
box(5,20,16,50,"single")
at(8,25) "Installing software..."
box(10,22,12,48,"single")
$c = 0
while exist ("c:\ready.txt") = 0 and $count < $wait
sleep 1
$count=$count+1
color w+/b+
at(11,$c+23) chr(166)
color w/n
$c = $c + 1
if $c = 25
color w+/b+
at(11,23)" "
color w/n
$c = 0
endif
loop
color w/n
cls
exit

-Shawn

[this is still one of my favorite thread of all time ...]