runonce

What's the order of Windows startup?

和自甴很熟 提交于 2019-12-20 14:41:39
问题 I'm curious to know the order of Windows startup during a user login. Does anyone know? Basically, my application was being invoked by login script that a GPO calls. While 3rd party EXE was being invoked, it was failing to start. Then, through trial and error, I found that HKCU...\RunOnce keys execute after the login script. Same result, the EXE was being called, but failing to start. What worked: updated the login script create a shortcut in the user's Startup folder. Now the EXE starts up

RunOnce to rename a Computername with a random name on reboot

独自空忆成欢 提交于 2019-12-13 16:54:20
问题 We are a learning center and sometimes we are not able to sysprep the machines for different reasons. When I do not sysprep the machines, I end up cloning a machine 25 times with the same computername. I then have to go manually on each station and change the computername and restart them after. I was wondering if I could use a batch file or powershell script that I would do before shutting down my machine (pre-cloning). Then, on next reboot (only once) the computer would randomly change the

Windows Registry RunOnce Loop

☆樱花仙子☆ 提交于 2019-12-11 20:41:58
问题 I'm in an environment where apps in the start up menu and Run registry key wont execute anything, but RunOnce will, so I made small script to start the application I want to run on startup then re-write the registry key. However, when I login and teh script runs then exits after firing off my app and re-writing the registry key, windows seems to run it again, The scenario looks like: i login -> my script fires and loads notepad -> my script re-writes registry key -> my script exits -> windows