Add files to the desktop of NTLite created user

masterj

New Member
Hi guys!
So I have been trying to find a solution to this problem. Basically with NTLITE unattended page I've created a local account. Now I need to add some files to it's desktop (only for this user). I've tried mounted dir and even $1 with path Users\<Name>\Desktop but the result is always the same. If I add a said folder then after windows installation I see that Windows creates another directory for the user: Users\<Name>.<Hostname>\Desktop. Apparently during the installation Windows checks if the user folder exists and if it is existing then Windows instead of adding new files to it will decide to create separate folder for the user. So how do I do it the correct way then?
 

Attachments

  • extra_folder.png
    extra_folder.png
    66.4 KB
add any file or folder to
C:\Users\Public\Desktop
by exploring mounted content.
Thanks! By doing this I will add files ONLY to the account I have created? Because afterwards I'll have to add some additional accounts and they definitely shouldn't have these files.
 
Nope with this method every account will have everything, but i think you can add files via same method to any account u need. just create the folder path to the desktop before u even created that account...

for exp: the account will be named "XXX" and u know that before even installing windows.
So explore mounted iso, and create this folder "C:\Users\XXX\Desktop"
 
Nope with this method every account will have everything, but i think you can add files via same method to any account u need. just create the folder path to the desktop before u even created that account...

for exp: the account will be named "XXX" and u know that before even installing windows.
So explore mounted iso, and create this folder "C:\Users\XXX\Desktop"
Did not work like that as this was first thing I've tried. Basically if Windows detects existing folder in Users folder it will create another one for the profile instead of using existing one.
 
Sort of figured out the temporary solution (there has to be a better way though):
  1. Add file to sources\$OEM$\$$\Setup\somefile.exe
  2. Create .vbs script:
    Set oWS = WScript.CreateObject("WScript.Shell")
    sUserProfilePath = oWS.ExpandEnvironmentStrings("%UserProfile%")
    Set oLink = oWS.CreateShortcut(sUserProfilePath & "\Desktop\Somelink.lnk")
    oLink.TargetPath = "%windir%\Setup\somefile.exe"
    oLink.Save()
  3. Add .vbs to Post-Setup > User - Execution Queue
However with this approach the file is left in C:\WINDOWS\Setup\ and we're using shortcut to it.

Another approach would be instead of using shortcut to actually move the file with batch file (probably this would ensure that no other user can access this file)
 
You can create winrarsfx file to extract anything to anywhere. then u can clear windows\setup folder via setupcomplete command
 
Back
Top