Re: logon/logoff scripts and runas



Thanks for your and lee_mre's replies which confirm the behavior I was
seeing was indeed correct.

I think the runas command does load the user profile unless /noprofile is
used, correct?

I am no expert in this area, and I think because GPOs do seem to get
processed and applied by runas and the appearance of events of category
Logon/Logoff (with logon type 2, meaning interactive logon) in the event
viewer, I had perhaps expected the logon and logoff scripts specified in a
GPO to be executed.

Lars

"Bruce Sanderson" <Bruce.Sanderson@xxxxxxxxx> wrote in message
news:eXwKur1eFHA.2128@xxxxxxxxxxxxxxxxxxxxxxx
> Logon scripts run as part of the "Windows Session" setup process that,
among
> other things, loads the user "profile" and provides the Desktop.
>
> Applications that you run, whether using the "Run As" or not, all run in
the
> Windows Session. The only way to launch a Windows Session is to logon
> locally at a computer or via Terminal Services (Remote Desktop). The
runas
> command (or the Run As conext menu item) merely specifies a different
> security context for the application inside the Windows Session.
>
> --
> Bruce Sanderson MVP
>
> It's perfectly useless to know the right answer to the wrong question.
>
>
> "Lars Nyman" <larsnyman@xxxxxxxxxxxxx> wrote in message
> news:uuu2oaFeFHA.3808@xxxxxxxxxxxxxxxxxxxxxxx
> > Windows Server 2003.
> > I have a GPO that specifies a logon script in User Configuration/Windows
> > Setting/Scripts (Logon/Logoff)/Logon (and similarly a logoff script).
The
> > GPO is linked to a OU that contains a user mydomain\userA.
> >
> > When logging on as mydomain\userA the logon script is executed and when
> > logging off the logoff script is executed as expected.
> >
> > However, if I am logged on as another user, mydomain\userB and use
"runas
> > /user:mydomain\userA cmd.exe"
> > to start a command prompt as userA then the logon script for userA is
not
> > executed (and the logoff script for userA is not executed when the
command
> > prompt is exit-ed). Is this the expected behavior? If so, is there any
> > documentation and/or helpfile that describes the differences between a
> > "full" logon from ctrl-alt-del and a "logon" using runas.
> >
>
>

.



Relevant Pages

  • Re: logon/logoff scripts and runas
    ... The only way to launch a Windows Session is to logon ... > I have a GPO that specifies a logon script in User Configuration/Windows ... > to start a command prompt as userA then the logon script for userA is not ...
    (microsoft.public.windows.group_policy)
  • Re: Disabling non-Microsoft services?
    ... Once you're sure of the syntax, you can edit the default logon script to ... I wonder if I could make a logon script from this somehow? ... go to a command prompt and type "SC /?" ... installing Symantec AntiVirus 10.0 Corporate Edition. ...
    (microsoft.public.windows.server.sbs)
  • RE: Active Directory DNS
    ... You may use a tool called Print Migrator to facilitate the migration. ... Use logon script and GPO to remap the shared files ... You can use Net use command to re-map the driver. ... Assign startup script and logon script ...
    (microsoft.public.windows.server.migration)
  • Re: Starting services at command line with admin password?
    ... You can use runas at the command line if you want to do it while you are ... > administrator and start and stop services manually, ... > login permissions to start and stop services. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Programs installed in one user not available under other
    ... and the create a shortcut to the batch file to execute the command line ... You can also type "runas /?" ... > my daughter logs in, i.e. Palm Desktop, internet ...
    (microsoft.public.windowsxp.security_admin)