Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2361
  • Last Modified:

Run vbscript from another vbscript as different user

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
danieldemiguel
Asked:
danieldemiguel
1 Solution
 
vinnyd79Commented:
>>> 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now