Add files to the desktop of NTLite created user

masterj

New Member
Messages
12
Reaction score
0
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
 
Darn, hoping someone had an answer to this. I'm seeing the same thing here.

I added files inside my NTLite project location's "sources" folder:

$OEM$\$1\Users\streaming\Desktop\helloworld.txt

My C:\Users folder on my new PC contains C:\Users\streaming\Desktop\helloworld.txt

But, as soon as I log in to the streaming account, a folder is made in C:\Users that includes a period and the Computer Name. This is now the primary Users folder for that account.

i.e. C:\Users\streaming.TVPC

---

I can also confirm that using C:\Users\Public\Desktop does exactly what I want... but, it of course goes to all desktops.
 
$OEM$\$1\Users\streaming\Desktop\helloworld.txt

My C:\Users folder on my new PC contains C:\Users\streaming\Desktop\helloworld.txt

But, as soon as I log in to the streaming account, a folder is made in C:\Users that includes a period and the Computer Name. This is now the primary Users folder for that account.

i.e. C:\Users\streaming.TVPC
The reason is you can't create a specific user's folder, before Windows runs new user provisioning for them.

$OEM$ folders are copied to the new system during the WinPE phase of installation. "C:\Users\streaming" folder is created and owned by the SYSTEM user, since no user accounts exist at this stage.

When OOBE starts the new user provisioning process, it wants to create "C:\Users\streaming" – but finds an existing folder. To prevent conflicts, Windows instead creates a new folder "C:\Users\UserName.ComputerName".

You can't use $OEM$ to directly copy files to a specific user's path, since the user provisioning process needs full control.

If copying files to the Default User's profile isn't workable, you'll need to create a Post-Setup (After logon) script to copy the same content from a staging folder ($OEM$\$1\some\other\folder).
 
Back
Top