Jump to content

Startup Links Not Removing


Recommended Posts

ieaccess=off in [Components] doesnt uninstall IE, it just disables the shortcuts according to Ref.chm:

IEAccess

Value: On | Off

Default: On

Installs visible entry points (shortcuts) to Internet Explorer.

This entry does not remove any Windows code, including any Internet Explorer code, other than these shortcuts. Various Windows components and third-party applications rely upon Internet Explorer code.

Chimborazo pointed out here that you can also turn on and off shortcuts with the following code in a batch file:

%systemroot%\system32\shmgrate OCInstallHideIE 
%systemroot%\system32\shmgrate OCInstallHideOE

or

rundll32.exe shell32.dll,OCInstall HideOE

Link to comment
Share on other sites


This One Will Delete The File Plus Allow For A No Reply

Plus Will Check And See If The File Is Present. The Defualt

Time Out Action Is To Remove The Shortcuts.

Cut And Paste And Save As GmanDelSC-v2.vbs

mikku

but i want to know is it %systemdriver% or %systemdrive%

%systemdrive%=Where Windows Is Installed

V=vbCrLf
ON ERROR RESUME NEXT
 Dim Shell, AP, UP, SD
 Dim fso, msg, D15
 D15  = space(15)
 MSG1 = "Gsm Remove ShortCut"
 MSG2 = "The Defualt Time Out Action Is To Delete The Shortcut"
 MSG3 = "Performing Defualt Action And Removing This Shortcut"
 MSG4 = "This File Was Not There!"
 Set Shell = WScript.CreateObject("WScript.Shell")
 Set fso = CreateObject("Scripting.FileSystemObject")
 AP  = Shell.ExpandEnvironmentStrings("%AllUsersProfile%")
 UP  = Shell.ExpandEnvironmentStrings("%UserProfile%")
 SD  = Shell.ExpandEnvironmentStrings("%SystemDrive%")
 
Function APInetExplore
  filespec=(AP & "\Start Menu\Programs\Internet Explorer.lnk")
  Del1=filespec
  Set fso = CreateObject("Scripting.FileSystemObject")
  If (fso.FileExists(filespec)) Then
  BtnCode = Shell.Popup("Do You Want To Remove?" & V & Del1 & V &_
  MSG2, 8, D15 & MSG1, 4 + 32)
        Select Case BtnCode
   case 6      Shell.Popup "Deleting" & V & del1,4,MSG1, 0 + 64
   fso.DeleteFile( AP & "\Start Menu\Programs\Internet Explorer.lnk")
  case 7      Shell.Popup "User Selected Not To Delete" & V &_
  Del1,5, D15 & MSG1, 0 + 64
  case -1     Shell.Popup MSG3 & V &_
  Del1, 5, D15 & MSG1, 0 + 64
   fso.DeleteFile( AP & "\Start Menu\Programs\Internet Explorer.lnk")
        End Select
  Else
  msg = Shell.Popup(filespec & V & MSG4, 5, D15 & MSG1, 0 + 48 )
  End If
  ReportFileStatus = msg
  Set fso = nothing
End Function

Function UPInetExplore
  filespec=(UP & "\Start Menu\Programs\Internet Explorer.lnk")
  Del1=filespec
  Set fso = CreateObject("Scripting.FileSystemObject")
  If (fso.FileExists(filespec)) Then
  BtnCode = Shell.Popup("Do You Want To Remove?" & V & Del1 & V &_
  MSG2, 8, D15 & MSG1, 4 + 32)
        Select Case BtnCode
  case 6      Shell.Popup "Deleting" & V & del1,4,MSG1, 0 + 64
  fso.DeleteFile( UP & "\Start Menu\Programs\Internet Explorer.lnk")
  case 7      Shell.Popup "User Selected Not To Delete" & V &_
  Del1,5, D15 & MSG1, 0 + 64
  case -1     Shell.Popup MSG3 & V &_
  Del1, 5, D15 & MSG1, 0 + 64
  fso.DeleteFile( UP & "\Start Menu\Programs\Internet Explorer.lnk")
        End Select
  Else
  msg = Shell.Popup(filespec & V & MSG4, 5, D15 & MSG1, 0 + 48 )
  End If
  ReportFileStatus = msg
  Set fso = nothing
End Function

 Function APWMP10
  filespec=(AP & "\Start Menu\Programs\Windows Media Player.lnk")
  Del1=filespec
  Set fso = CreateObject("Scripting.FileSystemObject")
  If (fso.FileExists(filespec)) Then
  BtnCode = Shell.Popup("Do You Want To Remove?" & V & Del1 & V &_
  MSG2, 8, D15 & MSG1, 4 + 32)
        Select Case BtnCode
  case 6      Shell.Popup "Deleting" & V & del1,4,MSG1, 0 + 64
  fso.DeleteFile( AP & "\Start Menu\Programs\Windows Media Player.lnk")
  case 7      Shell.Popup "User Selected Not To Delete" & V &_
  Del1,5, D15 & MSG1, 0 + 64
  case -1     Shell.Popup MSG3 & V &_
  Del1, 5, D15 & MSG1, 0 + 64
  fso.DeleteFile( AP & "\Start Menu\Programs\Windows Media Player.lnk")
        End Select
  Else
  msg = Shell.Popup(filespec & V & MSG4, 5, D15 & MSG1, 0 + 48 )
  End If
  ReportFileStatus = msg
  Set fso = nothing
End Function

  Function UPWMP10
  filespec=(UP & "\Start Menu\Programs\Windows Media Player.lnk")
  Del1=filespec
  Set fso = CreateObject("Scripting.FileSystemObject")
  If (fso.FileExists(filespec)) Then
  BtnCode = Shell.Popup("Do You Want To Remove?" & V & Del1 & V &_
  MSG2, 8, D15 & MSG1, 4 + 32)
        Select Case BtnCode
  case 6      Shell.Popup "Deleting" & V & del1,4,MSG1, 0 + 64
  fso.DeleteFile( UP & "\Start Menu\Programs\Windows Media Player.lnk")
  case 7      Shell.Popup "User Selected Not To Delete" & V &_
  Del1,5, D15 & MSG1, 0 + 64
  case -1     Shell.Popup MSG3 & V &_
  Del1, 5, D15 & MSG1, 0 + 64
  fso.DeleteFile( UP & "\Start Menu\Programs\Windows Media Player.lnk")
        End Select
  Else
  msg = Shell.Popup(filespec & V & MSG4, 5, D15 & MSG1, 0 + 48 )
  End If
  ReportFileStatus = msg
  Set fso = nothing
End Function

 Function APOutlookExpress
  filespec=(AP & "\Start Menu\Programs\Outlook Express.lnk")
  Del1=filespec
  Set fso = CreateObject("Scripting.FileSystemObject")
  If (fso.FileExists(filespec)) Then
  BtnCode = Shell.Popup("Do You Want To Remove?" & V & Del1 & V &_
  MSG2, 8, D15 & MSG1, 4 + 32)
        Select Case BtnCode
  case 6      Shell.Popup "Deleting" & V & del1,4,MSG1, 0 + 64
  fso.DeleteFile( AP & "\Start Menu\Programs\Outlook Express.lnk")
  case 7      Shell.Popup "User Selected Not To Delete" & V &_
  Del1,5, D15 & MSG1, 0 + 64
  case -1     Shell.Popup MSG3 & V &_
  Del1, 5, D15 & MSG1, 0 + 64
  fso.DeleteFile( AP & "\Start Menu\Programs\Outlook Express.lnk")
        End Select
  Else
  msg = Shell.Popup(filespec & V & MSG4, 5, D15 & MSG1, 0 + 48 )
  End If
  ReportFileStatus = msg
  Set fso = nothing
End Function

  Function UPOutlookExpress
  filespec=(UP & "\Start Menu\Programs\Outlook Express.lnk")
  Del1=filespec
  Set fso = CreateObject("Scripting.FileSystemObject")
  If (fso.FileExists(filespec)) Then
  BtnCode = Shell.Popup("Do You Want To Remove?" & V & Del1 & V &_
  MSG2, 8, D15 & MSG1, 4 + 32)
        Select Case BtnCode
  case 6      Shell.Popup "Deleting" & V & del1,4, D15 & MSG1, 0 + 64
  fso.DeleteFile( UP & "\Start Menu\Programs\Outlook Express.lnk")
  case 7      Shell.Popup "User Selected Not To Delete" & V &_
  Del1,5, D15 & MSG1, 0 + 64
  case -1     Shell.Popup MSG3 & V &_
  Del1, 5, D15 & MSG1, 0 + 64
  fso.DeleteFile( UP & "\Start Menu\Programs\Outlook Express.lnk")
        End Select
  Else
  msg = Shell.Popup(filespec & V & MSG4, 5, D15 & MSG1, 0 + 48 )
  End If
  ReportFileStatus = msg
  Set fso = nothing
End Function

  Function FINAL
  filespec=(SD & "\GmanDelSC-v2.vbs")
  Del1=filespec
  Set fso = CreateObject("Scripting.FileSystemObject")
  If (fso.FileExists(filespec)) Then
  BtnCode = Shell.Popup("Do You Want To Remove?" & V & Del1 & V &_
  MSG2, 8, D15 & MSG1, 4 + 32)
        Select Case BtnCode
  case 6      Shell.Popup "Deleting" & V & del1,4, D15 & MSG1, 0 + 64
  fso.DeleteFile( UP & "\GmanDelSC-v2.vbs")
  case 7      Shell.Popup "User Selected Not To Delete" & V &_
  Del1,5, D15 & MSG1, 0 + 64
  case -1     Shell.Popup MSG3 & V &_
  Del1, 5, D15 & MSG1, 0 + 64
  fso.DeleteFile( UP & "\GmanDelSC-v2.vbs")
        End Select
  Else
  msg = Shell.Popup(filespec & V & MSG4, 5, D15 & MSG1, 0 + 48 )
  End If
  ReportFileStatus = msg
  Set fso = nothing
End Function

APInetExplore
wscript.sleep 1000
UPInetExplore
wscript.sleep 1000
APWMP10
wscript.sleep 1000
UPWMP10
wscript.sleep 1000
APOutlookExpress
wscript.sleep 1000
UPOutlookExpress
wscript.sleep 1000
FINAL

Here Is A SFX That Will Run Also

Edited by gunsmokingman
Link to comment
Share on other sites

Just thought Id let you guys know, you will never remove these with your cleanup.cmd or anything else for that matter which is called in your runonceex, regardless of the method you use. The problem is these shortcuts are created at the time the desktop is drawn... which occurs after runonceex.

The only way you can get around this is by placing a script in your 'Startup' start menu folder to delete these items... anything in the startup folder is launched after the desktop is drawn. Heres the batch file I use... I dont remove these shortcuts, but I do move them to another start menu folder.. just modify it to delete instead of move...

CMDOW @ /HID
@echo off
set AUStart=%AllUsersProfile%\Start Menu\Programs
set UserStart=%UserProfile%\Start Menu\Programs

MOVE /Y "%UserStart%\Internet Explorer.lnk" "%AUStart%\Internet"
MOVE /Y "%UserStart%\Outlook Express.lnk" "%AUStart%\Internet"

DEL /Q /F "%AUStart%\Startup\cleanup2.cmd"

EXIT

Link to comment
Share on other sites

Anything in the %AllUsersProfile% get removed

Then Expalin How This Alway Works For Me Than

fso.DeleteFile( AP & "\Desktop\Java Web Start.lnk")
fso.DeleteFile( AP & "\Desktop\Nero StartSmart.lnk")
fso.DeleteFile( AP & "\Desktop\Mozilla.lnk")
fso.DeleteFile( AP & "\Start Menu\Set Program Access and Defaults.lnk")
fso.DeleteFile( AP & "\Start Menu\Windows Catalog.lnk")
fso.DeleteFolder( SD & "Drivers")
fso.DeleteFolder( SD & "Install")
fso.DeleteFile( SD & "GmanSilentCUP.VBS")

and i call it from my runonceex.cmd

REG ADD %KEY%\090 /VE /D "Wrar320ce" /f
REG ADD %KEY%\090 /V 1 /D "%CDROM%Apps\Ua090\WinRar.exe" /f

REG ADD %KEY%\170 /VE /D "Preparing Final Clean up ..." /f
REG ADD %KEY%\170 /V 1 /D "%CDROM%Apps\SilentUaC.exe" /f

Those Are Always Gone

Link to comment
Share on other sites

because youre not trying to remove internet explorer or outlook express.. these 2 icons are created at the time your desktop is drawn... the rest are already in place.. which is why you have no problem removing them at the runonceex stage.

Link to comment
Share on other sites

  • 2 weeks later...

Hello Men

I have the same problem, there is no way to remove the shortcut of the windows media player in the quick launch bar, i have tried a lot of methods but without success.

A simple question

@durex: If i move the entry to the startup it will be there.

There is another method to do it?

for example, to create another cleanup2.cmd which it execute during the next login. Where must i put it?

Any suggestions please.

Thanks

Link to comment
Share on other sites

At the end of the RunonceEx.cmd

add this as the last cmd

REG ADD %KEY%\170 /VE /D "Preparing Final Clean up ..." /f
REG ADD %KEY%\170 /VE /D "%systemdrive%\Install\Cleanup.cmd" /f

Cleanup.cmd

ECHO OFF

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

REG ADD %KEY%\425 /VE /D "Final Clean Up" /f

REG ADD %KEY%\425 /V 1 /D "%systemdrive%\Install\WHATEVER YOU HAVE NAME IT " /f

Link to comment
Share on other sites

I use the following INF file to disable ActiveSetup. Use:

rundll32 setupapi,InstallHinfSection DefaultInstall 128 filepath\ActiveSetup.inf

;ActiveSetup.inf
[Version]
   Signature=$CHICAGO$

[DefaultInstall]
   DelReg=ActiveSetup.Delete

;Disable Active Setup Items
[ActiveSetup.Delete]
  ;Windows Messenger
   HKLM, "%ActiveSetup%\{5945c046-1e7d-11d1-bc44-00c04fd912be}","Stubpath"    
  ;Internet Explorer 6
   HKLM, "%ActiveSetup%\{89820200-ECBD-11cf-8B85-00AA005B4383}","Stubpath"    
  ;Windows Media Player
   HKLM, "%ActiveSetup%\{6BF52A52-394A-11d3-B153-00C04F79FAA6}","Stubpath"    
  ;Outlook Express
   HKLM, "%ActiveSetup%\{44BBA840-CC51-11CF-AAFA-00AA00B6015C}","Stubpath"    
  ;Outlook Express
   HKLM, "%ActiveSetup%\>{881dd1c5-3dcf-431b-b061-f3f88e8be88a}","Stubpath"  
  ;Internet Explorer
   HKLM, "%ActiveSetup%\>{26923b43-4d38-484f-9b9e-de460746276c}","Stubpath"  
  ;Windows Media Player
   HKLM, "%ActiveSetup%\>{22d6f312-b0f6-11d0-94ab-0080c74c7e95}","Stubpath"  

[strings]
   RunOnce          = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce"
   RunOnceEx        = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"
   ActiveSetup      = "SOFTWARE\Microsoft\Active Setup\Installed Components"

I use this INF create/delete the default shortcuts. Use:

rundll32 setupapi,InstallHinfSection AddGroups 128 filepath\Shortcuts.inf

rundll32 setupapi,InstallHinfSection AddShortcuts 128 filepath\Shortcuts.inf

rundll32 setupapi,InstallHinfSection DelShortcuts 128 filepath\Shortcuts.inf

I run these from the CMDLines.txt and RunOnceEx to achieve the desired results.

;Shortcuts.inf
[Version]
Signature=$CHICAGO$

[AddShortcuts]
;Create Start Menu Items
ProfileItems=RemoteAssistanceAdd, MovieMakerAdd, WindowsMediaPlayerAdd
ProfileItems=InternetExplorerAdd, OutlookExpressAdd, WindowsMessengerAdd
ProfileItems=WindowsExplorerAdd, CommandPromptAdd

[DelShortcuts]
;Delete Start Menu Items
DelFiles=AUStartMenuItemsDel, CUStartMenuItemsDel

[AddGroups]
;Create Start Menu Groups
ProfileItems=AUUtilitiesGroupAdd, AUInternetGroupAdd
ProfileItems=CUUtilitiesGroupAdd, CUInternetGroupAdd


[DestinationDirs]
AUStartMenuItemsDel = 16406
CUStartMenuItemsDel = 16395

[AUStartMenuItemsDel]
"Set program access and defaults.lnk"
"Windows Catalog.lnk"
"Windows Update.lnk"
"Programs\Windows Messenger.lnk"
"Programs\MSN Messenger 6.1.lnk"
"Programs\Windows Movie Maker.lnk"

[CUStartMenuItemsDel]
"Programs\Internet Explorer.lnk"
"Programs\Outlook Express.lnk"
"Programs\Remote Assistance.lnk"
"Programs\Windows Media Player.lnk"
"Programs\Windows Messenger.lnk"
"Programs\Accessories\Command Prompt.lnk"
"Programs\Accessories\Windows Explorer.lnk"

[AUInternetGroupAdd]
Name="The Internet and Email",0x00000004

[AUUtilitiesGroupAdd]
Name="Utilities",0x00000004

[CUInternetGroupAdd]
Name="The Internet and Email",0x00000005

[CUUtilitiesGroupAdd]
Name="Utilities",0x00000005

[InternetExplorerAdd]
Name       = "Internet Explorer"
CmdLine    = 16422,"Internet Explorer",IEXPLORE.EXE
SubDir     = "The Internet and Email"
InfoTip    = "@%11%\shell32.dll,-22546"
DisplayResource = "%11%\shdoclc.dll",880

[OutlookExpressAdd]
Name       = "Outlook Express"
CmdLine    = 16422,"Outlook Express",MSIMN.EXE
SubDir     = "The Internet and Email"
InfoTip    = "@%11%\shell32.dll,-22565"
DisplayResource = "%11%\shell32.dll",22053

[WindowsMessengerAdd]
Name       = "Windows Messenger"
CmdLine    = 16422,"Messenger",MSMSGS.EXE
SubDir     = "The Internet and Email"
InfoTip    = "Shows whether your friends are online and lets you have online conversations."

[RemoteAssistanceAdd]
Name       = "Remote Assistance"
CmdLine    = 11,,"RCIMLBY.EXE -LaunchRA"
SubDir     = "Accessories"
IconPath   = 11,,RCIMLBY.EXE
InfoTip    = "@%11%\rcbdyctl.dll,-151"
DisplayResource = "%11%\rcbdyctl.dll",152

;Need to find the correct DisplayResource and Infotip data for this item
[MovieMakerAdd]
Name       = "Windows Movie Maker"
CmdLine    = 16422, "Movie Maker", moviemk.exe
SubDir     = "Accessories"
InfoTip    = "Capture and edit digital media on your computer and then share your saved movies by e-mail, the Internet, recordable CD, or on a DV video tape"

[WindowsMediaPlayerAdd]
Name       = "Windows Media Player"
CmdLine    = 16422, "Windows Media Player", wmplayer.exe
SubDir     = "Accessories\Entertainment"
InfoTip    = "@%17%\unregmp2.exe,-155"
DisplayResource = "%17%\unregmp2.exe",4

[WindowsExplorerAdd]
Name       = "Windows Explorer"
CmdLine    = 10,,explorer.exe
IconPath   = 10,,explorer.exe
IconIndex  = 1
InfoTip    = "@%11%\shell32.dll,-22579"
DisplayResource = "%11%\shell32.dll",22067

[CommandPromptAdd]
Name       = "Command Prompt"
CmdLine    = 11,,CMD.EXE
InfoTip    = "@%11%\shell32.dll,-22534"
DisplayResource = "%11%\shell32.dll",22022

Link to comment
Share on other sites

Hi Men, here is my RunOnceEx (only some entries in order to be shorter)

cmdow @ /HID
@echo off
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Instalando Aplicaciones" /f
REG ADD %KEY%\024 /VE /D "Google Toolbar" /f
REG ADD %KEY%\024 /V 1 / D "%SystemDrive%\install\Google.Toolbar\GoogleToolbarInstaller.exe /q /d" /f
REG ADD %KEY%\025 /VE /D "Importando Datos de Registro" /f
REG ADD %KEY%\025 /V 1 /D "REGEDIT /S %systemdrive%\Install\RegTweaks.reg" /f

REG ADD %KEY%\026 /VE /D "Limpiando y Reiniciando" /f
REG ADD %KEY%\026 /V 1 /D "%systemdrive%\install\CleanUp.cmd" /f
Exit

And Here is my Cleanup.cmd

cmdow @ /HID
shutdown.exe -r -f -t 120 -c "Windows XP se reiniciara en un minuto para actualizarse, asi que en breves momentos lo tendras todo instalado"
net user aspnet /delete

DEL /Q "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\Reproductor de Windows Media.lnk"

RD /S /Q "%systemdrive%\drivers\"
RD /S /Q "%systemdrive%\install\"
EXIT

And my cleanup2.cmd

cmdow @ /HID
DEL /Q "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\Reproductor de Windows Media.lnk"
RD /S /Q "%systemdrive%\CleanUp\"
EXIT

So you tell me that i must put another entry at the end of the RunOnceEx:

cmdow @ /HID
@echo off
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Instalando Aplicaciones" /f
REG ADD %KEY%\024 /VE /D "Google Toolbar" /f
REG ADD %KEY%\024 /V 1 / D "%SystemDrive%\install\Google.Toolbar\GoogleToolbarInstaller.exe /q /d" /f

REG ADD %KEY%\025 /VE /D "Importando Datos de Registro" /f
REG ADD %KEY%\025 /V 1 /D "REGEDIT /S %systemdrive%\Install\RegTweaks.reg" /f

REG ADD %KEY%\026 /VE /D "Limpiando y Reiniciando" /f
REG ADD %KEY%\026 /V 1 /D "%systemdrive%\install\CleanUp.cmd" /f

[b]REG ADD %KEY%\027 /VE /D "Limpiando y Reiniciando" /f
REG ADD %KEY%\027 /V 1 /D "%systemdrive%\Cleanup\CleanUp2.cmd" /f[/b]
Exit

My question, how will call it (cleanup2.cmd) if the RunOnceEx at first must call CleanUp.cmd and reboot??

Link to comment
Share on other sites

You Only Need 1 Entry At The End Of The RunOnceEx.cmd

After you reboot the computer, And When It Restarts, than it will perform the final cleanup .

Then It Will Remove Media Player Outlook Explorer Shortcuts and Remove Any Other Things You Want To Remove.

Link to comment
Share on other sites

It doesn´t work. :(

here is my RunOnceEx:

cmdow @ /HID
@echo off
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Instalando Aplicaciones" /f
REG ADD %KEY%\024 /VE /D "Google Toolbar" /f
REG ADD %KEY%\024 /V 1 / D "%SystemDrive%\install\Google.Toolbar\GoogleToolbarInstaller.exe /q /d" /f

REG ADD %KEY%\025 /VE /D "Importando Datos de Registro" /f
REG ADD %KEY%\025 /V 1 /D "REGEDIT /S %systemdrive%\Install\RegTweaks.reg" /f

REG ADD %KEY%\026 /VE /D "Limpiando y Reiniciando" /f
REG ADD %KEY%\026 /V 1 /D "%systemdrive%\install\CleanUp.cmd" /f
REG ADD %KEY%\026 /V 2 /D "%systemdrive%\Cleanup\CleanUp2.cmd" /f
Exit

and here is my cleanup.cmd

cmdow @ /HID
shutdown.exe -r -f -t 120 -c "Windows XP se reiniciara en un minuto para actualizarse, asi que en breves momentos lo tendras todo instalado"
net user aspnet /delete

DEL /Q "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\Reproductor de Windows Media.lnk"

RD /S /Q "%systemdrive%\drivers\"
RD /S /Q "%systemdrive%\install\"
EXIT

And here is my cleanup2.cmd

cmdow @ /HID
DEL /Q "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\Reproductor de Windows Media.lnk"
RD /S /Q "%systemdrive%\CleanUp\"
EXIT

CleanUp2.cmd seems to have been done at the time when the computer was in the 120 seconds shutdown. not after the reboot, i think.

Link to comment
Share on other sites

I have tried differents methods but withou success :no:

Can i put the cleanup2.cmd in the cmdlines.txt, it will work?

[COMMANDS]

"RunOnceEx.cmd"

"\CleanUP\CleanUp2.cmd"

I want to execute Cleanup2.cmd in the second reboot, after finishing execute Runonceex.cmd and Cleanup.cmd in order to remove windows player from quick launch, i couldnt remove it anyway.

Thanks

Link to comment
Share on other sites

As I mentioned before, these shortcuts are created at the time you desktop is drawn.. which is after runonceex runs and far after cmdlines.txt is executed. What you need to do is place your cleanup2.cmd in the startup folder of your start menu. Anything in this folder will be executed after the desktop starts to load.

I promise you once you move that cmd into this folder your problems will be fixed. Only thing to note is, youll want to add a line to have the script delete itself after its run.. otherwise it will run every time you boot up your pc. For example:

DEL /Q %ALLUSERPROFILE%\Start Menu\Programs\Startup\cleanup2.cmd

Assuming of course cleanup2.cmd is located here.

Hope this helps clear things up!

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