473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Need help on creating remote process with interactive GUI.

I have this vbs script below that gets copied onto a remote computer by another script. However, this does not run the GUI app interactively, instead what it does is it runs psexec on the task manager. I had though that psexec would run an app as the user passed in but it apparently does not (unless I'm missing something)

Anyway, I read somewhere that what i want to do might be better done through .net by copying an authorization token. I've looked around but have found anything on how this is done. Anyone have any advice either on getting this script to what I need or doing it through .Net. By the way I have even tried a service that tried to run the app locally using CreateProcessWithLogonW and still the app does not run interactively.

Please, what do I need to do to get an app to run interactively on a remote computer, it can't be that difficult. Either though a service local to the computer or through WMI or VBS, something...?

Thanks for any advice/help!!

Expand|Select|Wrap|Line Numbers
  1. Const CONVERT_TO_LOCAL_TIME = true
  2. DIM vbQuote
  3. DIM vbSpace
  4. vbQuote = Chr(34)
  5. vbSpace = Chr(32)
  6. strComputer = "."
  7. Set objLocator=CreateObject("WbemScripting.SWbemLocator")
  8. Set objWMIService=objLocator.ConnectServer(strComputer, "root\cimv2")  
  9. objWMIService.Security_.ImpersonationLevel=3
  10. ScheduleJob objWMIService, pathToExec, arguments
  11. Sub ScheduleJob(objWMIService, pathToExec, arguments)
  12. JobID = "Test"
  13. Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
  14. Set objSWbemDateTime = CreateObject("WbemScripting.SWbemDateTime")
  15. objSWbemDateTime.SetVarDate DateAdd("n",1, Now()), CONVERT_TO_LOCAL_TIME
  16. commandLine = "D:\psexec\pstools\psexec.exe -u user -p pwd -i -d -s c:\windows\system32\notepad.exe"
  17. 'Wscript.Echo commandLine
  18. errJobCreate = objNewJob.Create (commandLine, objSWbemDateTime.Value, false, , ,true,JobId) 
  19. 'Wscript.Echo errJobCreate 
  20. End sub
Feb 1 '08 #1
0 1124

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Roger | last post by:
I would like to get a list of running processes on a remote machine. How is this possible via VB.Net? Is it possible? Can someone point me in the right direction. thanks, rog
0
by: J. Whitehurst | last post by:
I am currently trying to find a way to remotely execute an application such that the GUI will actually show up (and be interactive?) on the remote host. Simple example: have computer1 tell...
5
by: news | last post by:
I have a new situation I'm facing and could use a suggestion or two, as I don't seem to be able to think in the abstract very well. We have a local server which holds all of our image files. We...
5
by: Dan Pavel | last post by:
Hi, I am starting a new process (Notepad) on a remote machine but it is not visible. When I start it on my machine it is visible. What I am doing wrong ? private void run_notepad(string machina)...
6
by: Jerry Spence1 | last post by:
Why doesn't the following work in my ASP program? I have imported ADOX I am trying to create a temporary database on the user's PC. The example is taken from Microsoft. Dim cat As Catalog =...
16
by: peshekeedweller | last post by:
Using asp.net 1.1. vb.net 2003. I am trying to connect to a remote sql server 2000 on a virtual machine running windows 2000 server. I can connect through the server explorer in visual studio,...
3
by: alaytin | last post by:
Hello- I am having a problem with a Web Service written in Visual Studio 2005. I have a typed dataset that I created using the Visual Studio 2005 Data Source tool. This retrieves its data from...
16
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
3
by: Billy Bob | last post by:
Hello In C# how can i start a remote process such as someapp.exe on a remote PC? I know the remote PC's name, but how do I start the app on that PC? Thanks ..
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.