Welcome to WinForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

vbscript to work on remote machine

 
   Windows XP (Home) -> Work Remotely RSS
Next:  RDC Options  
Author Message
vbnewbie

External


Since: Jan 10, 2008
Posts: 2



(Msg. 1) Posted: Thu Jan 10, 2008 8:58 am
Post subject: vbscript to work on remote machine
Archived from groups: microsoft>public>windowsxp>work_remotely (more info?)

Hello all...my first post Smile
Im an Admin of 35 xp pc's...I have a .bat file on every client PC that does
an xcopy of certain files from there machines to a remote network share.

The problem im facing is im restricted from running any 3rd party tools....I
can only use what came with xp pro. Im also trying to do this with a xp pro
machine not a server.

I would like to create a vbscript(with using wmi) that can run the .bat file
on each client machine instead of me remotely connecting to them 1 by one and
running the .bat file.

I was able to get this far:
<code>
strComputer = "remote computer"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objStartup = objWMIService.Get("Win32_ProcessStartup")
Set objConfig = objStartup.SpawnInstance_
objConfig.ShowWindow = SHOW_WINDOW
Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
errReturn = objProcess.Create _
("cmd.exe /c C:\backup.bat", null, objConfig, intProcessID)
<end code>

The problem is I can connect to remote pc and do things with cmd on that pc
like make directories and stuff....but it wont run the xcopy .bat file to
move files to the remote share. I verified that it starts the cmd.exe with my
credentials of admin...
Im stuck...see I cant schedule anything on the clients computers.....Im not
allowed to do that.

Maybe wmi isnt the way to go?

Was just hoping someone had an insight of something I could try

Thanks

 >> Stay informed about: vbscript to work on remote machine 
Back to top
Login to vote
Anteaus

External


Since: Aug 08, 2007
Posts: 124



(Msg. 2) Posted: Mon Jan 14, 2008 8:54 am
Post subject: RE: vbscript to work on remote machine [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You are going to have a problem here anyway, in that 35 computers cannot
connect simultaneously to one XP Pro computer. Ten is the max. Thus you'd
have to make sure that shares disconnect when not in use.

Probably the best way to launch your task would be as a scheduler job on
each computer. The batch file could include 'net use' commands to connect and
disconnect the share.

If this is a backup task, an alternative might be one ofthe many
Linux/Samba-based NAS boxes. These will typically store 200/500GB of data for
a moderate cost, and unlike Windows have no userlimit. Lacie are recommended.

"vbnewbie" wrote:

> Hello all...my first post Smile
> Im an Admin of 35 xp pc's...I have a .bat file on every client PC that does
> an xcopy of certain files from there machines to a remote network share.
>

 >> Stay informed about: vbscript to work on remote machine 
Back to top
Login to vote
vbnewbie

External


Since: Jan 10, 2008
Posts: 2



(Msg. 3) Posted: Mon Jan 14, 2008 9:54 pm
Post subject: RE: vbscript to work on remote machine [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Anteaus,
Thank you for the reply.

Only problem im dealing with is that I cannot make any schedules tasks on
any computer Im in charge of.
Lame I know but its been disabled.

I dont have a server ...so im guessing im just stuck in the mud here.

I wish WMI would allow more then 1 hop....But I understand why it doesnt.

I almost tried PsExec but I know even that MS own sysinternals its
considered a 3rd party tool (according to the company I work for) so I cant
use it


Well if anyone has some Ideas Im all ears Smile
"Anteaus" wrote:

> You are going to have a problem here anyway, in that 35 computers cannot
> connect simultaneously to one XP Pro computer. Ten is the max. Thus you'd
> have to make sure that shares disconnect when not in use.
>
> Probably the best way to launch your task would be as a scheduler job on
> each computer. The batch file could include 'net use' commands to connect and
> disconnect the share.
>
> If this is a backup task, an alternative might be one ofthe many
> Linux/Samba-based NAS boxes. These will typically store 200/500GB of data for
> a moderate cost, and unlike Windows have no userlimit. Lacie are recommended.
>
> "vbnewbie" wrote:
>
> > Hello all...my first post Smile
> > Im an Admin of 35 xp pc's...I have a .bat file on every client PC that does
> > an xcopy of certain files from there machines to a remote network share.
> >
>
 >> Stay informed about: vbscript to work on remote machine 
Back to top
Login to vote
Anteaus

External


Since: Aug 08, 2007
Posts: 124



(Msg. 4) Posted: Tue Jan 15, 2008 1:09 am
Post subject: RE: vbscript to work on remote machine [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"vbnewbie" wrote:

> I dont have a server ...so im guessing im just stuck in the mud here.

With 35 PCs this is folly. With data scattered over 35 computers (and
presumably no backup) it's only a matter of time till a serious data loss
occurs.

Or, because people are probably creating unpassworded shares, only a matter
of time until a virus (or a disgruntled user) goes round the whole network
like a chain of dominoes. You've then got 35 PCs to flatten and reinstall.

> I almost tried PsExec but I know even that MS own sysinternals its
> considered a 3rd party tool (according to the company I work for) so I cant
> use it

Sounds to me like it isn't so much the network that needs upgrading, it's
the firm's management that needs replacing.
 >> Stay informed about: vbscript to work on remote machine 
Back to top
Login to vote
Parthasarathi R

External


Since: Jun 03, 2008
Posts: 3



(Msg. 5) Posted: Tue Jun 03, 2008 9:33 pm
Post subject: Problemn in cscript command [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I am working on Windows XP in the batch file i want to run the a VB script file i will check it with the cscript but in xp it is not an command there is an alternative for cscript any one tell me answer.



Thanks
Parthasarathi
 >> Stay informed about: vbscript to work on remote machine 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
xcopy in batch file does not work if I attach to machine u.. - I've got a very strange problem. I originally set up a batch file that runs each night at 3:30am using nnKron lite. It among other things xcopy's a bunch of directories from another machine, RAR's them in preparation for on-line backup which starts som...

Remote desktop from a XP machine to a w2k machine - I dowloaded the XP remote desktop software on my 2000 pro machine, and I am able to access a XP machine from the 2000 machine, however, I cannot access the 2000 machine from an XP machine. This might be due to the fact that I cannot find the remote tab....

Remote only let me in if user is logged on to machine and .. - Remote desk top wont let me in if I am not already logged into the pc I am trying to get into, in other words past the password prompt. The security screen comes up I add user and password then I get a blank desktop 5 seconds later it popes me back..

Remote Desktop not working on Windows XP machine - Really stump with one, hope someone can help!!!!! Have a Home network running Windows XP workstations MachineA remote desktop was working until 3 weeks ago, then all of a sudden I am unable to get access to the machine from machineB gives an error &qu...

Remote Desktop XPPro to a Windows ME Machine - I have an old Windows ME machine I recently plugged into my home network. I installed the remote desktop app on the machine, have the network configured but I am unable to use the remote desktop app from my XP Pro machine to access the older Windows....
   Windows XP (Home) -> Work Remotely All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum

Categories:
  Windows XP
 Windows Vista!
 Win 2000/NT/98/ME


[ Contact us | Terms of Service/Privacy Policy ]