illusions Posted April 28, 2006 Posted April 28, 2006 Hi, i am new to batchfiles can someone advice me on the following...[GuiRunOnce] %systemdrive%\install\batch.cmdI would like to move ie, outlook express, remote assistance, wmp shortcutfrom C:\Documents and Settings\user\Start Menu\Programsto C:\Documents and Settings\user\Start Menu\Programs\Accessoriesi have triedmove "%userprofile%\Start Menu\Programs\Internet Explorer.lnk" "%userprofile%\Start Menu\Programs\Accessories\Internet Explorer.lnk" this only work for the current user logonhowever when i create a new user ie is back in the original place==========Also in my default user how can i move remote assistance, wmp shortcutfrom C:\Documents and Settings\Default User\Start Menu\Programsto C:\Documents and Settings\Default User\Start Menu\Programs\Accessories==========Finally, please advice me how to copy wmp shortcut to quicklaunch for all usersthanks
Zoofield Posted April 29, 2006 Posted April 29, 2006 The only way to get OE.lnk where you want it is to add this to your winnt.sif.This only removes the shortcuts not the program.[Components] IEAccess="off" Internet explorer OEAccess="off" Outlook Express WMAccess="off" Media Player??Then (what I do) add your shortcuts by using.”$OEM$\$Docs\Default User\Start Menu\Programs”As far as moving other shortcuts it’s easier just to delete them and re-add using the above “$OEM$” folder.How I go about deleting what i don't want.first in winnt.sif;[GUIRunOnce] command9="%windir%\END.cmd"the batch file that is put in the "WINDOWS" dir using "$OEM$\$1\WINDOWS" folder"END.cmd" Example:del /q /f "%userprofile%\Start Menu\Programs\Remote Assistance.lnk"rd /s /q "%userprofile%\Start Menu\Programs\Accessories\Entertainment"del /q /f "Default User\Start Menu\Programs\Remote Assistance.lnk"rd /s /q "Default User\Start Menu\Programs\Accessories\Entertainment"Or, for programs that have to be installed after first boot and not during cmdlines.txt run.NOTE: I add programs during cmdlines.txt to insure that my program settings are installed for all users. I do not add everything under the sun as some people do. But for example, codec’s have to be run after the first login.:: Clean up bad installs.set Codecs=%userprofile%\..\All Users\Start Menu\Programs\Image-Video\Codecsset AdminCodecs=%userprofile%\Start Menu\Programs\Image-Video\Codecsmove /y "%Codecs%\Real Alternative" "%AdminCodecs%\"move /y "%Codecs%\QuickTime Alternative" "%AdminCodecs%\"rd /s /q "%ProgramFiles%\Executive Software\Diskeeper Professional Setup"del /q /f "%windir%\END.cmd"I hope this helps and/or makes sense.
mc134 Posted April 29, 2006 Posted April 29, 2006 (edited) Since you are using the %userprofile% variable, you are only making chages to a single user. To change the start menu for all users use the %AllUsersProfile% variable instead.For example this would move the synctoy shortcut only for a single user to the start menu for all users that log in. (this is all one line BTW)If EXIST "%UserProfile%\Start Menu\Programs\SyncToy.lnk" MOVE /Y "%UserProfile%\Start Menu\Programs\SyncToy.lnk" "%AllUsersProfile%\Start Menu\Programs\Accessories\Utilities"The IF EXIST statement allows the batch to move on if the shortcut is not found instead of erroring out and stopping your batch.Hope this helps. Edited April 29, 2006 by mc134
Zoofield Posted April 30, 2006 Posted April 30, 2006 (edited) Actually I think that when you are creating an unattended install using the “All Users” folder is a bad idea. The “Default User” folder is better and the reasons are;Shortcuts are created for new users the same as they would be for the “All Users” folder.The shortcuts cannot be customized by each user. If Sally wants to move Gaim.lnk but it is located in “All users”, she can’t (restricted user account, also highly recommended) or she also moves it in Tim’s account (this does not make Tim happy). She could have if it had been created by the “Default User” profile when the account was created. This would be the case with a clean install.The “All Users” folder in my opinion is for administrative purposes, when trying to lock down a system for the reasons stated above or adding a program after account creation.For A home pc it hinders enjoyment and functionality. (Sally likes to "customize") Edited April 30, 2006 by Zoofield
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