?
Solved

Run vbscript from another vbscript as different user

Posted on 2006-07-19
2
Medium Priority
?
2,357 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 1000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses

719 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