Question Locked

logon scripts

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello,
I need a script that will start a program that located on our file server. Here's the deal, we have implimented roaming profiles within AD2003 domain. However, I need a script that will launch an app called "profiler" that will setup users outlook setting once they log into a new machine. Can anyone help with me this?

I would prefer a VB script.

4 replies

by bart777

That shouldn't be too bad.

I've always preferred KIX myself. With this you can have the program look for files\folders\regkeys\etc and then have it do some function, like call another program, right from the logon script.

www.kixtart.org

This has bees around since the NT4 days and works wonders in AD. Take a peek. I'll bet you have the script done in just a few minutes.

Best of luck

by pc-guru

Option Explicit
Dim objWMIService, objProcess, objCalc
Dim strShell, objProgram, strComputer, strExe

strComputer = "."
strExe = "Calc.exe"
' Connect to WMI
set objWMIService = getobject("winmgmts://"_
& strComputer & "/root/cimv2")

' Obtain the Win32_Process class of object.
Set objProcess = objWMIService.Get("Win32_Process")
Set objProgram = objProcess.Methods_( _
"Create").InParameters.SpawnInstance_
objProgram.CommandLine = strExe

'Execute the program now at the command line.
Set strShell = objWMIService.ExecMethod( _
"Win32_Process", "Create", objProgram)

WScript.echo "Created: " & strExe & " on " & strComputer
WSCript.Quit

This discussion is closed to new replies.