+ Post New Thread
Results 1 to 2 of 2
Coding Thread, quick batch file help in Coding and Web Development; im trying to get a batch file to run the for /f command on a server. on a client machine ...
  1. #1

    MK-2's Avatar
    Join Date
    Oct 2006
    Location
    Nottingham
    Posts
    3,237
    Thank Post
    149
    Thanked 581 Times in 307 Posts
    Blog Entries
    8
    Rep Power
    199

    quick batch file help

    im trying to get a batch file to run the for /f command on a server. on a client machine its fine, it runs it fine and does what i need, on a server it does nothing.
    we have a txt file with a lot of GUIDs that the for /f command reads through, then runs msiexec on each of them. as i said, works fine on XP. on server 2003 it does nothing.

    the command is
    for /F %i in (test.txt) do msiexec /X %i /Q /NORESTART
    as i said on XP this works fine, on 2003 it just goes back to cmd. ive tried changing it to "do @echo %i" to see if it shows anything but still nothing. i need to remove over 180 msi's from a server and this was the quickest way of doing it.
    any ideas greatly appreciated!



    as an addition, this in win7 works, but doesn't in server 2003:

    for /f %i in (test.txt) do @echo %i

    as another addition, the test.txt contains stuff like this:
    {05386874-F787-4353-8636-92C76AAD6925}
    {09ADE388-2433-4CF0-8DBA-A7A01496BBFD}
    {0DF44D8C-1E33-4DA7-96E5-91FE84C91521}
    {0F08E4D9-77B3-48A7-BCC8-ED0D4D1540F8}

    if i change it to normal text it works, but those GUIDs dont
    Last edited by MK-2; 5th August 2011 at 12:51 PM.

  2. #2

    MK-2's Avatar
    Join Date
    Oct 2006
    Location
    Nottingham
    Posts
    3,237
    Thank Post
    149
    Thanked 581 Times in 307 Posts
    Blog Entries
    8
    Rep Power
    199
    nevermind, crisis averted. for some reason the txt file i copied from mem stick with the GUIDs in must have had weird security, as creating a new txt on the server and copying contents over worked.

    grrrrrr

SHARE:
+ Post New Thread

Similar Threads

  1. batch file help
    By marc2510 in forum Scripts
    Replies: 5
    Last Post: 13th July 2011, 08:21 PM
  2. Quick Batch File Question
    By karldenton in forum Windows
    Replies: 10
    Last Post: 5th November 2009, 12:34 PM
  3. Batch File (select random file) help
    By fil_b in forum Windows Server 2000/2003
    Replies: 5
    Last Post: 5th November 2009, 04:13 AM
  4. Replies: 12
    Last Post: 11th October 2008, 11:37 PM
  5. batch file help
    By beeswax in forum Scripts
    Replies: 9
    Last Post: 3rd March 2006, 07:48 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •