Solved

Run vbscript from another vbscript as different user

Posted on 2006-07-19
2
2,334 Views
Last Modified: 2013-12-26
I want to run a visual basic script from another visual basic script, and as a different user

I need it for running some login scripts in all computers
I know how to do this launching a runas command, but it shows the screens in session startup

I'd like to know how to do it with commands like "LogonUser", "CreateProcessWithLogonW", "ImpersonateLoggedOnUser"...

I have had troubles for getting answers for this question, and I have posted it again in this topic area as suggested by Netminder

Thank you
0
Comment
Question by:danieldemiguel
2 Comments
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 500 total points
ID: 17218086
>>> I'd like to know how to do it with commands like "LogonUser", "CreateProcessWithLogonW", "ImpersonateLoggedOnUser"...

These are API's that cannot be called directly from vbscript.They would have to be wrapped in a COM Object that you would use in your script.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question