Solved

Rename IE desktop shortcut in Win2k/XP w/ login script or GPO

Posted on 2006-06-30
8
2,397 Views
Last Modified: 2008-01-09
Does anyone know how to change the name of the desktop shortcut to IE through an administrative measure (GPO, script)?

I would assume it is in the reigistry somewhere??


Need this ASAP (if possible :)

TIA
0
Comment
Question by:nprignano
8 Comments
 
LVL 69

Expert Comment

by:Merete
Comment Utility
why make it so hard just r/click it and rename it.
I dont think its possible if it is its too hard to assign renaming the IE shortcut in a GPO to other clients as it is only a shortcut.
I think just create a new shortcut rename it and share this if possible.
Sounds pretty strange if you ask me do you have permission to do this.
0
 
LVL 9

Expert Comment

by:herbus
Comment Utility
Soz if this doesn't do the trick,.. I haven't got a system nearby with the IE shortcut still there so couldn't check... it seems obvious, so maybe it won't work, but if it's useless then I probably haven't wasted much of your time :)

Can you not set a script to rename the shortcut found in C:\Documents and Settings\All Users\Desktop ?  If it's a login script the user would need to be local admin or power user to change an all-users item... either that or use task scheduler to run a bat file to change it and run the task under an admin account...

Cheers,
Herb
0
 
LVL 6

Assisted Solution

by:engineer_dell
engineer_dell earned 100 total points
Comment Utility
Hello,
Your question is not very clear to me, basically what you want to do ? Do you want to change shortcut name "shortcut to Internet Explorer" to something else by a gpo or script? or You want to hide IE icon from the desktop ?

Here you can control IE behaviours and settings for your users by GPO >
User Configuration | Windows Settings | Internet Explorer Maintenance
User Configuration | Administrative Templates | Windows Components | Internet Explorer

http://rcpmag.com/features/article.aspx?editorialsid=520
http://www.securitydocs.com/library/3198/3

To hide IE icon from the desktop >
User Key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
System Key: [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
CreateValue Name: NoInternetIcon > Data Type: REG_DWORD (DWORD Value) > Value Data: (0 = disabled, 1 = enabled)

Regards,
Engineer_Dell
0
 
LVL 6

Assisted Solution

by:engineer_dell
engineer_dell earned 100 total points
Comment Utility
And if you want to hide IE shortcuts from everywhere I mean from desktop, Program Menu and where ever
else they may be. Then try this,

Windows 2000:
"%SystemRoot%\system32\rundll32.exe"
"%SystemRoot%\system32\shell32.dll",OCInstall HideIE (There is a space between the "" "" ...rundll32.exe" "%SystemRoot%\...)

Windows XP:
"%SystemRoot%\System32\shmgrate.exe" OCInstallHideIE

To show the icons again change HideIE to ShowIE

Hope this helps,
Engineer_Dell
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 35

Assisted Solution

by:Nick Sui
Nick Sui earned 100 total points
Comment Utility
I was about to Publish this article at MS Support site :) before I publish there please have a look at this - you just need this article:

NOTE: In below example you can rename IE Shortcut and then create MSI. This MSI will be deployed using Group Policy or run it on all computers centrally using PSEXEC tool from www.sysinternals.com.

***
Deploying Windows Components Configuration and Application-Specific Configuration using Group Policy – Software Installation snap-in or manually

Some windows settings such as Power Options, Control Panel applets configuration, system configuration, hardware configuration etc are not so easy to deploy from Group Policy – software installation snap-in.

Let’s say you want to change Power Options configuration on more than 100 computers in your network. Manual process includes more human-power and this would take more than two days if you work 12 hours a day to deploy these settings because there is no such setting in Group Policy for Power Options.

WinInstLE is your answer!

M$ supplies Windows 2000 CD with valuable third party tools. If you have idea I am talking about VALUEADDED folder on the CD. You will find a utility called "WinInstLE". This utility is provided as a free tool to convert EXE packages to MSI. This is not the only purpose of this tool. You can also use this tool to create a MSI of Configuration Sets.

What you can do you can deploy these settings using Group Policy. You only need to create an MSI package for this configuration. For this purpose we will be using WinInstLE.

WinInstLE can be used to do the following:

1.      To create a MSI package.
2.      To know the registry settings updated by an application or Windows Components.
3.      To know the files installed by an application or Windows Components.
4.      You need to deploy settings changed by an application to all computers.
5.      Application update is ready but you need to install them on more than 1 computer.

For example, I will be using three configurations here:

1.      I have already deployed an application on more than 450 computers in my network and I need to update this application’s DLL files using regsvr32.exe command. Vendor of this application has supplied me the DLL (Application Modules) to update this application and with an instructions note given by him.

2.      Another configuration I need to make is to change Power Options as follows:
            On Power Schemes tab I need to change the followings for                   all computers
                  Power Schemes: Portable/Laptop
            And on the Hibernate tab
                  Enable Hibernation

3. An application running on my network requires a change in configuration but manufacturer hasn’t supplied the registry settings for this change. I also don’t know the registry keys.

You need to take above three actions on all computers.

This is how you do it using WinInstLE

WinInstLE can be found on Windows 2000 CD at
\VALUEADDED\3RDPARTY\MGMT\WINSINTLE

You need a workstation/computer a workstation running the application for which you want to change the configuration.

Now create the MSI:

1. First you need to install the WinInstLE software from above folder from Windows 2000 CD.

WinInstLE software has two parts: Before Snapshot and After Snapshot.

Before Snapshot will take a snapshot of your system before you make any changes to system or install any application. After snapshot will record the changes you made or changed by an application you installed after running before snapshot.

Steps: -

1. Go to a client machine.

2. Install WININSTLE.

3. Run Before Snapshot.

4. At this stage it will ask you to run an application. Do not run anything here and skip the step or quit from here.

5. Now make necessary changes to your client machine you want to deploy through Group Policy

For my configuration I will make changes as necessary:
1.      for case 1:
a.      Insert DLL CD supplied by vendor
b.      Create a folder named C:\AppDLL on this computer
c.      Copy DLLs from CD to C:\AppDLL.
d.      Create a batch file named appdll.bat
e.      Put the commands in this batch file:
      Regsvr32.exe /s c:\AppDll\dll1
      Regsvr32.exe /s c:\AppDll\dll2
      Regsvr32.exe /s c:\AppDll\dll3
f.      Save this file.
g.      Run it from command prompt and all DLLs are registered successfully with this application.

2.      for case 2:
      a. I open up Control Panel > Power Options and make necessary       changes.

3.      for case 3:
      a. Run application > and make necessary changes you       want.

6. After making necessary changes in computer restart the system.

7. Now run WININSTLE and select *After Snapshot* option.

8. After Snapshot will record all the changes you made.

9. This MSI file will be saved in the location or path you specified while *Before Snapshot*.

10. Now you deploy this MSI file or you can say "Configuration Sets" using Software Installation snap-in in Group Policy.

This MSI package will let you set the configuration: -

_For all users
_For selected user’s
_For groups (using filtering in Group Policy)

When Win logon processes GPOs it will gather all the information supplied in MSI package and deploy (copy batch file, register them, set application configuration) them on all computers.

Deploying configuration manually if you don’t have domain security model implemented

Let’s say you don’t have Domain Security model implemented in your environment and you want to implement these settings using a batch file. You can use the PSEXEC tool from www.sysinternals.com to do so.

NOTE: -

Microsoft Windows Operating System makes changes (for few Windows components) to its big repository----the REGISTRY.

Let us know.

SystmProg
0
 
LVL 2

Accepted Solution

by:
furruni earned 300 total points
Comment Utility
Hi,

I found a registry value with the Internet Explorer shortcut name.
The registry value is the following:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}

You can use this script to change the value to the "suggestedName" value on each computer. You can run this in the logon script of every user and that will change all the I.E. shortcuts name:

const HKEY_CURRENT_USER = &H80000001
const HKEY_LOCAL_MACHINE = &H80000002

strComputer = "."
suggestedName = "My own name"
Set StdOut = WScript.StdOut

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
 
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}"
strValueName = ""
oReg.GetExpandedStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue

Wscript.echo "You had " & strValue

oReg.SetExpandedStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,suggestedName
oReg.GetExpandedStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
Wscript.echo "Now you have " & strValue

I hope you find this solution useful.

Regards,

Rafael Calvo
0
 
LVL 15

Author Comment

by:nprignano
Comment Utility
Thank you all for your replies.   Since I answer questions on the site myself, I find it helpful when people reply to the experts suggestions, so here is how your info helped me:

merete - I was looking for a way to do this for 75 users without their or my interaction.  Sorry if I did not make that clear in my original post.

engineer_dell, thanks for the tips, especially the second one about hiding the icon from everywhere (could be fun if not useful).  I was more looking for how to rename the icon not hide it.

SystmProg - great article and great tips - very clear reading and detailed.  The process, however, is a little more involved than I was looking for - but great info none-the-less.

furruni - just what I was looking for.  I borrowed the logic from your example script and came up with this:
0
 
LVL 15

Author Comment

by:nprignano
Comment Utility
'Start of Code


'no errors should occur that we need to bypass unless something is really messed up
'On Error Resume Next

'halt on all errors
On Error Goto 0


'set some constants for ease of maintenance
Const cstrDesktopLink = "\\server\clientconfig\DesktopLink"

Dim strUserName, strComputerName,  strLocation, strClientName
Dim WSHNetwork
Dim jhts, debug

'set to 1 to display debugging info, 0 if not
debug = 0

'create a newline string
Dim CRLF
CRLF = Chr(13) & Chr(10)

Set Sh = CreateObject("WScript.Shell")
Set WSHNetwork = WScript.CreateObject("WScript.Network")
Set objArgs = WScript.Arguments


strclientname = Sh.ExpandEnvironmentStrings("%CLIENTNAME%")


'these are some common variables used throughout
strUserName = WSHNetwork.UserName
strComputerName = WSHNetwork.ComputerName

'get the computer name of the client computer.  due to limitations within vbscript
'the workaround is to pass the clientname to the script using parameter
'%CLIENTNAME%.  this is then accessed with the next line



'if strclientname = "Console" then '"%CLIENTNAME%" then  ''Means that the use is NOT logged into TS and the local computer name has not been applied
'      strclientname= strcomputername

'end if

'if strclientname = "%CLIENTNAME%" then  ''Means that the use is NOT logged into TS and the local computer name has not been applied
'      strclientname= strcomputername

'end if



'used for debugging
if debug = 1 then
      msgbox "Terminal Server: " & cstrTerminalServer & CRLF & _
             "User Name: " & strUserName & CRLF & _
             "Computer Name: " & strComputerName & CRLF & _
             "Client Name: " & strClientName
end if



'*****This is the start of the sub routine calls*****


DesktopLink jhts      


if debug = 1 then msgbox "End Script"

'End Main Program Code



'*****This is the Function Code definition for some parts of the script*****


'Begin Function Code

Function IsMember(sGroup)
    Dim sAdsPath, oUser, oGroup

    If IsEmpty(oGroupDict) Then
        Set oGroupDict = CreateObject("Scripting.Dictionary")
        oGroupDict.CompareMode = vbTextCompare

        sAdsPath  = WSHNetwork.UserDomain & "/" & WSHNetwork.UserName
        Set oUser = GetObject("WinNT://" & sAdsPath & ",user")

        For Each oGroup In oUser.Groups
            oGroupDict.Add oGroup.Name, "-"
        Next

        Set oUser = Nothing
    End If

    IsMember = CBool(oGroupDict.Exists(sGroup))

End Function



'*****This is the Sub Routines definitions for some parts of the script*****


Sub DesktopLink(jhts)
      'Create Desktop and Start Menu items

      'Copy Program Icons
      dim wshshell
      set WshShell = WScript.CreateObject("WScript.Shell")
      
      Dim FSO
      Set FSO = CreateObject("Scripting.FileSystemObject")


      If IsMember("Domain Users") Then

            'copy desktop icons
            FSO.CopyFolder cstrDesktopLink, "C:\Documents and Settings\" & strUserName & "\Desktop"

      End If

End Sub




It works like a charm.  Probably would be a lot slimmer by doing it with KIX instead of vbs - but it works :)


nprignano
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Introduction Often we come across situations wherein our batch files would be needing to reboot Windows for a variety of reasons. A few of them would be like: (1) Setup files have been updated whose changes can take effect only after a reboot …
As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now