Page 1 of 2 12>
Topic Options
#144984 - 2005-08-06 04:13 AM ok, here's an easy one
oscar Offline
Fresh Scripter

Registered: 2005-07-28
Posts: 17
i have a folder on my machine with an install file in it.
i want to get a remote computer to run the install file from my machine.
after this is done, i want to delete everything out of the temp folder on that remote machine.

Top
#144985 - 2005-08-06 04:49 AM Re: ok, here's an easy one
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Sounds cool. And what exactly would you like from us?

Sorry, but I can guess at a lot of things, but could be a waste of time. Perhaps you could give us some more details.

The UDF forum has ready made scripts to do most things.

Top
#144986 - 2005-08-06 11:15 AM Re: ok, here's an easy one
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL

Yeah, Good Luck Oscar!!!
_________________________
Co


Top
#144987 - 2005-08-07 05:03 AM Re: ok, here's an easy one
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
And what's that with the seven shit-stars? Level of script complexity?
_________________________
There are two types of vessels, submarines and targets.

Top
#144988 - 2005-08-07 12:51 PM Re: ok, here's an easy one
oscar Offline
Fresh Scripter

Registered: 2005-07-28
Posts: 17
ok.... how do i get the remote computer to run the file from the install folder on the local computer.
and....

how do i get the remote computer to delete the contents of the temp folder without deleting the temp folder itself?

better??

Top
#144989 - 2005-08-07 01:33 PM Re: ok, here's an easy one
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Search the UDF Forum:

You can use: CleanDirectory() - Cleans up the temporary directories (or any arbitrary directory) to clean the temp directory.

You can use one of the task scheduler UDF's like: SCHEDULETASK() - Schedules a task on any computer using the Task Scheduler to run the file on the remote computer.


Edited by Co (2005-08-07 01:34 PM)
_________________________
Co


Top
#144990 - 2005-08-07 02:13 PM Re: ok, here's an easy one
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Quote:

, etc.....better??




Oscar,

Let me tell you something about the Kixtart community...

This is one of best or better said the best BB I know. There are lots of respectable members who want to help you. But don't think they make a 100% fitting solution because you ask for it. PPL help you because they love KiXtart. Nobody get paid for it so they can only point you in a right direction. You have to do it by yourself. Search the board, read the manual, use someone else his script, modify it, etc.

Subjects like "Here's an easy one" doesn't help you because if it is easy why didn't you create it by yourself?
Next time tell what you want with your script. Tell what you already did. Post your script, even if it is full of errors... Show the other members you did everything you could and I know for sure they'll help you out...


Good luck...
_________________________
Co


Top
#144991 - 2005-08-07 08:51 PM Re: ok, here's an easy one
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Hmmm... Okay, as I view what I think you're asking is a very unsecure operation.

1. Allow a remote computer to run something from my system
  (I would need to share my folder and give permissions)
2. Assuming I want to initiate the install would mean
  (The remote execution would need to run a remote execution against MY system which would mean it would need ADMIN rights on MY system.)
 
NOT a good thing. In theory alone I think it could be done, but I would not do it myself except maybe as an experiment to prove or disprove that it could be done.

A. What is the bottom line here?
B. What do you want to happen in detail?
C. Do you want to install some software on the remote computer?
D. What OS is the remote computer?
E. How many computers do you want to run this against?
F. What version of KiXtart are you using?

Please answer ALL of these questions in order for us to better assist you. Quit being cheap with your words if you really want help. No one here has magical mind reading powers. As CO said, we're quite willing to assist you, but not if you won't work with us better

RemoteExec UDF might be a good place to start
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=83206

But again, we're back to GUESSING what you're really wanting to achieve here.

Top
#144992 - 2005-08-08 04:14 AM Re: ok, here's an easy one
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I'm guessing he want to push out VNC and then cover his tracks.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#144993 - 2005-08-08 10:18 PM Re: ok, here's an easy one
StarwarsKid Offline
Seasoned Scripter
*****

Registered: 2005-06-15
Posts: 506
Loc: Oregon, USA
Hmm, in your scenario, he either has savvy users or wants total stealth for some reason.
_________________________
let the wise listen and add to their learning,
and let the discerning get guidance- Proverbs 1:5

Top
#144994 - 2005-08-08 10:34 PM Re: ok, here's an easy one
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
he wants...
hmm... I think he wants wmi impersonation script to run on remote computer...
but then he also wants to first copy the install stuff there instead of failing to execute from remote.
_________________________
!

download KiXnet

Top
#144995 - 2005-08-08 11:07 PM Re: ok, here's an easy one
StarwarsKid Offline
Seasoned Scripter
*****

Registered: 2005-06-15
Posts: 506
Loc: Oregon, USA
Yes, in general, speculation CAN be a dangerous, fruitless, misleading thing. It's hard to corral the inquisitive mind when the source of information is silent and the problem is yet unsolved.
_________________________
let the wise listen and add to their learning,
and let the discerning get guidance- Proverbs 1:5

Top
#144996 - 2005-08-10 02:41 AM Re: ok, here's an easy one
oscar Offline
Fresh Scripter

Registered: 2005-07-28
Posts: 17
A. What is the bottom line here?
B. What do you want to happen in detail?
C. Do you want to install some software on the remote computer?
D. What OS is the remote computer?
E. How many computers do you want to run this against?
F. What version of KiXtart are you using?
..................................................
sorry guys, i know i havent been very clear about this, just trying to get used to this type of forum. Im starting to understand where to go for what, but at first i was kinda lost because there is so much info here.
Thank you for your patience and concern.

A,B,C: the bottom line is that there are users all logged onto these systems, and im trying to push out different installs without having to disturb every person while i do so. It takes time to log them out ,log in as admin, install, then log out, then log them in again.
i have tried "rexec", and that does wonders bc i dont have to log them out, i can run the file as admin, and walk over, and hit "next" a few times, and "ok",and then im done. but im trying to not have to fill up their "temp" folders with all these installs, so i would like to run them remotely from a shared folder, or if i have to run them from their pcs, i need to delete them right after the install is over with.
Thank you Co for the "cleandirectory()" that may help a lot.
D.I use xp pro, they use win2000
E.about 200, thank goodness for loop statements =)
F.kix 2001 ver 4.02

Top
#144997 - 2005-08-10 02:51 AM Re: ok, here's an easy one
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, to clarify, if you want to go remote, you most likely need to take control of the machine and a way to do that is to impersonate yourself as the systems' local admin.
now, that local admin has no rights to go around in your network and thus no, you can't install from remote drive.

you need to first copy the stuff there and then do exec and then clean the install files.
anyways, you shouldn't consider any directory cleaning.
many installs don't even release all files before next reboot.

thus, you just copy the installer, do the job and remove it.
rest of the files are most likely just garbage and suitable for the system's drive.
and no, it won't go to the users temp.
_________________________
!

download KiXnet

Top
#144998 - 2005-08-10 04:44 AM Re: ok, here's an easy one
oscar Offline
Fresh Scripter

Registered: 2005-07-28
Posts: 17
Quote:

so, to clarify, if you want to go remote, you most likely need to take control of the machine and a way to do that is to impersonate yourself as the systems' local admin.
now, that local admin has no rights to go around in your network and thus no, you can't install from remote drive.

you need to first copy the stuff there and then do exec and then clean the install files.
anyways, you shouldn't consider any directory cleaning.
many installs don't even release all files before next reboot.

thus, you just copy the installer, do the job and remove it.
rest of the files are most likely just garbage and suitable for the system's drive.
and no, it won't go to the users temp.




i have it working now to where it copies the files to the users temp directory on c:, then rexec as administrator, then reboots the pc.
-i was thinking of using "cleandirectory()" to delete the file after the install is over.

Top
#144999 - 2005-08-10 04:51 AM Re: ok, here's an easy one
oscar Offline
Fresh Scripter

Registered: 2005-07-28
Posts: 17
i found this in the udfs at http://jokeli.isa-geek.com/UDF/
i may try this if cleandirectory doesnt work.

Function DelDir($Pathname)
Dim $Filename $Filename = Dir($Pathname + "\*.*")
While $Filename <> "" And @ERROR = 0
If $Filename <> "." And $Filename <> ".."
If (GetFileAttr($Pathname + "\" + $Filename) & 16)
DelDir($Pathname + "\" + $Filename)
SetFileAttr($Pathname + "\" + $Filename, 128)
Rd ($Pathname + "\" + $Filename)
Else
SetFileAttr($Pathname + "\" + $Filename, 128)
Del ($Pathname + "\" + $Filename)
EndIf
EndIf
$Filename = Dir()
Loop
EndFunction

Top
#145000 - 2005-08-10 06:43 AM Re: ok, here's an easy one
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
still, the files should not go to users directory.
they are not related to the user anyway, so why you put them there?
_________________________
!

download KiXnet

Top
#145001 - 2005-08-11 12:48 AM Re: ok, here's an easy one
oscar Offline
Fresh Scripter

Registered: 2005-07-28
Posts: 17
Quote:

still, the files should not go to users directory.
they are not related to the user anyway, so why you put them there?




good point.

Top
#145002 - 2005-08-15 03:25 AM Re: ok, here's an easy one
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Why cna the installs not be pushed out via GPO or the Task Scheduler? No need to copy the files locally as one can always use UNCs. See the FAQ.
_________________________
There are two types of vessels, submarines and targets.

Top
#145003 - 2005-08-15 06:19 PM Re: ok, here's an easy one
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
This is precisely what my SWDIST tool suite does. 2 scripts, 2 bat files, 2 config files, and 1 shared folder with the application and installation tools. No software/scripts needed on the remote systems.

  • Create the share & populate with your software and install script. Define your settings in the config files.
  • Run DEPLOY to define the product, install date/time, and target systems. Specify an admin account to run the install under.
  • Wait for the jobs to complete - the status of each job is logged on the install share point.

I can post a zip file on my web server with the tools and a sample product if you are interested in experimenting with this. I've been using this tool to maintain about 400 servers for the past couple of years.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
Page 1 of 2 12>


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

Who's Online
0 registered and 657 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

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