MSFN Forum: Few Start Menu Items not affected in cleanup... - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Few Start Menu Items not affected in cleanup... Rate Topic: -----

#1 User is offline   durex 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 953
  • Joined: 21-October 04

Posted 26 December 2004 - 10:34 PM

So in my cleanup.cmd i have the following lines that arent working...

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"

RD /S /Q "%AUStart%\Administrative Tools"


its not the variables because I have a ton of other shortcuts that are also being moved and folder that are being deleted. It seems as though its specific to these couple shortcuts and admin tools folder...

Any ideas?

Thanks!


#2 User is offline   glent 

  • Tpyo Spceialist
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,041
  • Joined: 16-August 04

Posted 27 December 2004 - 03:12 AM

That code wrks form me Via WPI cant see anything wrong

#3 User is offline   MCT 

  • MSFN Junkie
  • PipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 3,288
  • Joined: 19-May 04

Posted 27 December 2004 - 03:16 AM

closing CODE tags or QUOTE tags :P pick 1 lol
set AUStart=%AllUsersProfile%\Start Menu\Programs
set UserStart=%UserProfile%\Start Menu\Programs

maybe try

set AUStart="%AllUsersProfile%\Start Menu\Programs"
set UserStart="%UserProfile%\Start Menu\Programs"


#4 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 27 December 2004 - 04:48 AM

Those shortcuts are not created until you logon to desktop.

#5 User is offline   durex 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 953
  • Joined: 21-October 04

Posted 27 December 2004 - 11:09 AM

MCT, on Dec 27 2004, 03:16 AM, said:

maybe try

set AUStart="%AllUsersProfile%\Start Menu\Programs"
set UserStart="%UserProfile%\Start Menu\Programs"

That doesnt work as you end up with the quotes in your variable and again, Ive got a ton of other shortcuts and folders that are being effected using these variables without issue.

Mhz, on Dec 27 2004, 04:48 AM, said:

Those shortcuts are not created until you logon to desktop.

Thats probably it... anyone have a good way to clean these up, short of manually doing it after logging on?

#6 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 27 December 2004 - 11:19 AM

Self-deleting batch file in all users startup folder

#7 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 27 December 2004 - 11:21 AM

Why not prevent them being created, in the first place using the winnt.sif components section, then just add the shortcuts to your install source for copying over

#8 User is offline   blinkdt 

  • Somewhat Knowledgeable
  • PipPipPipPip
  • Group: Members
  • Posts: 582
  • Joined: 30-September 03
  • OS:Vista Ultimate x64
  • Country: Country Flag

Posted 27 December 2004 - 09:52 PM

@MHz Sort of off-topic, but boy-oh-boy-oh-boy, I'd give my left pinky for a good, reliable, self-deleting batch file. Do you have something in the form of a template that you could share here?

#9 User is offline   durex 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 953
  • Joined: 21-October 04

Posted 27 December 2004 - 09:58 PM

blinkdt, on Dec 27 2004, 09:52 PM, said:

@MHz Sort of off-topic, but boy-oh-boy-oh-boy, I'd give my left pinky for a good, reliable, self-deleting batch file. Do you have something in the form of a template that you could share here?

Um... how about...
del filename.cmd


at the end of your batch file...

#10 User is offline   blinkdt 

  • Somewhat Knowledgeable
  • PipPipPipPip
  • Group: Members
  • Posts: 582
  • Joined: 30-September 03
  • OS:Vista Ultimate x64
  • Country: Country Flag

Posted 27 December 2004 - 10:05 PM

@durex You dah man, just that easy!

#11 User is offline   prathapml 

  • Follow the rules please :-)
  • Group: Patrons
  • Posts: 6,791
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 28 December 2004 - 03:27 AM

@durex
Maybe the solution is far simpler:

1. If the "%AUStart%\Internet" folder is not created before moving files into it, how will the command work? :P

2. The "Administrative Tools" in start menu is actually a folder. It is enabled/disabled from registry.

#12 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 28 December 2004 - 03:49 AM

filename.cmd in All Users Startup folder
@echo off
set AUStart=%AllUsersProfile%\Start Menu\Programs
set UserStart=%UserProfile%\Start Menu\Programs

MD "%AUStart%\Internet"
MOVE /Y "%UserStart%\Internet Explorer.lnk" "%AUStart%\Internet"
MOVE /Y "%UserStart%\Outlook Express.lnk" "%AUStart%\Internet"
Attrib -r "%AUStart%\startup\filename.cmd"
ShutDown.exe -s -t 10 -c "System shutdown required now. Thankyou for your patience."
Del "%AUStart%\startup\filename.cmd"

Take note of the Attrib command, the file tends to turn into read-only, when copied over during text setup.

#13 User is offline   durex 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 953
  • Joined: 21-October 04

Posted 28 December 2004 - 06:22 AM

@prathapml
Ive got many other shortcuts that are being moved to the Internet folder without issue, so I know that isnt it

@MHz
Thanks for writing that up specific to my example!

Thanks for the suggestions guys... always appreciated.

#14 User is offline   webmedic 

  • fixer of things broken
  • PipPipPipPip
  • Group: Members
  • Posts: 621
  • Joined: 15-August 03

Posted 11 January 2005 - 11:15 AM

After having these kinds of issues for the last ytear and a half. I was recently going through my scripts and it finally hit me what was going on.

In my case I was ceating my user accounts before I was running my cleanup.cmd. Well after tht it is to late the new users account has already been created from the default account. By the time the cleanup.cmd is running your only cleaning up the default account and the all users account and your new user has already been made from the default account before your cleaned the default account up.

So you need to reorder the way things are done. Do your cleanup and copying files and such. In my case I also do all my program installes from here so that the settings get applied to the default account also. Then as the last thing you do create your user account.

For my I'm also not using the winnt.sif. All this can be done easily from cmdlines.txt. One other thing if you do this from anything but cmdlines.txt it will be to late since the accounts will already be created. This is not so bad but it will mena that you will have more accounts to clean up.

#15 User is offline   durex 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 953
  • Joined: 21-October 04

Posted 11 January 2005 - 04:45 PM

@ web
While your setup may differ from mine, my method should effect the %userprofile% (my created account, not the default) because my cleanup.cmd is run from RunOnceEx and my accounts are created prior to RunOnceEx even running.

So my cmdlines.txt creates my accounts, runs the runonceex script (which keep in mind at the time cmdlines.txt executes it, is ONLY adding the necessary RunOnce reg entries). Assuming runonceex is the last item in cmdlines.txt your pc then reboots.

Upon the 1st reboot after running cmdlines.txt it automatically logs in using the account I created in cmdlines, before runonceex.cmd was executed, THEN starts the RunOnce install, at the end of which runs cleanup.cmd.

So you see, at this point, when cleanup.cmd runs, youve already logged in using the account you created, so the shortcuts are created under your profile (or all users), not the default.

The reason why these few shortcuts werent getting removed when my cleanup.cmd ran, is because they are actually added pretty much at the same time the desktop is drawn for the 1st time.. after the cleanup.cmd ran. So they arent effected.

Hope this clears things up!

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy