Jump to content

Prevent creation of startmenu/programs/.lnk files


Recommended Posts

everytime i manually create an account, these links are there.

is there a way to prevent .lnk files being created in the "start menu/programs"? namely the internet explorer, outlook express, remote assistance, windows media player.

and i'm talking about FUTURE accounts that AREN'T DEFINED YET, and wont be defined during the unattended install.

these didn't work, maybe my syntax is wrong?:

DEL "%AllUsersProfile%\Start Menu\Programs\Windows Media Player.lnk"
DEL "%AllUsersProfile%\Start Menu\Programs\Remote Assistance.lnk"
DEL "%AllUsersProfile%\Start Menu\Programs\Outlook Express.lnk"

thanks for any help! :hello:

Link to comment
Share on other sites


Have you tried the [components] section of winnt.sif?

Although I think the programs are still installed so anyone

could run the exe and still use them.

Link to comment
Share on other sites

DEL /S /Q "%AllUsersProfile%\Start Menu\Programs\Windows Media Player.lnk"
DEL /S /Q "%AllUsersProfile%\Start Menu\Programs\Remote Assistance.lnk"
DEL /S /Q "%AllUsersProfile%\Start Menu\Programs\Outlook Express.lnk"

U could also delete them from %userprofile%. Just to make sure they get fully deleted from everywhere!

Link to comment
Share on other sites

That's his problem Gouki...you can't delete them from %UserProfile% before the user account is created.

You could make a little script that executes the first time the new user logs in which deletes the links...but that's pretty messy and annoying. I'll be very interested to hear if someone knows a way to prevent them from being created at all.

Link to comment
Share on other sites

As JBM says, use the Components section of Winnt.sif

[Components]
 AccessOpt = On; accessibility wizard
 CharMap = On; enables insertion of symbols and characters into documents
 Chat = On; chat client
 DeskPaper =Off; desktop wallpaper
 Dialer = Off; phone dialer
 Fax=Off ; Fax components
 fp_extensions=Off; Front Pager Extensions
 freecell = off; freecell game
 hearts=off; hearts game
 hypertrm = On; hyperterm
 IEAccess=Off; Disables visible entry points (shortcuts) for IE
  OEAccess=off; Turn off Outlook Express icons
 media_clips = off; Sample Sounds
 Media_Utopia = off; No utopia sound scheme
 minesweeper = off; game
 mousepoint = off; mouse pointers
 Mplay = on; Windows media player
 msnexplr=off; Disable install of MSN Explorer
 MsWordPad = On; Word Pad
 ObjectPkg = Off; object packager
 Paint = On; MS Paint
 pinball = off; game
 rec = off ; sound recorder
 reminst = off; remote installation services
 solitaire = off; Solitaire game
 spider=off; spider game
 Templates = Off; document templates
 TerminalServer=off; Installs Terminal Services on SERVERs only
 vol = on ; volume control
 Wms = Off; windows media technologies components
 zonegames=off; Installs MS Game Zone internet games

Link to comment
Share on other sites

Most simple method is using Components section...

However there is way to modify it after installation - just clear StubPath for your selected component

EDIT: StubPath is responsible for creating dynamic shortcuts (so you want be able to see them in default profile). For example to remove Outlook Express for all new accounts, just add this to RunOnceEx:

REG ADD %strRegistryKey%\050 /VE /D "Removing Outlook Express" /f
REG ADD %strRegistryKey%\050 /V 1 /D "reg add \"HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{44BBA840-CC51-11CF-AAFA-00AA00B6015C}\" /v Stubpath /t REG_SZ /d \"\" /f" /f
REG ADD %strRegistryKey%\050 /V 2 /D "reg delete \"HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\^>{881dd1c5-3dcf-431b-b061-f3f88e8be88a}\" /f" /f

P.S.: Didnt try it, I am using Components method, however it should work

Link to comment
Share on other sites

Using Components disables the programs and removes the shortcuts. Disabling the programs is not a solution to removing shortcuts. These shortscuts are not created until the desktop is active. They reside in %AllUsersProfile%, so if you delete them once, they will not return.

I use an AutoIt script for this. It is called by the HKLM Run key. It waits for a process to start, then does the tidy up process etc, removes the reg value, removes itself and reboots. I set a small reboot timeout, which looks so much better.

I have tested a batch script before in the startup folder. This works fine. But an ugly, black window solution.

Not tried, but you could enter reg entries, to remove them on the reboot. The runonce key may seem suitable for the task.

Link to comment
Share on other sites

To clarify, the following options in winnt.sif simply prevent the creation of shortcuts to Internet Explorer and Outlook Express. The apps are installed, but shortcuts are not created.

IEAccess=Off; Disables visible entry points (shortcuts) for IE
OEAccess=off; Turn off Outlook Express icons

It is also possible to turn shortcuts on and off after installation with the following commands.

rem Show IE and hide OE icons (Win2000)
"%SystemRoot%\system32\rundll32.exe" "%SystemRoot%\system32\shell32.dll",OCInstall ShowIE
"%SystemRoot%\system32\rundll32.exe" "%SystemRoot%\system32\shell32.dll",OCInstall HideOE

rem Show IE and hide Outlook Express icons (WinXP)
"%SystemRoot%\System32\shmgrate.exe" OCInstallShowIE
"%SystemRoot%\System32\shmgrate.exe" OCInstallHideOE

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...