Running VBS within Local System Context

G

Guest

I am having difficulty getting a VB script to run under the needed context
when a system starts up. I need this script to start and run automatically -
under the local system context. I've tried calling it within the registry,
HKLM\Software\Microsoft\Windows\CurrentVersion\Run but it runs under the
context of the user logging on. Is there a different registry key for this
to occur? I'm also trying the path of creating a service and calling the
script through that service but to date haven't had much success. Any
suggestion will be appreciated.

As background, the script continually loops and looks for specific changes
in the IP address. It's used to detect VPN connections and if one is
detected, it calls another script for specific processes on our private
network.

Thanks
 
M

Mark Dormer

Place the script in C:\WINDOWS\system32\GroupPolicy\Machine\Scripts\Startup
Type gpedit.msc into the run box
Under Computer Configuration--Windows Settings--Scripts--Startup
Add the script.

It will run at startup using the system context.

Regards
Mark Dormer
 
G

Guest

Thanks but this solution would not work. I need the script to be running
before a user logs on.
 
G

Guest

Mark, Good thought! Well I've been trying this today and although I can get
the script there, configure the Local GPO, and the GPO is being processed
(verified via RSOP and GPResult /v, it appears that the Domain GPO startup
scripts are overriding it and it never is listed or runs - the domain startup
scripts can't process due to no network connectivity and the scripts
themselves being on the network for this scenario I'm testing. I'm thinking
it may be possible to make it part of the domain GPO and point to a static,
local copy of the script in the GPO itself.


Thanks for your input and if you have any further ideas, please share.

Dave Goshen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top