Computing.Net > Forums > Networking > Loging to Remote Server & running a VB Script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Loging to Remote Server & running a VB Script

Reply to Message Icon

Name: JGarrett
Date: August 3, 2009 at 11:26:16 Pacific
OS: Windows XP
Subcategory: Servers
Comment:

Hi, I am trying to accomplish the following:
I am tryint to stop a web site on a remote server by using a VBscript.
I would like to run the STOPWEB.VBS command on the remote server and I cant seem to be able to.
(See below)
Can someone HELP ME?

==========SCRIPT=========
sUser="DOMAIN\USER"
sPass="PASSWORD"&"{enter}"

set WshShell = CreateObject("WScript.Shell")


strCmd ="run \\webserver\c$\inetpub\adminscripts\stopweb.vbs -a 1"
rc=WshShell.Run("runas /user:" & sUser & " " & CHR(34) & strCmd & CHR(34) ,1,False)
Wscript.Sleep 1000 'need to give time for window to open.
WshShell.AppActivate("runas.exe") 'make sure we grab the right window to send password to'
WshShell.SendKeys sPass 'send the password to the waiting window.'

set WshShell=Nothing
wscript.quit


==========END OF SCRIPT=========



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: August 3, 2009 at 12:40:16 Pacific
Reply:

Who owns this server? If it is not you the chances are the the owner as disalbed the ability to run VB scripts. Besides, unless the service is running under Windows VB scripts are not going to work.

Stuart


0

Response Number 2
Name: JGarrett
Date: August 3, 2009 at 12:58:30 Pacific
Reply:

I am trying to have a user run the script and the script has the Admin and Password of the remote server.
can I do this with a batch file instead?


0

Response Number 3
Name: jefro
Date: August 3, 2009 at 14:09:10 Pacific
Reply:

http://msdn.microsoft.com/en-us/lib...

http://windowsitpro.com/article/art...

"Best Practices", Event viewer, host file, perfmon, antivirus, anti-spyware, Live CD's, backups, are in my top 10


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


VPN Port help me



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Networking Forum Home


Sponsored links

Ads by Google


Results for: Loging to Remote Server & running a VB Script

need to run a perl script residing on linux www.computing.net/answers/networking/need-to-run-a-perl-script-residing-on-linux-/37350.html

remote access behind a router www.computing.net/answers/networking/remote-access-behind-a-router/28419.html

cannot connect to vpn server www.computing.net/answers/networking/cannot-connect-to-vpn-server/20272.html