Changing the Username

  • Thread starter อะไรà¸à¹‡à¸•à¸²à¸¡
  • Start date
B

Bob Buckland ?:-\)

Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>
--
Let us know if this helped you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

For Everyday MS Office tips to "use right away" -
http://microsoft.com/events/series/administrativetipsandtricks.mspx
 
B

Bob Buckland ?:-\)

Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>
--
Let us know if this helped you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

For Everyday MS Office tips to "use right away" -
http://microsoft.com/events/series/administrativetipsandtricks.mspx
 
B

Bob Buckland ?:-\)

Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>
--
Let us know if this helped you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

For Everyday MS Office tips to "use right away" -
http://microsoft.com/events/series/administrativetipsandtricks.mspx
 
B

Bob Buckland ?:-\)

Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>
--
Let us know if this helped you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

For Everyday MS Office tips to "use right away" -
http://microsoft.com/events/series/administrativetipsandtricks.mspx
 
B

Bob Buckland ?:-\)

Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>
--
Let us know if this helped you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

For Everyday MS Office tips to "use right away" -
http://microsoft.com/events/series/administrativetipsandtricks.mspx
 
B

Bob Buckland ?:-\)

Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>
--
Let us know if this helped you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

For Everyday MS Office tips to "use right away" -
http://microsoft.com/events/series/administrativetipsandtricks.mspx
 
À

อะไรà¸à¹‡à¸•à¸²à¸¡

Bob said:
Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>

Hi Bob

We managed to write a script which checks to see if the registry value
is the one we want to delete, and if it is the key is changed. If it
isn't it's left alone so the users don't have to see the small dialogue
box which pops up when you first start an application. The one with your
name and initials in it.


Change the xxx to be the username you want to delete. The wrapping in
the e-mail may cause some lines to be wrong.


<start script>


Set WshShell = Wscript.CreateObject("WScript.Shell")

On error resume next
strValue =
WshShell.RegRead("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")
if err.number <> 0 then

On error goto 0

'Wscript.Echo "Error reading Username"

wscript.Quit
end if
On Error Goto 0

ReDim charValues (ubound(strValue))

for i=0 to ubound(strValue)-2 step 2
charValues (i)=Chr(strValue(i))
next
charString = join(charValues,"")

'msgbox charString

'msgbox len(charString)

'if charString = "xxx" then

'**** check the case before use ****

if charString = "xxx" then

WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserInitials")
WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")

'Wscript.echo "Values deleted"

End if


</end script>
 
À

อะไรà¸à¹‡à¸•à¸²à¸¡

Bob said:
Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>

Hi Bob

We managed to write a script which checks to see if the registry value
is the one we want to delete, and if it is the key is changed. If it
isn't it's left alone so the users don't have to see the small dialogue
box which pops up when you first start an application. The one with your
name and initials in it.


Change the xxx to be the username you want to delete. The wrapping in
the e-mail may cause some lines to be wrong.


<start script>


Set WshShell = Wscript.CreateObject("WScript.Shell")

On error resume next
strValue =
WshShell.RegRead("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")
if err.number <> 0 then

On error goto 0

'Wscript.Echo "Error reading Username"

wscript.Quit
end if
On Error Goto 0

ReDim charValues (ubound(strValue))

for i=0 to ubound(strValue)-2 step 2
charValues (i)=Chr(strValue(i))
next
charString = join(charValues,"")

'msgbox charString

'msgbox len(charString)

'if charString = "xxx" then

'**** check the case before use ****

if charString = "xxx" then

WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserInitials")
WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")

'Wscript.echo "Values deleted"

End if


</end script>
 
À

อะไรà¸à¹‡à¸•à¸²à¸¡

Bob said:
Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>

Hi Bob

We managed to write a script which checks to see if the registry value
is the one we want to delete, and if it is the key is changed. If it
isn't it's left alone so the users don't have to see the small dialogue
box which pops up when you first start an application. The one with your
name and initials in it.


Change the xxx to be the username you want to delete. The wrapping in
the e-mail may cause some lines to be wrong.


<start script>


Set WshShell = Wscript.CreateObject("WScript.Shell")

On error resume next
strValue =
WshShell.RegRead("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")
if err.number <> 0 then

On error goto 0

'Wscript.Echo "Error reading Username"

wscript.Quit
end if
On Error Goto 0

ReDim charValues (ubound(strValue))

for i=0 to ubound(strValue)-2 step 2
charValues (i)=Chr(strValue(i))
next
charString = join(charValues,"")

'msgbox charString

'msgbox len(charString)

'if charString = "xxx" then

'**** check the case before use ****

if charString = "xxx" then

WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserInitials")
WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")

'Wscript.echo "Values deleted"

End if


</end script>
 
À

อะไรà¸à¹‡à¸•à¸²à¸¡

Bob said:
Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>

Hi Bob

We managed to write a script which checks to see if the registry value
is the one we want to delete, and if it is the key is changed. If it
isn't it's left alone so the users don't have to see the small dialogue
box which pops up when you first start an application. The one with your
name and initials in it.


Change the xxx to be the username you want to delete. The wrapping in
the e-mail may cause some lines to be wrong.


<start script>


Set WshShell = Wscript.CreateObject("WScript.Shell")

On error resume next
strValue =
WshShell.RegRead("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")
if err.number <> 0 then

On error goto 0

'Wscript.Echo "Error reading Username"

wscript.Quit
end if
On Error Goto 0

ReDim charValues (ubound(strValue))

for i=0 to ubound(strValue)-2 step 2
charValues (i)=Chr(strValue(i))
next
charString = join(charValues,"")

'msgbox charString

'msgbox len(charString)

'if charString = "xxx" then

'**** check the case before use ****

if charString = "xxx" then

WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserInitials")
WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")

'Wscript.echo "Values deleted"

End if


</end script>
 
À

อะไรà¸à¹‡à¸•à¸²à¸¡

Bob said:
Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>

Hi Bob

We managed to write a script which checks to see if the registry value
is the one we want to delete, and if it is the key is changed. If it
isn't it's left alone so the users don't have to see the small dialogue
box which pops up when you first start an application. The one with your
name and initials in it.


Change the xxx to be the username you want to delete. The wrapping in
the e-mail may cause some lines to be wrong.


<start script>


Set WshShell = Wscript.CreateObject("WScript.Shell")

On error resume next
strValue =
WshShell.RegRead("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")
if err.number <> 0 then

On error goto 0

'Wscript.Echo "Error reading Username"

wscript.Quit
end if
On Error Goto 0

ReDim charValues (ubound(strValue))

for i=0 to ubound(strValue)-2 step 2
charValues (i)=Chr(strValue(i))
next
charString = join(charValues,"")

'msgbox charString

'msgbox len(charString)

'if charString = "xxx" then

'**** check the case before use ****

if charString = "xxx" then

WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserInitials")
WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")

'Wscript.echo "Values deleted"

End if


</end script>
 
À

อะไรà¸à¹‡à¸•à¸²à¸¡

Bob said:
Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>

Hi Bob

We managed to write a script which checks to see if the registry value
is the one we want to delete, and if it is the key is changed. If it
isn't it's left alone so the users don't have to see the small dialogue
box which pops up when you first start an application. The one with your
name and initials in it.


Change the xxx to be the username you want to delete. The wrapping in
the e-mail may cause some lines to be wrong.


<start script>


Set WshShell = Wscript.CreateObject("WScript.Shell")

On error resume next
strValue =
WshShell.RegRead("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")
if err.number <> 0 then

On error goto 0

'Wscript.Echo "Error reading Username"

wscript.Quit
end if
On Error Goto 0

ReDim charValues (ubound(strValue))

for i=0 to ubound(strValue)-2 step 2
charValues (i)=Chr(strValue(i))
next
charString = join(charValues,"")

'msgbox charString

'msgbox len(charString)

'if charString = "xxx" then

'**** check the case before use ****

if charString = "xxx" then

WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserInitials")
WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")

'Wscript.echo "Values deleted"

End if


</end script>
 
À

อะไรà¸à¹‡à¸•à¸²à¸¡

Bob said:
Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>

Hi Bob

We managed to write a script which checks to see if the registry value
is the one we want to delete, and if it is the key is changed. If it
isn't it's left alone so the users don't have to see the small dialogue
box which pops up when you first start an application. The one with your
name and initials in it.


Change the xxx to be the username you want to delete. The wrapping in
the e-mail may cause some lines to be wrong.


<start script>


Set WshShell = Wscript.CreateObject("WScript.Shell")

On error resume next
strValue =
WshShell.RegRead("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")
if err.number <> 0 then

On error goto 0

'Wscript.Echo "Error reading Username"

wscript.Quit
end if
On Error Goto 0

ReDim charValues (ubound(strValue))

for i=0 to ubound(strValue)-2 step 2
charValues (i)=Chr(strValue(i))
next
charString = join(charValues,"")

'msgbox charString

'msgbox len(charString)

'if charString = "xxx" then

'**** check the case before use ****

if charString = "xxx" then

WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserInitials")
WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")

'Wscript.echo "Values deleted"

End if


</end script>
 
À

อะไรà¸à¹‡à¸•à¸²à¸¡

Bob said:
Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>

Hi Bob

We managed to write a script which checks to see if the registry value
is the one we want to delete, and if it is the key is changed. If it
isn't it's left alone so the users don't have to see the small dialogue
box which pops up when you first start an application. The one with your
name and initials in it.


Change the xxx to be the username you want to delete. The wrapping in
the e-mail may cause some lines to be wrong.


<start script>


Set WshShell = Wscript.CreateObject("WScript.Shell")

On error resume next
strValue =
WshShell.RegRead("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")
if err.number <> 0 then

On error goto 0

'Wscript.Echo "Error reading Username"

wscript.Quit
end if
On Error Goto 0

ReDim charValues (ubound(strValue))

for i=0 to ubound(strValue)-2 step 2
charValues (i)=Chr(strValue(i))
next
charString = join(charValues,"")

'msgbox charString

'msgbox len(charString)

'if charString = "xxx" then

'**** check the case before use ****

if charString = "xxx" then

WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserInitials")
WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")

'Wscript.echo "Values deleted"

End if


</end script>
 
À

อะไรà¸à¹‡à¸•à¸²à¸¡

Bob said:
Hi ?????????,
You can't check the date on a registry key but
you can place a dummy file or registry entry that
could be checked by the script (i.e. if == exist
don't run the script).

=======
Thanks Bob.

I'm going to write a VB script to run for each user to get this changed.
Do you know how to get a VB script to only run if a certain registry
key is a certain value? Basically we don't want the Office user
information to change each time a user logs on. Once will be enough.

thanks again >>

Hi Bob

We managed to write a script which checks to see if the registry value
is the one we want to delete, and if it is the key is changed. If it
isn't it's left alone so the users don't have to see the small dialogue
box which pops up when you first start an application. The one with your
name and initials in it.


Change the xxx to be the username you want to delete. The wrapping in
the e-mail may cause some lines to be wrong.


<start script>


Set WshShell = Wscript.CreateObject("WScript.Shell")

On error resume next
strValue =
WshShell.RegRead("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")
if err.number <> 0 then

On error goto 0

'Wscript.Echo "Error reading Username"

wscript.Quit
end if
On Error Goto 0

ReDim charValues (ubound(strValue))

for i=0 to ubound(strValue)-2 step 2
charValues (i)=Chr(strValue(i))
next
charString = join(charValues,"")

'msgbox charString

'msgbox len(charString)

'if charString = "xxx" then

'**** check the case before use ****

if charString = "xxx" then

WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserInitials")
WshShell.RegDelete("HKCU\Software\Microsoft\Office\10.0\Common\UserInfo\UserName")

'Wscript.echo "Values deleted"

End if


</end script>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top