Page 1 of 1 1
Topic Options
#16544 - 2002-01-23 10:55 PM Getting Files
pwoodell Offline
Fresh Scripter

Registered: 2002-01-23
Posts: 5
I want my users to run a script, that will go to my fileserver, and get the latest *.exe files from a directory, and copy them to the local C: drive, and also block users from editing the registry, or changing any network settings. Could someone send me in the right direction?

Thanks,

PHil

Top
#16545 - 2002-01-24 02:37 AM Re: Getting Files
CCU Offline
Lurker

Registered: 2002-01-23
Posts: 4
It would be fairly easy to use the getfiletime() function to compare the date/times of the .exe files and determine if they need updating. Then either use a KIX copy statement or shell out and use xcopy.

For restricting users from editing the registry or network settings I would first take a look at network policies using poledit.exe. You can set these up fairly quickly to do just what you're asking. I have also successfully used a KIX script to emulate network policies by directly updating the registry.

I can post some sample code if you would like...

Michael F.

Top
#16546 - 2002-01-24 09:28 AM Re: Getting Files
sh0rt Offline
Lurker

Registered: 2002-01-21
Posts: 3
the Thing about file compare would be great!
That`s a think i realy would love

We`re developing a Product which is in a testing stadium atm and there are pre-releases all the time

Hmm if u could post how to compare the files would be nice.


Top
#16547 - 2002-01-25 05:07 AM Re: Getting Files
MCA Offline
KiX Supporter
*****

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

Phil & sh0rt, both welcome to the board.

Phil
Using policies can block users from editing the registry, but with only two
lines we can remove those blockade and we can start REGEDIT.
You advice you also to remove the REGEDIT and REGEDT32 files from your
clients. As administrator you can start it from your server or from a
floppy for local usage.

The internal commands XCOPY and XCOPY32 are very good for copying files
based on differences. The type of parameters can be different for your
windows version.
An example of possible parameters are:

quote:


Copies files and directory trees.

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/W]
[/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U]
[/K] [/N]

source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies files with the archive attribute set,
doesn't change the attribute.
/M Copies files with the archive attribute set,
turns off the archive attribute.
/D:date Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones.
Same as /S /E. May be used to modify /T.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one file,
assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files that would be copied.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files. Does not
include empty directories or subdirectories. /T /E includes
empty directories and subdirectories.
/U Updates the files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only attributes.
/Y Overwrites existing files without prompting.
/-Y Prompts you before overwriting existing files.
/N Copy using the generated short names.



A possible call can be:
XCOPY \\server\sharename\*.exe c:\directory.path\. /C /H /Q /R /Y

Phil & sh0t we are using our script dircompare.kix which you can
find on our site http://home.wanadoo.nl/scripting which will synchronize
destination directory with source directory. So it will not only add and update files
but also it remove them.

(symbol on our homepage has been linked to related http://kixtart.org topic)

greetings.

[ 25 January 2002: Message edited by: MCA ]

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#16548 - 2002-01-25 04:08 PM Re: Getting Files
pwoodell Offline
Fresh Scripter

Registered: 2002-01-23
Posts: 5
MCA,sh0rt, CCU:

Thanks for the quick replies, MCA I actually found that script after posting, I am working on editing it for my needs now. I will post when done.

PHil

Top
#16549 - 2002-01-25 04:13 PM Re: Getting Files
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You could also use COMPAREFILEVERSIONS() if yo're dealing with .EXe, DLL, or .OCX that have versioning information embedded. Of cource, the best way might be to use a combination of both comparing filetimes and fileversions. A demonstration of this method can be found at http://kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=12&t=000149
_________________________
There are two types of vessels, submarines and targets.

Top
#16550 - 2002-04-30 01:33 AM Re: Getting Files
MCA Offline
KiX Supporter
*****

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

Our script dircompare.kix has been updated.
  • major fix: "deltree" problem. previously SHELL call doesn't remove directories.
  • add: additional debugging information to screen.
  • add: "deltree" command will not destroy screen layout.
greetings.
btw: symbol on our homepage has been linked to related http://kixtart.org topic.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
Page 1 of 1 1


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

Who's Online
0 registered and 1160 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

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

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org