Hej Verden!

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Posted in Ikke kategoriseret | Leave a comment

Using TS variables when running a script under a different account.

Posted in SCCM / OSD | Leave a comment

Capture none syspreped image using SCCM (Running imagex from a TS)

Posted in SCCM / OSD | 2 Comments

Install XP MUI from SCCM Task Sequence.

 

image Create a new package called Microsoft XP MUI
 
Note: It is not necessary to create a program for the package unless you intend to advertise the package to clients.
image The Microsoft XP MUI package should contain the files from the root of one if the MUI installation CD’s, and any language packages you wish to install.

In this case a included the Danish, Russian, Chinese (simplified) and Chinese (traditional) language MUI’s.

image Now open your TS in edit mode, and add a Run Command Line step at the end of your TS (or at least after the Mini setup has finished).

Point to the newly created Microsoft XP MUI package.

In the Command line: write

MUISETUP.EXE /i 0406 /d 0406 /r /s 

Note: This will install Danish MUI and set Danish menus as default. To setup other languages look in MUISETUP.HLP .

image If you would like to use variables instead, jus replace the language codes with variables

MUISETUP.EXE /i %UserLocal% /d %UserLocal%  /r /s 

image

Right click your deployment collection, and choose Modify collection settings. Now add the variable UserLocale and assign the value 0406.

That value will then be used during deployment, In this way you can place computers in different collections and have different MUI’s installed on them.

 

Be aware that this will only work for region 1 and 2 (Europe and US) out of the box…

If you wish to add MUI’s for Asian or middle east type languages you will have to add support for these, by adding the necessary files to  your image, either before you capture, or during sysprep. A guide for doing that can be found here http://kongkuba1.spaces.live.com/blog/cns!EEFF1607E296E5AB!265.entry

A result of not adding these files will be a prompt for the location of the source XP CD.

Advertisement
Posted in Language | 1 Comment

Hide product key from TS step

 

If you do not want other admin with access to your TS editor to se the product key in the “apply windows settings” step, you can hide it in a variable.

image In your “Apply Windows Settings” step, replace Product key: with a variable. In this case i use %key%
image Right click the collection you have advertised the TS to, and click Modify collection Settings.
image Choose the Collection Variables TAB and click on the starburst image
image type in the name of the variable key and supply the product key twice.

Remember to check the Do not display the value in the ConfigMgr console. And i would suggest using copy paste!

image The key variable now have a hidden value.

Note: the key will still be visible in the sysprep file, if it is opened during deployment, between the TS step, and the completion of the mini setup. 

Posted in SCCM / OSD | 1 Comment

Changing boot order in Vista/Windows 7

If you do not want to play around with BCDedit or 3rd party tools like EasyBCD, it is quit easy to change boot order from within Windows 7.

I Know that this is kind of low tech, but I notice a lot of  questions out there regarding, how to change the boot order using BCDedit.

Here goes:

image Go to Computer – Properties.

Note: You can also do this by hitting the key combo Windows + Pause/Break or

image Click on Advanced System settings
image Open the Advanced tab

In the Startup and Recovery section click on Settings

Note: run sysdm.cpl to go directly to System Properties

image Now choose the OS you want to be the default one to load.
Posted in Tips and Tricks | Leave a comment

Resizing a Microsoft Virtual Hard Disk (VHD)

Ever run into problems with a VHD that ran out of space?? I did just yesterday, and found a couple of solutions for that problem. Here are two ways of dealing VHD size issues .

Methode 1:

Using 3rd part tool “VDH Resizer”

image Download and install VHD Resizer.

http://vmtoolkit.com/files/folders/converters/entry87.aspx

image Open VhdResizer and point to the file you VHD you want resized.

Choose a location to put the new file, and choose a new size.

The resizing process might take a while, but be patient, it will be worth the wait.  

When the resizing is done start a the virtual pc with the new VHD

image Open computer management
image Expand Storage and click on Disk Managment.
image Note that the extra space you just created still sits as unallocated space.
image Right click the active disk and choose Extend volume
image Click Next
image If you want to use the entire amount of added space just choose default settings and click Next. 
image Click Finnish
image You will now notice that the disk now uses the entire volume.

Methode 2:

Using Microsoft  ImageX. (on Windows 7)

image Open computer management on your local computer.

Expand Storage, right click  Disk Management and click on Attach VHD.

Note: This is also a nice way to add and remove files from your VHD’s

image Point to the VHD in question.
image Notes that the VHD has now been added as a disk (in this case I:)
image Run Deployment tools command prompt with administrative rights
image Capture an image of the VHD:

imagex /capture I: C:NewVHD.wim "disk1" /compress max

image The VHD has now been captured as a WIM image.
image From Disk Management click Create VHD
image choose a location to put the VHD, and the size you want it to be…

Click OK

image There will now be a new Unknown disk with the size you just choose.

Right click and click Initialize Disk

image click OK
image Right click the volume and choose New Simple Volume
image Click Next
image Choose default to use the entire volume.

Click Next

image Choose a drive letter and click Next
image Click Next
image Click Finish
image Note that there now is a new Volume with a drive letter assigned (in this case H).
image Open Deployment Tools Command Prompt as Administrator
image to ad the image you captured earlier to the new VHD, type

iamgex /apply C:newVHD.wim 1 H:

image After a while the image will have been applied to the VHD.
image From Disk management, right click the VHD disk and click Detach VHD. 
image Make sure “Delete the virtual hard disk…” is NOT checked

Click OK

 

There you go. Two methods of changing the size of your VHD’s

Posted in Virtual PC | Leave a comment

Enable Integration features for Virtual PC Beta running server 2008

Running on Windows 7 it obvious you would use the new Windows Virtual PC Beta.

There is a problem however, when you want to run a Server2008 virtual PC. The server it self runs great, and is much faster than Virtual PC2007, but like in Virtual server2005 Drag’n Drop is not supported.

This Should basically not be a problem because the integration features gives you access to all the host machines drives (including USB).  Only problem is that it doesn’t seam to work on Server2008. It might work at first, but after a couple of reboots the integration features suddenly will not install…

The workaround is simply to restart the “Virtual PC Integration Components Services Application” service.

Her is what I did after the integration features started to error.

image After starting the virtual 2008 server, it takes quiet a while for the installing integration features to run, and eventually a dialog appears telling you that the features could not be enabled.

Click Continue. 

image If you click Tools you will notice that it is not possible to enable integration features (grayed out)

Click Settings

image In settings choose Integration Features  and remove the check mark in Enable at startup.

I do this to skip the install integration features dialog as it will fail anyway.

Note: If you restart the server with the features enabled, it will try and install again, and fail !!

image Star a command prompt and type
net stop “Virtual PC Integration Components Services Application”

net start ”Virtual PC Integration Components Services Application”

image If you click Tools you will notice that it is now possible to enable integration features 

Click Enable Integration Features

image If you open windows explorer you will notice that there is now a lot of new disks pointing to the host machines locale drives and shares.

 

That’s it.  Integration features are now available.

Posted in Virtual PC | Leave a comment

Try out Windows 7 without messing up your XP/VISTA installation

I just love Windows 7 RC… It runs much better than VISTA, and has lots of super nice features.  (Get it here http://www.microsoft.com/windows/windows-7/ )

One of these features is the ability to boot from a VHD, which actually means that I can run Win7 on my laptop, without having to reinstall my existing OS, mess around with partitioning or having to install some boot manager in order to run it a dual boot environment. 

So what does this mean exactly!! Well for me it means that I can still have my Vista installed PC where I know my Microsoft training material works for when I’m teaching, and where i can always find a working driver for my hardware. further more, i don’t have to worry about the Windows 7 installation once the final release is out, as i can just remove the VHD from my hard disk.

Her is a Step by Step guide on how to do it.

image From your existing Vista /XP machine boot Your Windows 7 CD.
Once the Install Windows box appears, press SHIFT F10 to open a command prompt.
image Crate a folder called VHD on your hard disk

NOTE: this folder you will contain the Win7 virtual disk, so make sure there is space enough. At least 15 GB.

image You will now create the VHD to install Win7 on. This is done from DISKPART. Start diskpart by typing diskpart in the prompt.
image type:
create vdisk file=C:VHDWin7.vhd type=fixed maximum=15000

Note: This will create a fixed size virtual disk. If you leave out type=fixed the VHD will be a dynamical expanding disk.

image You must now select the newly created disk, and attach it to to system.

select vdisk file=C:vhdWin7.vhd

attach vdisk

image Exit DISKPART by typing exit, and the close the prompt.

in the Install Windows box choose your language settings, and the click NEXT

image click Install now
image Accept the license terms, and click Next
image In the “which type of installation do you want?” box make sure to choose Custom.
image Choose the virtual disk you created, and click Next

Just ignore the warning saying that windows cannot be installed to the disk.
image

Note: It should be easy to identify by looking at the size, that should be almost the same size you choose when you created the VHD.

image The installation will now run trough the normal setup process. and once finished, it will automatically create a dual boot setup, wit your old OS.
image To change the Boot order start a Command prompt with elevated privileges.

Right click Command Prompt and click Run as administrator

image type BCDedit /v to list entrees in the boot store.

NOTE: this must be done from the Win7 installation

image

Change the description for your VHD installation to say.  "Windows 7 VHD"

bcdedit /set {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} description "Windows 7 VHD"

Replace xxxxx… the Win7 GUID

____________________________

Add VHD installation as the last choice in the boot list.

bcdedit /displayorder {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} /addlast

If you have multiple entries, just type them in your preferred order separated by spaces, and drop the /addlast option.

 

That it.. Enjoy your new Win7 installation, i know you will love it..

Posted in Windows 7 | Leave a comment

Auto run action when a new user loges on / add setting to HKEY_CURRENT_USER

Ever wanted to set a registry key to automate some stuff for your users, only to find out that the key resides in HKEY_CURRENT_USER making it quit difficult to have it work for all users on the pc. You can of cause set this in your login script, but setting registry fixes is not really a job for the login script.

During a deployment scenario, where only the administrator is logged in, we can obviously us the run once command from the registry, but that only run once on the computer, and not once pr. USER. We could also manipulate the NTUSER.DAT file and add settings there, but not all settings from ntuser.dat is transferred to the current user.

What we could do is to create an entry in the “HKEY_LOCAL_MACHINESOFTWAREMicrosoftActive SetupInstalled Components” key. Basically the entrees in this key is the stuff you se in the upper left hand corner during first log on. (the Personalized Settings box). Most if not all entries in this key will be in the GUID format, but it does not have to be..

Open REGEDIT and follow the instructions below.

image Right click Installed Components and click New KEY, and name the key {Z-UserSetup}.

NOTE: The different keys are executed in number and alphabetical order, so to make sure our key is executed last we name it Z-“something” and put it in { }. Everything not in curly braces wile be executed first.

image In the new key create two new String Values (REG_SZ) and name them
StubPath and Version.

StubPath has info on what we want to run, and could be any executable, script, run.dll e.t.c.

Version will show in the Installed Components section in CURRENT_USER

(Default) will be the info showed in the Personalized settings box during logon. (can also be sat as @=”info”)

 

Now just reboot and log on with a different user, and notepad will be executed during logon.

If you want to set this with a script ,then here small one for disabling the Windows Media Player wizard.


Set oShell=CreateObject("WScript.Shell")

RegPath="HKEY_LOCAL_MACHINESOFTWAREMicrosoftActive SetupInstalled Components{Z-UserSetup}"
oshell.RegWrite Regpath & "Stubpath", "reg.exe add HKCUSOFTWAREMicrosoftMediaPlayerPreferences _
/v AcceptedPrivacyStatement /t REG_DWORD /d 1 /f", "REG_SZ"
oshell.RegWrite Regpath & "Version", "1.00", "REG_SZ"
oshell.RegWrite Regpath & "@", "Accept MP Privacy Statement", "REG_SZ"


You can add as many entrees as you want, just be aware of the execution order.

Posted in Tips and Tricks | Leave a comment