nice_guy75 Posted October 4, 2011 Share Posted October 4, 2011 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.htmlI 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 More sharing options...
allen2 Posted October 4, 2011 Share Posted October 4, 2011 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 More sharing options...
nice_guy75 Posted October 4, 2011 Author Share Posted October 4, 2011 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 More sharing options...
allen2 Posted October 4, 2011 Share Posted October 4, 2011 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 appdatafolderset 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.Saveset shortcut = nothingset objenv = nothingset sh = nothing Link to comment Share on other sites More sharing options...
nice_guy75 Posted October 4, 2011 Author Share Posted October 4, 2011 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 More sharing options...
allen2 Posted October 4, 2011 Share Posted October 4, 2011 Sorry to disappoint you there but i am most likely one of the worst vbs scripter there, i did a couple of google search and set up a working script to match your needs. Link to comment Share on other sites More sharing options...
jaclaz Posted October 5, 2011 Share Posted October 5, 2011 - 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. (though the latter is more like a truism or a tautology )Yes, when someone writes a file, it stays written . jaclaz Link to comment Share on other sites More sharing options...
nice_guy75 Posted December 22, 2011 Author Share Posted December 22, 2011 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now