1

I'm writing a Python script that configures new computers.

It has two parts - one that runs as Admin (system setup) and one that runs as each user (user setup).

The user setup part needs each user to login and run it (logged in as that user).

Is there some way to:

Force Windows 10 to initialize a user account (the whole "Hi this make take some time" thing) from the Admin account (I do have the password), and then run my script?

or, if not, is there some way to:

Place a "readme.txt" on the user's desktop, reminding them to do it themselves?

I tried to do this by creating the folder c:\Users\<name>\Desktop and writing the readme.txt there, but if the user has never yet logged in, that just seems to make Windows create a different user folder (c:\users\<name>.<machinename>) and ignores what I put in c:\users\<name>.

Are there ways to accomplish either of these?

1 Answer 1

2

Place a shortcut to your script in the "Startup" or "Run Once" locations of the template profile, so that Windows would automatically copy it to all newly created profiles. Then have the script automatically delete its own "Startup" shortcut.

The template "Startup" folder is probably at:

C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\

You could also load the template HKCU registry hive (C:\Users\Default\NTUSER.DAT) and add your script to the "RunOnce" registry key, where Windows itself will automatically delete entries that have been run:

\Software\Microsoft\Windows\CurrentVersion\RunOnce

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .