Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted (edited)

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

Edited by MK-2
Posted

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

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



×
×
  • Create New...