Page 1 of 1 1
Topic Options
#17518 - 2002-02-15 06:15 AM Please help me with a simple script;
Darvish Offline

Registered: 2002-02-15
Posts: 2
Loc: East Hartford
Please excuse my ignorance but I’m very new to Kixtart and scripting. I’m trying to write a script for a mixed environment such as windows95, windows 98, windows 2000 and XP. For the first time the script is supposed to copy some files to users machines, put some icons on their desktops, set their home page in IE and open the IE automatically via the login, after the first time all the script has do is to open the IE after the login. I know I’m asking too much but I would truly appreciate it if someone would tell me how to do this.
#17519 - 2002-02-15 06:27 AM Re: Please help me with a simple script;
Les Offline
KiX Master

Registered: 2001-06-11
Posts: 12734
Well, a good place to start is with the manual. Have you downloaded the html help file from

Let's start with a few macros.

File copy is pretty basic stuff.

Icons on the desktop... well that could be a bit more work depending on OS. You could try the built-in functions or better yet check out the UDFs in our UDF Library.

Then for starting IE after the logon, check the UDF section or search for RunOnce.

Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

#17520 - 2002-02-16 12:30 AM Re: Please help me with a simple script;
Radimus Moderator Offline

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
if you are using version 4 of kix then this is pretty simple...

use select/case around @producttype to handle variations in OS (like where the desktop is)
for example:
case @producttype=“Windows 95” $desktop="c:\windows\desktop"
case @producttype=“Windows NT Workstation” $desktop="c:\winnt\profiles\@userid\desktop"
case @producttype=“Windows 2000 Professional” $desktop="C:\Documents and Settings\@userid\desktop"

now you can copy the shortcuts there or files or whatever.

copy "\\server\share\desktop_stuff\*.*" "$desktop"

It is a start...

[ 15 February 2002: Message edited by: Radimus ]

[ 15 February 2002: Message edited by: Radimus ]

How to ask questions the smart way <-----------> Before you ask

#17521 - 2002-02-17 03:16 AM Re: Please help me with a simple script;
MCA Offline
KiX Supporter

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU

The usage of registry values may reduce your script length and is more universal
for different windows versions.
Our example:


; - calculate desktop location and copy shortcuts to your desktop -
$desktop=ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")
IF (Substr($desktop,len($desktop),1) <> "\")
COPY "\\server\share\*.lnk" "$desktop" /H
; - set IE
IF WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main","Start Page","","REG_SZ") <> 0)
? "Warning KIX: error @error (@serror)"
; - start IE
$start_page=ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main","Start Page")
RUN '%comspec% /c start $start_page '

email homepage | Links | Summary of Site Site KiXforms FAQ library collection mirror MCA | FAQ & UDF help file UDF library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Page 1 of 1 1

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

Who's Online
1 registered (Lonkero) and 175 anonymous users online.
Newest Members
gkustra, emnipetro, Hirze, thequeen, ameliaryan
17642 Registered Users

Generated in 0.121 seconds in which 0.096 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google: