none
run logon script RRS feed

  • Question

  • Is there a simple way to run a logon script before a user's (actually all users')  basic tasks are executed - without using a node preparation task, task dependency or GP? Something that can be copied to a location on the compute nodes, in the registry or a scheduled task?

    Currently we are using node preparation tasks but I would like to reserve the node preparation tasks for job dependent preparations rather than those used by all users every time.

    I have tried placing a script in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\ but that seems not to be executed prior to the basic tasks.

    We are currently using Windows HPC Server 2012R2 Update 3 on Windows Server 2012R2.

    Thursday, November 9, 2017 3:05 PM

Answers

  • If HPC_ATTATCHTOSESSION/HPC_CREATECONSOLE is used, the process will be created in the user's desktop session. Otherwise, we will do a user logon to get UserToken then start the process with NativeMethods.CreateProcessAsUser

    Qiufang


    Qiufang Shi

    • Marked as answer by Thomas Kofoed Friday, December 1, 2017 9:13 AM
    Friday, December 1, 2017 7:57 AM

All replies

  • Hi Thomas,

    What's the purpose of the logon script? Is it to create a user logon console or session? If so, you could check the HPC_CREATECONSOLE job environment.

    Regards,

    Yutong Sun

    Thursday, November 16, 2017 3:36 PM
    Moderator
  • Hi,

    Thanks for the reply. I am simply trying to make some user-specific logical-drive mappings without using group policy.

    Best regards,
    Thomas

    Thursday, November 16, 2017 4:03 PM
  • Then I suppose node preparation task is a best choice. You may make a script to combine all the preparation tasks required.

    Regards,

    Yutong Sun

    Friday, November 17, 2017 2:46 AM
    Moderator
  • Thanks for your suggestion (and to Qiufang Shi for proposing it as an answer).

    The issue is that I would like to reserve the node preparation task for job specific preparatory tasks.

    I suspect the question might belong to a different forum(?) and be rephrased to which startup scripts/actions are executed during impersonation of a process?

    I reckon that the "logon" of a cluster user is done through impersonation of a process?

    Wednesday, November 29, 2017 9:03 AM
  • If HPC_ATTATCHTOSESSION/HPC_CREATECONSOLE is used, the process will be created in the user's desktop session. Otherwise, we will do a user logon to get UserToken then start the process with NativeMethods.CreateProcessAsUser

    Qiufang


    Qiufang Shi

    • Marked as answer by Thomas Kofoed Friday, December 1, 2017 9:13 AM
    Friday, December 1, 2017 7:57 AM
  • I reckon that means that no logon scripts will be triggered(?)

    Could a not so nice solution be to add the host name to the AD group governing access to the drives and map them under NT AUTHORITY?

    Friday, December 1, 2017 9:19 AM