Jump to content

How can I install and enable a themepack for another user in Windows 7?


Recommended Posts

Guest Erik78
Posted

I'd like to write a powwershell script to set a Theme (.themepack-File) for all the users on my system. I already did this successfully in Windows XP, but cannot make it run in Windows 7. The problem is that the Theme is later available for the other user, but not activated. When I try to set the theme for a user that is currently logged on, it works flawlessly of course. Here is what I do in my scrupt, the $cred variable already contains the user credentials required. I run this script as an addministrator user from another user account.

 

$args = "/K "

$args += "`"$env:MYTESTPATH\themes\Touch-Win7.themepack`""

 

$cred = Get-CredentialMachineUser

$proc = start-process -PassThru -LoadUserProfile -cred $Cred -ArgumentList $args $env:SystemRoot\System32\cmd.exe

 

When I run this script, I get a messagebox, probably from the Windwos 7 Thememanager containing the following error message:

 

**[Window Title]

::{26EE0668-A00A-44D7-9371-BEB064C98683}\1\::{ED834ED6-4B5A-4BFE-8F11-A626DCB6A921},?Theme=C%3A%5CUsers%5Cmachine%5CAppData%5CLocal%5CMicrosoft%5CWindows%5CThemes%.theme

[Content]

Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.

[OK]**

 

Do you have any idea what's going wrong, and how I can enable a themepack successfully for another user?

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...