Sign in to follow this  
Followers 0
Grantson

Editing the registry as a basic user

5 posts in this topic

Hi Guys

I have a user who is having issues with outlook due to a large pst file

A gpo was saet up by one of the domain admins to increase the max file size of the pst across the entire network but this one users pc has not applied the gpo

This menas that every morning (while the server admin guys investigate) we need to connect to the users machine run regedit as admin and make the change in hkey_users as standard users cant edit the keys within hkey_current_user\\Software\Policies\Microsoft\...

i cooked up this script to try and help the user out for the next few days while the gpo issue is investigated but it wont change the key value

while 1

$i += 1

$var=RegEnumKey("HKEY_USERS",$i)

If @error <> 0 Then ExitLoop

If StringLen($var) >12 And StringLen($var) <48 Then

$user = RegRead("HKEY_USERS\"&$var&"\Volatile Environment","USERNAME")

if $user = @UserName Then

;$command = "reg add HKEY_USERS\" & $var & "\Software\Policies\Microsoft\office\14.0\outlook\pst /v maxlargefilesizetest /t REG_DWORD /d 51200 /f"

$command = "reg add /?"

RunAs("Administrator",@ComputerName,"###",0,"CMD /k " & $command)

EndIf

EndIf

Wend

As it is it will display the help file for reg add, if i switch the command to the acctual one to make the change i get Access denied

If i change the command to whoami it confirms that the command prompt is running as local admin

If i manually run cmd as local admin and paste int the reg add lien it works

Can anyone shed any light on whats going on?

Thanks

Share this post


Link to post
Share on other sites



Hi, Grantson. Are you an administrator on the box? If so, why not just open regedit from your machine, then connect remotely to the users machine? You're then connected with your credentials, and can change the key or value as needed.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

The key needs to be changed every time the users logs into his PC i was hoping to compile the exe and stick it on his desktop so that he could make the change if he is working out of helpdesk hours etc

Share this post


Link to post
Share on other sites

A gpo was saet up by one of the domain admins to increase the max file size of the pst across the entire network but this one users pc has not applied the gpo

The correct question is why is the GPO not applied to that PC? The correct answer to this thread is to contact the admin and get that fixed.

If the domain policy was intentionally blocked to that machine (unlikely, but possible) then it could still be implemented in a local policy. Still something the domain admin should be involved in when making changes to a member computer.

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

As I said the GPO is a bug we are aware of and it is being investigated by the server admin team

Im trying to provide a temp fix for the user so that he can open outlook without having to call me or my colleagues on the helpdesk to get the registry key modified.

As i said above if he decides to work in the evening or at the weekend at the moment then hes out of luck

The correct question is why is the GPO not applied to that PC? The correct answer to this thread is to contact the admin and get that fixed.

If the domain policy was intentionally blocked to that machine (unlikely, but possible) then it could still be implemented in a local policy. Still something the domain admin should be involved in when making changes to a member computer.

;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0