MSFN Forum: Batch scripting help - MSFN Forum

Jump to content



Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

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

Batch scripting help Rate Topic: -----

#1 User is offline   irbanur 

  • Group: Members
  • Posts: 1
  • Joined: 28-June 06

Posted 23 July 2006 - 05:30 PM

Hello, I'm having som problems with for loops when scripting.

The following:

test.cmd
@echo off
for /D %i in ("c:\Documents and Settings\*") do dir "%i\Application Data\Microsoft\Internet Explorer\Quick Launch"


Returns:
Unexpected \Documents


Oh, I'm not trying just to list the files it's just a test. What I'm trying to accomplish is to copy some shortcuts to all users quick launch, so if someone knows of a better way, please tell me.


#2 User is offline   mazin 

  • MSFN Addict
  • Group: Supreme Sponsor
  • Posts: 1,952
  • Joined: 12-January 04

Posted 23 July 2006 - 07:23 PM

If your system drive is C:\, then have a look here:

C:\WINDOWS\system32\config\systemprofile\Application Data\Microsoft\Internet Explorer\Quick Launch

All shortcuts I throw into "Quick Launch" at T-13 (SVCPACK.INF) are put there. Being put there, they get copied to the "Quick Launch" of every user afterwards.

Likewise, all shortcuts I delete from "Quick Launch" at T-13, will not be present in the "Quick Launch" of any user.

The same is true for SendTo, too:

C:\WINDOWS\system32\config\systemprofile\SendTo

So, I suggest you do the shortcuts thing at T-13.

Well, I think this could be done at T-12, too.

#3 User is offline   Yzöwl 

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

Posted 24 July 2006 - 02:00 AM

To fix your code:
@echo off
for /D %%i in ("c:\Documents and Settings\*") do dir/b "%%i\Application Data\Microsoft\Internet Explorer\Quick Launch" 2>nul
or tidied up a little
@ECHO OFF
FOR /D %%? IN ("%ALLUSERSPROFILE%\..\*") DO (DIR/B/A "%%?\APPLICATION DATA\MICROSOFT\INTERNET EXPLORER\QUICK LAUNCH" 2>NUL)


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