Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8720941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:08:22+00:00 2026-06-13T07:08:22+00:00

I need to copy and execute a .vbs script from my local machine to

  • 0

I need to copy and execute a .vbs script from my local machine to a remote machine from a C# program.
I tried using psexec but it seems that it is unable to copy the vbs file to a remote machine.
I’d rather not copy the file with net use (and then execute it with psexec).
The Remote machine is protected by a username and password.

Can you think on an elegant solution to copy and execute the script?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:08:23+00:00Added an answer on June 13, 2026 at 7:08 am

    I struggled with psexec for a long time, but I could not get it to work 100%. Sometimes it would pop up a EULA message (you are meant to be able to get rid of this with a command line option), sometimes it would not work at all. I ended up created a WCF web service that I install and run on the remote machine; the web service will execute command lines that I send to it, such as a command to run batch/script file.

    Of course such a service is open to hacking and abuse, so you want to make sure you only use it in safe and protected environment, or you use appropriate authentication on the web service.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to copy data from one database to another using a VB.NET program.
I need to execute a command from a program. The command line is ok,
I need to execute a directory copy upon a user action, but the directories
Using C# (vs2005) I need to copy a table from one database to another.
I need to copy several files to remote server. for database in `mysql -Bseshow
I need to copy a jar file from one directory to another when my
I need to copy a table from one server to another.for that I have
I need to copy a full row in an SQL table but add -Copy
I need to execute Javascript from an external javascript library (which I left in
I'm writing a Inno Setup script which need to execute a very old third

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.