Jump to content

Plz someone write a vbs or au3 script for this


Recommended Posts

hi guys,

When we click on explorer icon of the taskbar it usually open libraries, but we can customize it by following this tutorial: http://www.sevenforums.com/tutorials/2863-windows-explorer-taskbar-icon-change-open-target.html

I want my explorer icon to open "My Computer" when clicked. Please someone write a script for this in VB or in autoit.

Please help me guys, I am not so good in writing scripts.

Link to comment
Share on other sites


You really don't need to write anything complex:

- Do it one time

- copy the shortcut "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Windows Explorer.lnk" somewhere safe

- copy it to "C:\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch" if you want the setting to apply to all new users profiles.

Link to comment
Share on other sites

You really don't need to write anything complex:

- Do it one time

- copy the shortcut "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Windows Explorer.lnk" somewhere safe

- copy it to "C:\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch" if you want the setting to apply to all new users profiles.

I guess you didn't understand what I want. Actually when we click the explorer icon it opens libraries, and I want it to open "My Computer" and for that you need to change the target from "%windir%\explorer.exe" to "%windir%\explorer.exe Shell:MyComputerFolder"

I don't want to remove or replace the shortcut itself.

Link to comment
Share on other sites

I perfectly understood but you didn't understood my answer:

- the thing you want to modify is a shortcut; it's a fact and a shortcut is a file; it is also a fact.

- if you modify a file (ie the shortcut) one time, it will be modified and never be changed until you modify it again.

- so if you want to reproduce the modification (you wanted a script to modify the shortcut for the current user), you just need to copy the modified one in the right location on the computer/profile where you want the modification to take place.

For example, you want to do the modification for all new users of a computer (and you never did it), you only need to modify the shortcut one time then do:

copy /y "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Windows Explorer.lnk" "C:\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch"

and all newly created user profiles would get the modified shortcut.

There is no need in this case to go creating a script to edit a shortcut (as you really only need to do it one time) but if you want a vbs to do this:

Set sh = CreateObject("WScript.Shell")
dim appdatafolder
set objenv = sh.Environment("Process")
appdatafolder = objenv("APPDATA")
Set shortcut = sh.CreateShortcut(appdatafolder & "\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Windows Explorer.lnk")
shortcut.TargetPath = "%windir%\explorer.exe"
shortcut.Arguments = "Shell:MyComputerFolder"
shortcut.Save
set shortcut = nothing
set objenv = nothing
set sh = nothing

Link to comment
Share on other sites

Thank you very much mate. I just found what I wanted. Now regarding reproducing, I want to change the target of windows explorer forever and you have given the perfect script.

Thanks for once again mate. I presume you are very good when it comes to vb script writing, if you don't mind can I disturb you again in the future if I need any other script? As I am nothing when it comes to programming.

Link to comment
Share on other sites

- the thing you want to modify is a shortcut; it's a fact and a shortcut is a file; it is also a fact.

- if you modify a file (ie the shortcut) one time, it will be modified and never be changed until you modify it again.

All in all the above seem to total up to THREE facts. :thumbup

(though the latter is more like a truism :angel or a tautology :ph34r: )

Yes, when someone writes a file, it stays written :yes: .

:lol:

jaclaz

Link to comment
Share on other sites

  • 2 months later...

Hey guys, the script is working fine but I am unable to apply this script unattended to the Administrator's account, I have tried with runonce registry but I guess there is a some permission issues. Can anyone help me out in applying this script unattended to the Administrator's account?

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...