Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×

zeusabj

Member
  • Content Count

    34
  • Joined

  • Last visited

  • Donations

    $0.00 

Community Reputation

0 Neutral

About zeusabj

  1. Hey Yzöwl, another dumb question. Why did you use "=" after each "echo"? Is there a reason for that or is it just your preferred programming style? Also I've seen other batch scripts that use "goto :eof". Obviously that is used to exit the batch script but you never see the actual ":eof" function anywhere in the script. Is it just implied or could I name it anything (like "goto :nothing"); leave ":nothing" out of my script and have it work the same way?
  2. Now see, that's why it says "Wise Owl" under your avatar. Seriously, thank you *so* very much for taking the time to write up that reply. That's the exact kind of constructive criticism I have been looking for. I've only been writing batch scripts for about a year now and I'm embarrassed to say there's still a lot I don't understand. Also I'm located in a small town and there aren't many other technical people around, so I rely on the Internet a lot to bounce questions off other technical individuals. Would you believe it took me almost two whole days to come up with that code on my own? If I'
  3. This was my final solution, and it seems to work well: @ECHO OFF :: Prepare the Command Processor SETLOCAL ENABLEEXTENSIONS SETLOCAL ENABLEDELAYEDEXPANSION :: Defaults (directory paths must be in quotes): :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: SET _source="C:\temp\copy 1" SET _destination="C:\temp\dest 1" "C:\temp\dest 2" "C:\temp\dest 3" "C:\temp\dest 4" "C:\temp\dest 5" SET _options=/MIR /XJ /NJH /NDL /NJS /NS /NC /R:1 /W:10 :: Customize What Gets Copied ::SET _filelist= ::SET _excludedfiles=/XF ::SET _excludedirs=/XD :: Confirmation: ::::::
  4. Awesome, I never realized it could be as simple as putting spaces between the times in my variable declaration. I'll try that and post my final code here for you guys to look at.
  5. I won't bore you with the details, just know that this has to be a BATCH SCRIPT (I can't do this using another language or program and achieve the desired affect). Here's my current script: @echo off :: Defaults: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Backup 01 set _sourcedir01=C:\temp\copy1 set _destdir01=H:\Backups\ set _options01=/MIR /XJ /NJH /NDL /NJS /NS /NC /R:1 /W:10 :: Confirmation: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: echo -------------------------------------------------------------
  6. Thanks for sharing this. Always love to know what items other SysAdmins are setting as default in their Windows installs. I incorporated a few of your tweaks into my own post-install script.
  7. If anyone is interested I found an excellent solution for this dilemma here: http://social.technet.microsoft.com/Forums/en/mdt/thread/54f71ff7-81b6-4dff-9fb1-845a2efb1026 Aaaaand here is the script I wrote to do the work for me (with help from that post): @echo off :: Set script execution directory set _thisdir=%~dp0 :: Take ownership of original TakeOwn.exe /F %SystemRoot%\Web\Wallpaper\Windows\img0.jpg :: Replaces acls with default inherited acls icacls %SystemRoot%\Web\Wallpaper\Windows\img0.jpg /reset :: Rename original RENAME %SystemRoot%\Web\Wallpaper\Windows\img0.jpg imgX.jpg ::
  8. mount and write, may need to take ownership Yeah figured, ah well, at least I have a solution now, thanks guys!
  9. Do you have a workaround for the "TrustedInstaller" permissions issue, or do you just mount an image and overwrite it in there?
  10. Well, I knew I wasn't crazy, check this out: http://social.msdn.microsoft.com/Forums/en/windowsuidevelopment/thread/1703c3f4-a2ea-4c4a-a73f-a93e6d51b2bb So looks like my only solution is to overwrite this wallpaper file: Which seems like a rather sloppy approach, but hey if it works....
  11. I'm sorry Mr. Jinje! I did read your link! That was a typo! I pasted a code snippet from an earlier attempt! I did find and correct that error *BEFORE* I posted that response. So the script I ran actually did use 'REG ADD "HKU\Hive.......' and it still did not work. I have edited my above post to remove the typo. Just to make sure it *would* work I decided to make another script and apply the registry key for the user currently logged in. Here's my script: :: Change Wallpaper REG ADD "HKCU\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "C:\Windows\Web\Wallpaper\Nature\img6.jpg" /f :: Refr
  12. So I changed my code to this: REM Load the default profile hive REG LOAD HKU\Hive C:\Users\Default\NTUSER.DAT REM Configure the default user profile REG ADD "HKU\Hive\Control Panel\Desktop" /v WallPaper /t REG_SZ /d "C:\Windows\Web\Wallpaper\Nature\img6.jpg" /f REM Unload the default profile hive REG UNLOAD HKU\Hive All the commands run successfully. So I reboot, create a new account, login as the user, and still no custom wallpaper. I'm just at a total loss! What in the world am I doing wrong here? Has anyone ever actually gotten this default registry hive thing to work? Can someone maybe
  13. Yep, that should work (but only on a per computer basis), I don't know about the path in your sample, look at the sample from post #6 in the thread I linked. No such thing a "Default User" anymore, you are editing the wrong path entirely. In windows 7 Default User is now "Default". Just change your path to C:\Users\Default\ntuser.dat, instead of %USERPROFILE%\..\ Maybe that is the whole problem. reg load "hku\zzz" "C:\Users\Default\NTUSER.DAT" REG LOAD "HKU\Default" "%USERPROFILE%\..\Default User\NTUSER.DAT" I was under the impression that using "Default User" would still work because
  14. So hold the phone, this can't be done within windows? I have to create the image first, then mount it, then run these commands? I have been doing my deployment to a VM and logging in as Administrator, then running this *within* the Windows 7 install I intend to capture. Could that me my problem?
  15. I am running this from the administrator profile, rebooting the computer. Creating a new user account from scratch and then logging in as that user to test. Shouldn't that work?
×
×
  • Create New...