Go Back   ø-Windows XP UsersGroup-ø > Hardware and Software > Working Remotely
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Tags: , , ,

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-05-2008, 04:42 PM
=?Utf-8?B?dmJuZXdiaWU=?=
 
Posts: n/a
Default vbscript to work on remote machine

Hello all...my first post :-)
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


Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-05-2008, 04:42 PM
=?Utf-8?B?QW50ZWF1cw==?=
 
Posts: n/a
Default RE: vbscript to work on remote machine

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


Reply With Quote
  #3 (permalink)  
Old 04-05-2008, 04:42 PM
=?Utf-8?B?dmJuZXdiaWU=?=
 
Posts: n/a
Default RE: vbscript to work on remote machine

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 :-)
"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 :-)
> > 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.
> >

>

Reply With Quote
  #4 (permalink)  
Old 04-05-2008, 04:42 PM
=?Utf-8?B?QW50ZWF1cw==?=
 
Posts: n/a
Default RE: vbscript to work on remote machine

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



Reply With Quote
  #5 (permalink)  
Old 06-09-2008, 12:51 AM
Parthasarathi R
 
Posts: n/a
Default Problemn in cscript command

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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Contact Us -|- ø-Windows XP UsersGroup-ø -|- Archive -|- Top -|-Rules/Disclaimer-|-Help/Support -|-Advertise
© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 05:44 AM.



Design By: Miner Skinz.com
Powered by vBulletin® Version 3.6.7

Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.