• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Cortana/Windows Search breaks in default profile

    Scheduled Pinned Locked Moved
    Windows Problems
    cortana search default profile windows 10
    9
    81
    73.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Wayne WorkmanW
      Wayne Workman @JJ Fullmer
      last edited by

      @Arrowhead-IT I’ve been trying to use the scripts you posted - lots of things going wrong.

      I sorted a permissions issue on the intended share first, but I’m still getting a lot of access denied errors… Suppose I need to dig deeper, run the script as elevated.

      My intention is to re-write this thing to be more simple. It’s highly complex I feel, and really overkill.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
      Daily Clean Installation Results:
      https://fogtesting.fogproject.us/
      FOG Reporting:
      https://fog-external-reporting-results.fogproject.us/

      JJ FullmerJ 1 Reply Last reply Reply Quote 0
      • JJ FullmerJ
        JJ Fullmer Testers @Wayne Workman
        last edited by

        @Wayne-Workman I do have a tendency to do that, complicating things and adding some overkill. You do need to run it as elevated because I think doing anything to the hidden C:\Users\Default folder requires elevation.

        The access denied errors are usually solved by copying the script to the C drive to run locally, which is why it copies itself to the C drive to run locally. Windows command prompt and network unc paths don’t always get along. The copySelf function was my solution.

        Have you tried the FogApi powershell module? It's pretty cool IMHO
        https://github.com/darksidemilk/FogApi
        https://fogapi.readthedocs.io/en/latest/
        https://www.powershellgallery.com/packages/FogApi
        https://forums.fogproject.org/topic/12026/powershell-api-module

        Wayne WorkmanW 1 Reply Last reply Reply Quote 0
        • Wayne WorkmanW
          Wayne Workman @JJ Fullmer
          last edited by

          @Arrowhead-IT Got this working, Now I understand the beauty of these two scripts design.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          JJ FullmerJ 1 Reply Last reply Reply Quote 0
          • Tom ElliottT
            Tom Elliott @JJ Fullmer
            last edited by Wayne Workman

            @Arrowhead-IT said in Cortana/Windows Search breaks in default profile:

            @Wayne-Workman

            some quick notes. You do need to put your username and password in plain text for shares, unless you have shares that give everyone access. If anyone knows of a way to encrypt that, I’d love to hear it. I know it can be done with openssl in linux bash scripts but I am yet to find the equivalent for a batch script. But hey bash will come to windows 10 soon.

            This script hasn’t been tested for windows 7 or 8 profiles. It does detect the windows version because I was preparing to add that kind of functionality but since I am ending up moving completely to windows 10, I never put the work into it

            The create profile script prompts you for the name of the user profile you customized and asks you for what department/profile you are making it for.

            The Apply simply takes one arguement of the profile name. So you can upload just the one script to fog and make a bunch of snapins with different args for each profile you have to deploy.

            Also note that I have some extra app data folders for custom settings of specific programs we use. I left them in there as examples.

            Bath script to create Deployable Default Profile

            ::-----------------------------------------------------------------------------
            :: Script Name: Create-Deployable-Default-Profile
            :: Original Author: jfullmer
            :: Created Date: 2016-02-18 16:39:23
            :: Last Updated Date: 2016-04-12 17:09:35
            :: Update Author: jfullmer
            :: Version: 3.8
            ::-----------------------------------------------------------------------------
            
            @ECHO OFF
            	REM @ECHO off to not output the commands being run to the console
            	REM This script copies a Customized windows 10 profile to the default profile so that
            	REM all new profiles are created with the same settings
            
            SET pwd=%~dp0
            call :main
            del C:\Create-Deployable-Default-Profile.bat & exit
            
            :main
            	REM main Function that just calls the other Functions
            
            	call :copySelf
            	call :funcHead "Welcome to the Windows Default Profile Creator Script!"
            	call :setVars
            	call :funcHead "Copying Customized Profile From %custom% to %default% ..."
            	call :AppData
            	call :CustomSettings
            	call :CopyToNetwork
            	call :funcHead "Done creating custom default profile! & echo.Goodbye"	
            	EXIT /B
            
            :copySelf
            	rem In some instances running this from a share doesn't work, so copy itself and start the copied version to run local
            	IF NOT %pwd%==C:\ (
            		echo. Copying self to C drive
            		net use \\path\to\share /USER:domain\user password	
            		XCOPY \\path\to\share\Create-Deployable-Default-Profile.bat C:\ /H /Y
            	 	rem Make sure it's being run as an admin
            	 	net session >nul 2>&1
            	    if %errorLevel% == 0 (
            			echo opening copied version.
            			start C:\Create-Deployable-Default-Profile.bat
            			exit
            	    ) else (
            	        echo This needs to be run as admin, try again please.
            	    	@pause
            	    	exit
            		)
                )
            	EXIT /B
            
            :setVars
            	REM Function to set script variables
            
            	REM c stands for Custom, d stands for default. cUser should be the name of the user you Customized
            	REM These variables just point to the user folders and the local and roaming appdata folders that 
            	REM store all the settings for a user profile
            
            	call :funcHead "Setting directory variables..."
            	
            	rem set cUser=adl
            	echo. Don't run this script from the user you're copying!
            	set /p cUser="What is the username of the profile you customized? -> "
            	set custom=C:\Users\%cUser%
            	set default=C:\Users\Default
            	set cPF=C:\Users\%cUser%\AppData\ProgramFiles
            	set dPF=C:\Users\Default\AppData\ProgramFiles
            	set cLocal=C:\Users\%cUser%\AppData\Local
            	set dLocal=C:\Users\Default\AppData\Local
            	set cRoam=C:\Users\%cUser%\AppData\Roaming
            	set dRoam=C:\Users\Default\AppData\Roaming
            	rem The script will create windows version and department folders
            	set profiles=\\path\to\share\with\profiles
            	net use %profiles% /USER:domain\user password
            	call :OSversion
            	call :setDept
            		
            	call :dots
            	EXIT /B
            
            :setDept
            	rem Function to set department via prompt. 
            	echo. What department/group is this profile for? (no spaces)
            	echo. The Current Choices are... (A different entry will create a new folder)
            	rem list profiles
            	dir /b %profiles%\%winVer%
            	set /P dept="Enter The Dept Here -> "
            	set share=%profiles%\%winVer%\%dept%
            	if NOT EXIST %share% mkdir %share%
            	if NOT EXIST %share%\logs mkdir %share%\logs
            	set logs=%share%\logs
            	EXIT /B
            
            :OSversion
            	:: Function to get current OS version
            	echo. Getting OS...
            	FOR /F "tokens=4-5 delims=. " %%i in ('ver') do set os=%%i.%%j
            	if "%os%" == "5.1" set winVer=WinXP
            	if "%os%" == "5.2" set winVer=WinXP
            	if "%os%" == "6.1" set winVer=Win7
            	if "%os%" == "6.2" set winVer=Win8
            	if "%os%" == "6.3" set winVer=Win8.1
            	if "%os%" == "10.0" set winVer=Win10
            
            	EXIT /B
            
            :copyDir
            	REM Function inputs - 1 = display of what is copying 2 = source folder 3 = destination folder 
            	
            	REM This Function simply displays what you're copying and copies it. Did a Function to have less
            	REM copy paste of command line options and have cleaner code.
            	REM Note that when calling the Function all passed parameters should be encased in double quotes
            	REM otherwise ROBOCOPY won't read the directories as seperate
            	
            	REM ROBOCOPY or robust copy, is a tool for copying directories or files in windows command line
            	REM The syntax is ROBOCOPY sourceFolder DestFolder options
            	REM the options used make it so a mirrored version of the source and its subdirectories are copied
            	REM to the destination with 64 threads (64 files at once) overwriting existin files retrying any failed files 
            	REM only once after 1 second of waiting and all without any verbose output
            	
            	REM /S - subdirectories /MIR - mirror /MT:64 - multithreaded copy with 64 threads, i.e. 64 files at a time instead of 1. 
            	REM /LOG - output to logfile instead of console, ROBOCOPY /? says this provides better performance in multithreaded mode
            	REM /IS - include same files i.e. overwrite existing /R:1 retry on error once (default is 1 million) 
            	REM W:1 - wait one second between retry on error (default is 30 seconds) 
            	REM the /N* are all to decrease output for automation. Since they go to a log file you can take them out if you want ( I did take them out)
            	REM /NP - no progress /NS - don't log file sizes /NC - don't log file classes /NFL - don't log file names /NDL - don't log directory names
            	REM /NJH - no job header /NJS - no job summary
            
            	echo. Copying %~1...
            	ROBOCOPY "%~2" "%~3" /S /MIR /MT:128 /LOG:"%logs%\%~1.log" /IS /R:1 /W:1 /ZB
            	echo. Done Copying %~1
            	EXIT /B
            
            :AppData
            	REM Function to copy all Customizations settings that are stored in files in the AppData folder
            	
            	call :funcHead "Copying Customizations From AppData..."
            	
            	REM directories used in all versions of windows
            	call :copyDir "Desktop" "%custom%\Desktop" "%default%\Desktop"	
            	call :copyDir "Firefox Customizations" "%cRoam%\Mozilla" "%dRoam%\Mozilla"
            	call :copyDir "Google Chrome Customizations" "%cLocal%\Google" "%dLocal%\Google"
            	call :copyDir "Task Bar Pin Shortcuts" "%cRoam%\Microsoft\Internet Explorer" "%dRoam%\Microsoft\Internet Explorer"
            	call :copyDir "Saleslogix" "%cRoam%\Saleslogix" "%dRoam%\Saleslogix"
            	call :copyDir "Sage Software" "%cRoam%\Sage Software" "%dRoam%\Sage Software"
            	call :copyDir "Saleslogix" "%cLocal%\Saleslogix" "%dLocal%\Saleslogix"
            	call :copyDir "Sage Software" "%cLocal%\Sage Software" "%dLocal%\Sage Software"
            	rem IF %dept%==IT (
            	rem 	call :copyDir "Terminals" "%cLocal%\Robert_Chartier" "%dLocal%\Robert_Chartier"
            	rem 	call :copyDir "VMware Vsphere" "%cLocal%\VMware" "%dLocal%\VMware"
            	rem 	call :copyDir "VMware Vsphere" "%cRoam%\VMware" "%dRoam%\VMware"
            	rem 	call :copyDir "Camtasia" "%cRoam%\TechSmith" "%dRoam%\TechSmith"
            	rem 	call :copyDir "Camtasia" "%cLocal%\TechSmith" "%dLocal%\TechSmith"
            	rem 	call :copyDir "slack" "%cLocal%\slack" "%dLocal%\slack"
            	rem 	call :copyDir "ProgramFiles" %cPF% %dPF%
            	rem )
            	call :copyDir "VLC settings" "%cRoam%\vlc" "%dRoam%\vlc"
            	call :copyDir "FaxFinder settings" "%cRoam%\FaxFinder Client Software" "%dRoam%\FaxFinder Client Software"
            	
            	REM The remaining dirs are specific to Windows 10 
            	REM Note: A starup script will be required on first login to copy the favorites for Microsoft edge to the Packages directory in the newly created User
            	REM That logon script would only need to be one line like so...
            	REM ROBOCOPY "%localAppData%\MicrosoftEdge\User" "%localAppData%\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\User" /S /MIR /MT:64 /LOG:C:\logs\edgeBookmarks.txt /IS /R:1 /W:1 
            	
            	rem call :copyDir "Microsoft Edge Customizations" "%cLocal%\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\User" "%dLocal%\MicrosoftEdge\User"
            	call :copyDir "Start Menu Tiles Part 1 of 3" "%cLocal%\TileDataLayer" "%dLocal%\TileDataLayer"
            	call :copyDir "Start Menu Tiles Part 2 of 3" "%cRoam%\Microsoft\Windows\Start Menu" "%dRoam%\Microsoft\Windows\Start Menu"
            	call :copyDir "Start Menu Tiles Part 3 of 3" "%cLocal%\Microsoft\Windows\Shell" "%dLocal%\Microsoft\Windows\Shell"
            	
            	echo. Done Copying AppData Folders...
            	call :dots
            	EXIT /B
            
            :CustomSettings
            	REM This Function copies the ntuser.dat and related system files that store things like task bar pin order, 
            	REM mapped network drives, taskbar toolbars, explorer settings, desktop background settings, etc.
            	REM It uses xcopy to copy all files that start with ntuser via * wildcard and uses the options...
            	REM \H - copy hidden system files /Y - overwrite existsing files without prompt 
            
            	call :funcHead "Copying custom settings (i.e. task bar pins and toolbars, desktop background, etc.) from ntuser .dat system files..."
            	
            	XCOPY %custom%\ntuser* %default%\ /H /Y > %logs%\ntuserFiles.log
            
            	echo. Done Copying Custom Settings
            	call :dots
            	EXIT /B
            
            :CopyToNetwork
            	REM This copies the newly created profile to the network share
            
            	call :funcHead "Copying profile to network!"
            
            	ROBOCOPY %default% %share%\Default /S /MIR /R:1 /W:1 /MT:128 /ZB /XJ
            	XCOPY %default%\ntuser* %share%\Default\ /H /Y > %logs%\ntuserFilesRemote.log
            
            	net use %share% /delete 
            
            	EXIT /B
            
            :dots
            	REM just echoing dots in a Function instead of copy pasting them so that it's consistent
            	echo ......................................................................
            	EXIT /B
            
            :funcHead
            	REM A simple function for displaying a consistent header at the start of functions
            	call :dots
            	echo. %~1
            	call :dots
            	EXIT /B
            

            Batch script/snapin to Apply Default Profile

            ::-----------------------------------------------------------------------------
            :: Script Name: Apply-Default-Profile-args
            :: Original Author: jfullmer
            :: Created Date: 2016-02-18 16:39:27
            :: Last Updated Date: 2016-05-11 16:29:08
            :: Update Author: jfullmer
            :: Version: 2.7
            ::-----------------------------------------------------------------------------
            
            @ECHO OFF
            	REM @ECHO off to not output the commands being run to the console
            	REM Requires args passed of department
            	rem if department is Touchscreen autologon is enabled and fog will reboot after applying the profile
            
            set dept=%1
            call :OSversion
            
            call :main
            exit
            
            :main
            	REM main Function that just calls the other Functions
            
            	call :funcHead "Welcome to the Windows 10 Default Profile Copy Script!"
            	call :setVars
            	call :CopyFromNetwork
            	call :funcHead "Done creating custom default profile! & echo.Goodbye"	
            	EXIT /B
            
            :setVars
            	REM Function to set script variables
            
            	REM c stands for Custom, d stands for default. cUser should be the name of the user you Customized
            	REM These variables just point to the user folders and the local and roaming appdata folders that 
            	REM store all the settings for a user profile
            
            	call :funcHead "Setting directory variables..."
            	
            	set cUser=adl
            	set custom=C:\Users\%cUser%
            	set default=C:\Users\Default
            	set cLocal=C:\Users\%cUser%\AppData\Local
            	set dLocal=C:\Users\Default\AppData\Local
            	set cRoam=C:\Users\%cUser%\AppData\Roaming
            	set dRoam=C:\Users\Default\AppData\Roaming
            	set share=\\path\to\share\%winVer%\%dept%
            	net use %share% /USER:domain\user password
            		
            	call :dots
            	EXIT /B
            
            :OSversion
            	:: Function to get current OS version
            	echo. Getting OS...
            	FOR /F "tokens=4-5 delims=. " %%i in ('ver') do set os=%%i.%%j
            	if "%os%" == "5.1" set winVer=WinXP
            	if "%os%" == "5.2" set winVer=WinXP
            	if "%os%" == "6.1" set winVer=Win7
            	if "%os%" == "6.2" set winVer=Win8
            	if "%os%" == "6.3" set winVer=Win8.1
            	if "%os%" == "10.0" set winVer=Win10
            
            	EXIT /B
            
            :CopyFromNetwork
            	REM This copies the newly created profile to the network share
            
            	call :funcHead "Copying profile From network!"
            	echo. Delete and recreate default profile folder so there aren't remnants of other profiles...
            	rmdir %default% /S /Q
            	mkdir %default% 
            	ROBOCOPY %share%\Default %default% /S /MIR /R:1 /W:1 /MT:128 /ZB /LOG:C:\defaultProfileApplied-%dept%.log
            	XCOPY %share%\Default\ntuser* %default%\ /H /Y > C:\defaultProfile-ntuser-%dept%.log
            
            	net use %share% /delete 
            
            	EXIT /B
            
            :dots
            	REM just echoing dots in a Function instead of copy pasting them so that it's consistent
            	echo ......................................................................
            	EXIT /B
            
            :funcHead
            	REM A simple function for displaying a consistent header at the start of functions
            	call :dots
            	echo. %~1
            	call :dots
            	EXIT /B
            

            Imma say #wiki -worth?

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 2
            • JJ FullmerJ
              JJ Fullmer Testers @Wayne Workman
              last edited by

              @Wayne-Workman What if anything did you have to change?

              Have you tried the FogApi powershell module? It's pretty cool IMHO
              https://github.com/darksidemilk/FogApi
              https://fogapi.readthedocs.io/en/latest/
              https://www.powershellgallery.com/packages/FogApi
              https://forums.fogproject.org/topic/12026/powershell-api-module

              Wayne WorkmanW 2 Replies Last reply Reply Quote 0
              • Wayne WorkmanW
                Wayne Workman @JJ Fullmer
                last edited by

                @Arrowhead-IT I removed the copy self line so that doesn’t run, as I’m just running the script from the c:\ drive.

                I want all users to use the same profile defaults, so I don’t need more than one.

                I named the group “default” when prompted, and then in the deployment script I just hard coded “default” where it normally grabs the group arguments.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                Daily Clean Installation Results:
                https://fogtesting.fogproject.us/
                FOG Reporting:
                https://fog-external-reporting-results.fogproject.us/

                1 Reply Last reply Reply Quote 1
                • Wayne WorkmanW
                  Wayne Workman @JJ Fullmer
                  last edited by

                  @Arrowhead-IT So - I can copy the profile I’ve set up to a share, and can use a snapin to copy it back down.

                  it appears to copy correctly, because I can see the size change in c:\Users\default

                  However, start menu tile settings are clearly not applying - also I’m still getting the nasty “We’re glad you’re here” stuff upon a user’s first login.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                  Daily Clean Installation Results:
                  https://fogtesting.fogproject.us/
                  FOG Reporting:
                  https://fog-external-reporting-results.fogproject.us/

                  JJ FullmerJ 1 Reply Last reply Reply Quote 0
                  • Wayne WorkmanW
                    Wayne Workman
                    last edited by

                    Ok, update.

                    For whatever reason, the profile didn’t apply for one account, but trying another and it DID apply!

                    Weird…

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                    Daily Clean Installation Results:
                    https://fogtesting.fogproject.us/
                    FOG Reporting:
                    https://fog-external-reporting-results.fogproject.us/

                    1 Reply Last reply Reply Quote 1
                    • JJ FullmerJ
                      JJ Fullmer Testers @Wayne Workman
                      last edited by

                      @Wayne-Workman Hmmm, I haven’t had that login screen popup, there are some group policies in Computer Config → Admin Templates → System → Logon to implicitly stop the sign-in animation/getting started welcome screen. I don’t have them configured.

                      Did the profile that didn’t get created perhaps already have a user folder? i.e the user name was Wayne and it was used to create the profile in the image and its folder still existed in C:\users\Wayne? If the folder already exists it can cause issues. My local files restore script gets around that by waiting for the user profile to be created. The user folder already existing and the computer having just gone through sysprep is the only way I can think of that would make it not work right. And even then, it would usually just create a new one with a user folder named name.domain or something of that sort.

                      Every once in a while I do see some start menu tiles issues. It’s intermittent and I haven’t narrowed it down. All the tiles will be there but the icons are missing. If you resize any tile the icon comes back. I usually just recreate the profile via the script if I find that is happening with a specific profile and it fixes the issue for future deployment. One tile that loves to give trouble randomly is chrome. Stupid chrome. The resize trick doesn’t always work on it and it has to be unpinned and repinned. It doesn’t always happen though, I think it has something to do with chrome’s auto updating to new versions or something.

                      So it isn’t a 100% flawless system. But resizing a couple start screen icons is a lot less time then customizing an entire profile every time. And probably 99% of the time it just plain works for me. Just the occasional start menu pin icon disappears.

                      Have you tried the FogApi powershell module? It's pretty cool IMHO
                      https://github.com/darksidemilk/FogApi
                      https://fogapi.readthedocs.io/en/latest/
                      https://www.powershellgallery.com/packages/FogApi
                      https://forums.fogproject.org/topic/12026/powershell-api-module

                      Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                      • Wayne WorkmanW
                        Wayne Workman @JJ Fullmer
                        last edited by

                        @Arrowhead-IT said in Cortana/Windows Search breaks in default profile:

                        Did the profile that didn’t get created perhaps already have a user folder?

                        Totally possible.

                        there are some group policies in Computer Config → Admin Templates → System → Logon to implicitly stop the sign-in animation/getting started welcome screen.

                        I’ll look into that.

                        So it isn’t a 100% flawless system.

                        Still planning on doing a re-write… I’m just still wrapping my head around Win10 profiles and trying different things still.

                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                        Daily Clean Installation Results:
                        https://fogtesting.fogproject.us/
                        FOG Reporting:
                        https://fog-external-reporting-results.fogproject.us/

                        1 Reply Last reply Reply Quote 1
                        • C
                          csuther3
                          last edited by

                          This is a great post and the script is awesome! However, after multiple tests I’m finding that it does continue to break Cortana and the Start Menu on my image which is Win 10 Enterprise. It does seem to work as intended otherwise, as wallpaper, pinned taskbar programs and Firefox settings all seem to be in place.

                          Wayne WorkmanW JJ FullmerJ 2 Replies Last reply Reply Quote 0
                          • Wayne WorkmanW
                            Wayne Workman @csuther3
                            last edited by

                            @csuther3 that’s strange. I tested on win10 enterprise and the start menu and search remains fine.

                            Something that might help you: I noticed the files copied totaled about 40 ish MB.

                            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                            Daily Clean Installation Results:
                            https://fogtesting.fogproject.us/
                            FOG Reporting:
                            https://fog-external-reporting-results.fogproject.us/

                            1 Reply Last reply Reply Quote 1
                            • JJ FullmerJ
                              JJ Fullmer Testers @csuther3
                              last edited by

                              @csuther3 Are you copying from a profile that already has cortana broken? Because it doesn’t fix it in that manner. You have to start with a fresh standard windows profile, then customize it.

                              Have you tried the FogApi powershell module? It's pretty cool IMHO
                              https://github.com/darksidemilk/FogApi
                              https://fogapi.readthedocs.io/en/latest/
                              https://www.powershellgallery.com/packages/FogApi
                              https://forums.fogproject.org/topic/12026/powershell-api-module

                              C 1 Reply Last reply Reply Quote 1
                              • C
                                csuther3 @JJ Fullmer
                                last edited by

                                @Arrowhead-IT No, Cortana and the Start Menu are both working fine in the source account, but once copied to the default profile Cortana and the Start Menu do not work for any new accounts. I tried creating the profile from a local user account as well as from a domain user account and it did not make a difference. I have my image in a VM so I can use a snapshot to quickly “unbreak” the default profile if you have any thoughts on things to try.

                                JJ FullmerJ 1 Reply Last reply Reply Quote 1
                                • Q
                                  Quazz Moderator
                                  last edited by Quazz

                                  To my knowledge, you can’t just copy profiles from one account to another as it causes issue.

                                  I think the better path to walk is to manipulate the registry entries for the default user profile and save those keys in a reg file to be applied at any time (or alternatively simply collect the registry manipulation in a batch file, same result really).

                                  I use a combination of registry manipualtion and regular file adding/removing to customize the default user. It’s not perfect, but it doesn’t cause issues and has saved us a lot of time.

                                  This part copies the theme from our local NAS and then manipulates the registry entries for default users so it becomes the default theme for any new user.

                                  copy /y "\\path\to\theme\theme.themepack" %SYSTEMROOT%\Resources\Themes\
                                  cmd /c reg load HKU\TempHive "%SystemDrive%\Users\Default\NTUSER.DAT"
                                  cmd /c reg add HKU\TempHive\Software\Microsoft\Windows\CurrentVersion\Themes /v CurrentTheme  /t REG_SZ /d "%SYSTEMROOT%\Resources\Themes\theme.themepack" /f
                                  cmd /c reg unload HKU\TempHive
                                  
                                  JJ FullmerJ 1 Reply Last reply Reply Quote 1
                                  • JJ FullmerJ
                                    JJ Fullmer Testers @csuther3
                                    last edited by

                                    @csuther3 That is odd, I haven’t had that issue, and I’ve made profiles with this with local and domain accounts successfully, I think doing it from a local account is a better practice though. I also make them from a VM.
                                    Maybe there’s an indication in the log files. There shouldn’t be any sensitive information in the log so post away.
                                    When you create a profile the logs go in a logs folder in that profiles share folder. i.e \profilesShare\Win10\ProfileName\logs
                                    Then when the profile is applied a log is created on the root of the C drive on the computer it was applied on.

                                    Have you tried the FogApi powershell module? It's pretty cool IMHO
                                    https://github.com/darksidemilk/FogApi
                                    https://fogapi.readthedocs.io/en/latest/
                                    https://www.powershellgallery.com/packages/FogApi
                                    https://forums.fogproject.org/topic/12026/powershell-api-module

                                    C 1 Reply Last reply Reply Quote 0
                                    • JJ FullmerJ
                                      JJ Fullmer Testers @Quazz
                                      last edited by

                                      @Quazz That is an intriguing method. Your editing the default NTUSER.dat file instead of just copying over a newly created one. Do you know what the theme contains? I was under the impression that the theme is just the desktop background and things of that nature. I know that the taskbar pins are a mix of something in the ntuser.dat hive and the shortcut icons in AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar. But I don’t know the exact part of the hive that sets that off the top of my head. Does your method customize the taskbar pins and toolbars? The start screen pins are also in a few database files that I have no idea how to edit manually (I have tried only a little), and I think that there are some linked registry hive entries for that too. I think there are still some files that need to be copied for full customization, but I kinda love the idea of editing the original ntuser.dat, but I didn’t think it was as simple as a few commands. I’ve loaded the hive in regedit before, but manual edits in that manner are risky and I ran into some things that were completely in binary.

                                      Another thing I customize is a old fashioned startmenu. I figured this out with windows 8. Right click the taskbar and go to toolbars→new toolbar and point it to “%APPDATA%\Microsoft\Windows\Start Menu\Programs” This will point it to the current user’s start menu. I then customize that folder down to just a few organized folders with the installed programs. (I hide instead of deleting the default windows system shortcuts though, because otherwise sfc /scannow thinks they’re missing and restores them.) I also unlock the taskbar and move it over to the left (sometimes have to drag taskbar buttons to the right of it) then re-lock the taskbar and violia old fashioned start menu programs menu. None of this forcing alphabetic order without any subfolders and a bunch of windows apps you don’t care about (not that all windows apps are useless, they just aren’t really needed in a business environment). Granted, I believe that I did find a registry entry linked to that toolbar and it’s path and location on the taskbar. I tried to create it into a machine instead of user hive to no avail. But perhaps I might be able to utilize this method for the ntuser.dat.

                                      TL;DR
                                      Cool script, I’m going to take that idea and see if it improves the stability of my script for the ntuser.dat aspect.

                                      Have you tried the FogApi powershell module? It's pretty cool IMHO
                                      https://github.com/darksidemilk/FogApi
                                      https://fogapi.readthedocs.io/en/latest/
                                      https://www.powershellgallery.com/packages/FogApi
                                      https://forums.fogproject.org/topic/12026/powershell-api-module

                                      Q 1 Reply Last reply Reply Quote 0
                                      • Q
                                        Quazz Moderator @JJ Fullmer
                                        last edited by

                                        @Arrowhead-IT The theme sets system sounds and background such only, yes.

                                        For taskbar pins, I simply copy over pre-created shortcut links to the appropriate folder.

                                        Removing the default ones is trickier because there doesn’t seem to be a built-in way of accomplishing it.

                                        I’m still working on a lot of this stuff, but I believe currently I simply remove them during setupcomplete from both the default and currently created user. I haven’t been able to test this out yet however.

                                        “%SystemDrive%\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Windows Media Player.lnk” should be the path to the windows media player link for example.

                                        JJ FullmerJ 1 Reply Last reply Reply Quote 1
                                        • C
                                          csuther3 @JJ Fullmer
                                          last edited by

                                          @Arrowhead-IT

                                          Below are the logs if you would like to take a look. I did build a fresh image and only made a few minor alterations to the source profile and tested it, and your script worked fine for me, the new profiles from that point on had working Cortana & Start Menu. So there must be something in this particular image that isn’t playing nice with your script, not exactly sure what it is though.

                                          0_1463760323925_logs.zip

                                          JJ FullmerJ 1 Reply Last reply Reply Quote 1
                                          • JJ FullmerJ
                                            JJ Fullmer Testers @Quazz
                                            last edited by

                                            @Quazz said in Cortana/Windows Search breaks in default profile:

                                            “%SystemDrive%\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Windows Media Player.lnk” should be the path to the windows media player link for example.

                                            That is where the shortcut files go, but if you just put a shortcut there it won’t appear on the taskbar, and if you take one out it will just break the link. You have to have the registry entry in there too. I believe the reg key is all binary code and found in the ntuser.dat hive under Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband, so could copy that key from a customized profile in the HKCU hive to the default ntuser.dat hive along with the .lnk shortcut files in the appdata path and it would work.

                                            @Wayne-Workman In your plans to re-write it, you might consider a batch function for each aspect with this registry method for the ntuser.dat file. Since my script simply copies the default profile folder to a share, adding in this method of editing the ntuser.dat leaving the original windows defaults in place might be a better practice. I would probably make a function with what Quazz shared for copying reg entries to the ntuser.dat hive. Then just have to figure out where each thing is in the registry. Task bar pins, theme, taskbar toolbars, windows explorer settings like not showing hidden files and showing this pc instead of recent as default. Stuff like that. It’s certainly easier to just copy the ntuser.dat file, but it would probably be a better practice to seperate them. Which could also make it possible to edit just one part of a given profile. I will probably play with this idea early next month myself, but I figured I’d share my ideas for rewriting.

                                            The other question I want to find the answer to is how to set app defaults so they are set proper. That one doesn’t save in my profile script and has to be set manually for each user, which is rather annoying, especially with the win 10 1511 default app resets. P.s. I did find a reg key that fixes that elsewhere and have a script that applies the key on startup in my default profiles.

                                            Windows Registry Editor Version 5.00
                                            
                                            
                                            ;Description: Prevents Windows 10 from resetting the file associations
                                            ;... by setting NoOpenWith registry value for all the modern apps.
                                            ;Created on Feb 13 2016 by Ramesh Srinivasan
                                            ;The Winhelponline Blog
                                            ;Tested in Windows 10 Build 10586
                                            ;http://www.winhelponline.com/blog
                                            
                                            ;-------------------
                                            ;Microsoft.3DBuilder
                                            ;-------------------
                                            ;File Types: .stl, .3mf, .obj, .wrl, .ply, .fbx, .3ds, .dae, .dxf, .bmp
                                            ;... .jpg, .png, .tga
                                            
                                            [HKEY_CURRENT_USER\SOFTWARE\Classes\AppXvhc4p7vz4b485xfp46hhk3fq3grkdgjg]
                                            "NoOpenWith"=""
                                            
                                            ;-------------------
                                            ;Microsoft Edge
                                            ;-------------------
                                            ;File Types: .htm, .html
                                            [HKEY_CURRENT_USER\SOFTWARE\Classes\AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9]
                                            "NoOpenWith"=""
                                            
                                            ;File Types: .pdf
                                            [HKEY_CURRENT_USER\SOFTWARE\Classes\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723]
                                            "NoOpenWith"=""
                                            
                                            ;File Types: .svg
                                            [HKEY_CURRENT_USER\SOFTWARE\Classes\AppXde74bfzw9j31bzhcvsrxsyjnhhbq66cs]
                                            "NoOpenWith"=""
                                            
                                            ;File Types: .xml
                                            [HKEY_CURRENT_USER\SOFTWARE\Classes\AppXcc58vyzkbjbs4ky0mxrmxf8278rk9b3t]
                                            "NoOpenWith"=""
                                            
                                            ;-------------------
                                            ;Microsoft Photos
                                            ;-------------------
                                            ;File Types: .3g2,.3gp, .3gp2, .3gpp, .asf, .avi, .m2t, .m2ts, .m4v, .mkv
                                            ;... .mov, .mp4, mp4v, .mts, .tif, .tiff, .wmv
                                            [HKEY_CURRENT_USER\SOFTWARE\Classes\AppXk0g4vb8gvt7b93tg50ybcy892pge6jmt]
                                            "NoOpenWith"=""
                                            
                                            ;File Types: Most Image File Types
                                            [HKEY_CURRENT_USER\SOFTWARE\Classes\AppX43hnxtbyyps62jhe9sqpdzxn1790zetc]
                                            "NoOpenWith"=""
                                            
                                            ;File Types: .raw, .rwl, .rw2 and others
                                            [HKEY_CURRENT_USER\SOFTWARE\Classes\AppX9rkaq77s0jzh1tyccadx9ghba15r6t3h]
                                            "NoOpenWith"=""
                                            
                                            ;-------------------
                                            ; Zune Music
                                            ;-------------------
                                            ;File Types: .aac, .adt, .adts ,.amr, .flac, .m3u, .m4a, .m4r, .mp3, .mpa
                                            ;.. .wav, .wma, .wpl, .zpl
                                            [HKEY_CURRENT_USER\SOFTWARE\Classes\AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs]
                                            "NoOpenWith"=""
                                            
                                            ;-------------------
                                            ; Zune Video
                                            ;-------------------
                                            ;File Types: .3g2,.3gp, .3gpp, .avi, .divx, .m2t, .m2ts, .m4v, .mkv, .mod
                                            ;... .mov, .mp4, mp4v, .mpe, .mpeg, .mpg, .mpv2, .mts, .tod, .ts
                                            ;... .tts, .wm, .wmv, .xvid
                                            [HKEY_CURRENT_USER\SOFTWARE\Classes\AppX6eg8h5sxqq90pv53845wmnbewywdqq5h]
                                            "NoOpenWith"=""
                                            

                                            I am talented at Getting sidetracked. What was I replying to here? Whatever, it was all useful information right?

                                            Have you tried the FogApi powershell module? It's pretty cool IMHO
                                            https://github.com/darksidemilk/FogApi
                                            https://fogapi.readthedocs.io/en/latest/
                                            https://www.powershellgallery.com/packages/FogApi
                                            https://forums.fogproject.org/topic/12026/powershell-api-module

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 2 / 5
                                            • First post
                                              Last post

                                            207

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project