Jump to content

delete shortcuts without success


Major

Recommended Posts

Hi Men, I try to install unattended applications. all seem to be good except it doesnt detele the shortcuts i have specified, my runonceex.cmd:

REG ADD %KEY%\002 /VE /D "WinZip 9.0" /f

REG ADD %KEY%\002 /V 1 /D "%systemdrive%\install\winzip.exe /S" /f

REG ADD %KEY%\002 /V 2 /D "REGEDIT /S %systemdrive%\install\winzip.reg" /f

REG ADD %KEY%\002 /V 3 /D "\"%PROGRAMFILES%\WinZip\winzip32.exe\" /noqp /notip /autoinstall" /f

DEL /f /q "%ALLUSERSPROFILE%\Menu inicio\WinZip.lnk"

REG ADD %KEY%\005 /VE /D "Nero Burning Rom 6.6.0.5" /f

REG ADD %KEY%\005 /V 1 /D "%systemdrive%\install\Nero6605.exe /silent /noreboot /SN=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx /Write_SN" /f

REG ADD %KEY%\005 /V 3 /D "%systemdrive%\install\Nero6605ESP.exe /silent /noreboot" /f

DEL /f /q "%ALLUSERSPROFILE%\Escritorio\Nero StartSmart.lnk"

DEL /f /q "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\Nero StartSmart.lnk"

Any suggestions, Thanks.

Link to comment
Share on other sites


to be honest, i'm not sure runonce can do that, though I'm sure I'll be corrected if that's not the case...

I personally would put all those DEL commands into a seperate command file (such as cleanup.cmd) and make another runonce entry to run that command file. Much easier IMHO

Link to comment
Share on other sites

rendrag is in the right, but if you insist on runonceex.cmd it should by as:

REG ADD %KEY%\002 /VE /D "WinZip 9.0" /f

REG ADD %KEY%\002 /V 1 /D "%systemdrive%\install\winzip.exe /S" /f

REG ADD %KEY%\002 /V 2 /D "REGEDIT /S %systemdrive%\install\winzip.reg" /f

REG ADD %KEY%\002 /V 3 /D "\"%PROGRAMFILES%\WinZip\winzip32.exe\" /noqp /notip /autoinstall" /f

REG ADD %KEY%\002 /V 4 /D "cmd.exe /c del /Q /F ""%ALLUSERSPROFILE%\Menu inicio\WinZip.lnk"""

REG ADD %KEY%\005 /VE /D "Nero Burning Rom 6.6.0.5" /f

REG ADD %KEY%\005 /V 1 /D "%systemdrive%\install\Nero6605.exe /silent /noreboot /SN=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx /Write_SN" /f

REG ADD %KEY%\005 /V 3 /D "%systemdrive%\install\Nero6605ESP.exe /silent /noreboot" /f

REG ADD %KEY%\005 /V 4 /D "cmd.exe /c del /Q /F ""%ALLUSERSPROFILE%\Escritorio\Nero StartSmart.lnk"""

REG ADD %KEY%\005 /V 5 /D "cmd.exe /c del /Q /F ""%APPDATA%\Microsoft\Internet Explorer\Quick Launch\Nero StartSmart.lnk"""

Link to comment
Share on other sites

Hello and thans men, I have followed your advice and I have created file aside with the name: cleanup.cmd

my runonce.cmd:

cmdow @ /HID

@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing application" /f

REG ADD %KEY%\005 /VE /D "Nero Burning Rom 6.6.0.5" /f

REG ADD %KEY%\005 /V 1 /D "%systemdrive%\install\Nero6605.exe /silent /noreboot /SN=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx /Write_SN" /f

REG ADD %KEY%\005 /V 2 /D "%systemdrive%\install\NBR6605ESP.exe /silent /noreboot" /f

REG ADD %KEY%\005 /V 3 /D "%systemdrive%\install\Cleanup.cmd" /f

and my cleanup.cmd:

cmdow @ /HID

@echo off

DEL /f /q "%ALLUSERSPROFILE%\Escritorio\Nero StartSmart.lnk"

DEL /f /q "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\Nero StartSmart.lnk"

exit

Thanks again men and it works perfectly

Link to comment
Share on other sites

DEL "%systemroot%\*.bmp"

DEL "%systemroot%\Web\Wallpaper\*.jpg"

//Standard Crap

RD /S /Q "%AllUsersProfile%\Start Menu\Programs\PrintMe Internet Printing"

RD /S /Q "%AllUsersProfile%\Start Menu\Programs\Java Web Start"

DEL "%AllUsersProfile%\Start Menu\Programs\Windows Movie Maker.lnk"

DEL "%AllUsersProfile%\Start Menu\Set Program Access and Defaults.lnk"

DEL "%AllUsersProfile%\Start Menu\Windows Catalog.lnk"

DEL "%AllUsersProfile%\Start Menu\Windows Update.lnk"

del "%allusersprofile%\desktop\Divx Movies.lnk"

//Ad-Aware

DEL "%UserProfile%\Application Data\Microsoft\Internet Explorer\Quick Launch\Ad-Aware SE Personal.lnk"

del "%Administratorprofile%\desktop\Ad-Watch*.lnk"

DEL "%AppData%\Microsoft\Internet Explorer\Quick Launch\Ad*.lnk"

//Adobe Reader 7

DEL "%AllUsersProfile%\Desktop\Adobe Reader 7.0.lnk"

//Adobe Gamma Loader

DEL "%AllUsersProfile%\Start Menu\Programs\Startup\Adobe Gamma Loader.lnk"

//AdAware Se Professional

DEL "%UserProfile%\Desktop\Ad-*.lnk"

//FlashGet

DEL "%UserProfile%\Desktop\FlashGet.lnk"

//Nero

DEL "%UserProfile%\Application Data\Microsoft\Internet Explorer\Quick Launch\Nero StartSmart.lnk"

DEL "%AllUsersProfile%\Desktop\Nero StartSmart.lnk"

//Winamp

DEL "%UserProfile%\Desktop\Winamp.lnk"

//Deleting Sample Music, Playlists, and Pictures...

RD /S /Q "%AllUsersProfile%\Documents\My Music\Sample Music\"

RD /S /Q "%AllUsersProfile%\Documents\My Music\Sample Playlists\"

RD /S /Q "%AllUsersProfile%\Documents\My Pictures\Sample Pictures\"

REG ADD "HKLM\SOFTWARE\Microsoft\GdiDetectionTool" /v "GDITool" /t REG_DWORD /d "00000001" /f

//Remove Drivers

RD /S /Q %systemdrive%\drivers\

RD /S /Q %systemdrive%\install\

RD /S /Q %systemdrive%\install\Cache\

RD /S /Q %systemdrive%\DP\

RD /S /Q %systemdrive%\WPI\

del "%systemdrive%\DP.exe"

//PowerDVD 6

del "%ProgramFiles%\CyberLink\PowerDVD\OLRSubmission\OLRSubmission.exe"

del "%ALLUSERSPROFILE%\Start Menu\Programs\CyberLink PowerDVD\On-Line Registration.lnk"

//TimeOut

reg delete HKCU\Software\Microsoft\InternetExplorer\Styles /F

reg delete HKCU\Software\Microsoft\Internet Explorer\Styles /F

//Shortcuts

DEL "%ALLUSERSPROFILE%\Start Menu\Super TextTwist.lnk"

del "%ALLUSERSPROFILE%\Desktop\stamps.com.lnk"

del "%ALLUSERSPROFILE%\Desktop\ThumbsPlus 7.lnk"

del "%ALLUSERSPROFILE%\Desktop\Super TextTwist.lnk"

del "%ALLUSERSPROFILE%\Desktop\clonecd.lnk"

del "%homepath%\Desktop\50*.lnk"

RD /S /Q "%ALLUSERSPROFILE%\Start Menu\Programs\Stamps.com"

//Batch Rename

rmdir /s /q "%ALLUSERSPROFILE%\Start Menu\Programs\Batch Rename .EXE\Internet"

//UltraISO

DEL "%ALLUSERSPROFILE%\Start Menu\Programs\UltraISO\ultraiso online order.lnk

DEL "%ALLUSERSPROFILE%\Start Menu\Programs\UltraISO\ultraiso Revision History.lnk

DEL "%ALLUSERSPROFILE%\Start Menu\Programs\UltraISO\ultraiso Web Site.lnk

//Adobe Setup Files

rmdir /s /q "%PROGRAMFILES%\Adobe\Acrobat 7.0\Setup Files\RdrBig"

rmdir /s /q "C:\WPI"

EXIT

Link to comment
Share on other sites

  • 10 months later...
rendrag is in the right, but if you insist on runonceex.cmd it should by as:

REG ADD %KEY%\002 /V 4 /D "cmd.exe /c del /Q /F ""%ALLUSERSPROFILE%\Menu inicio\WinZip.lnk"""

It should be pointed out that you would likely, in the event of using this in RunOnceEx, need to add in those extra backslashes as mentioned in the unattended guide.

Edited by tkmadison
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...