Showing posts with label runas. Show all posts
Showing posts with label runas. Show all posts

Monday, October 21, 2013

Changing XP Wallpaper from ZENworks

I mentioned in a previous post  ( Changing XP Background (Wallpaper) Images ) about creating a ZENworks application to reset the background or wallpaper image.  But I should have tested my app more thoroughly as it took a little tinkering to get it working.  ZENworks veterans probably wouldn't have made this mistake, but as I'm new to version 11 (made the jump from 7) I did make the mistake.

The most common bundle action that I use is one of the "Launch" actions, whether it's an executable or an installer.  Those actions by default run as the logged in user.  What I found out is that "Registry Edit" actions by default execute as the System account.  Which is probably great for making sure that the settings apply, but that's not so great when you're working in HKEY_CURRENT_USER.  But there's an easy fix for that.

In the action properties just go to the Advanced tab and look at the "Run Action As" section.  There's two ways to run it as System and as User.  When you pick System there's one optional setting "Apply HKEY_CURRENT_USER changes to the logged in user's hive instead of .DEFAULT".  The is fix is to check that box to make it work.  Easy enough, right?  I probably could have used the run as user option, but I tried checking the box worked and that fixed it, so I didn't try it with the user option set.  

Here's picture so you can check that we're both looking at the same thing.   


Wednesday, September 23, 2009

New ways to access the print wizard

Ever been working on a machine that's been locked down and restricted from controlling the printer settings?  It can be a real pain to have to log out and log back in as another user to change settings.  You can work around these restrictions by combining the RUNAS command with PRINTUI.DLL and the RUNDLL32.


You can get into the inner workings of PRINTUI.DLL to see exactly what you can do with a peek at the help screen:
RUNDLL32 PRINTUI.DLL,PrintUIEntry /?


You can check out Rob Van der Woude's page at http://www.robvanderwoude.com/2kprintcontrol.php for a little more detail on the workings.  He also mentions a few VBS files (%windir%\System32\*prn*.vbs) that come with Windows XP that can also help when working with printers.  I've seen them, looked through them, played with them, but never tried to use them so I cannot say as to whether or not they would help on a locked down machine.  But, I have successfully used RUNAS with the PRINTUI.DLL to work with printers on a locked down machine.