How to run a command after user profile is created?


New Member
I haven't been able to successfully ran a script in post install of NTLite. It works fine when ran natively in Windows, in any directory. The script basically copies a folder into the %LocalAppData%\Microsoft\Windows\WinX directory. After copying the shortcut, I need to run a command with the the following, and restart explorer.exe to take effect.

One more thing is that even if I explore a mounted image in NTLite, and copy the shortcuts manually to the Admin WinX folders, it wouldn't show after the OS install. It is not copied in the New user.

"%WINDIR%\hashlnk.exe" "%LocalAppData%\Microsoft\Windows\WinX\Group2a\00Registry Editor.lnk"
"%WINDIR%\hashlnk.exe" "%LocalAppData%\Microsoft\Windows\WinX\Group2a\01Process Explorer.lnk"
"%WINDIR%\hashlnk.exe" "%LocalAppData%\Microsoft\Windows\WinX\Group2a\Autoruns.lnk"
"%WINDIR%\hashlnk.exe" "%LocalAppData%\Microsoft\Windows\WinX\Group2\Control Panel.lnk"
"%WINDIR%\hashlnk.exe" "%LocalAppData%\Microsoft\Windows\WinX\Group1\01Restart Explorer.lnk"
"%WINDIR%\hashlnk.exe" "%LocalAppData%\Microsoft\Windows\WinX\Group1\00winver.lnk"

del /s "%LocalAppData%\Microsoft\Windows\WinX\Group2\5 - Task Manager.lnk"
del /s  "%LocalAppData%\Microsoft\Windows\WinX\Group3\03 - Computer Management.lnk"
del /s  "%LocalAppData%\Microsoft\Windows\WinX\Group3\04 - Disk Management.lnk"
del /s  "%LocalAppData%\Microsoft\Windows\WinX\Group3\07 - Event Viewer.lnk"
del /s  "%LocalAppData%\Microsoft\Windows\WinX\Group3\04-1 - NetworkStatus.lnk"
del /s  "%LocalAppData%\Microsoft\Windows\WinX\Group3\08 - PowerAndSleep.lnk"
del /s  "%LocalAppData%\Microsoft\Windows\WinX\Group3\09 - Mobility Center.lnk"

taskkill /F /IM explorer.exe & start explorer