Windows 7 Batch issues
Hi, Im trying to the following command: for /f "Skip=3 Tokens=2*" %i in ('reg QUERY "\\%target%\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\%sid%.bak" /v ProfileImagePath') do set ProfileImagePath=%j This command works properly in Windows XP and returns 'ProfileImagePath' as a variable. However in Windows 7 the 'set ProfileImagePath=%j' never executes and I dont recieve any errors at all. When i echo %profileimagepath% it returns %profileimagepath%. I can run the reg query by itself from command line and it returns a set of strings, so i know the set is not null. In addition i have tried changing the last command from 'set ProfileImagePath=%j' to 'echo test' and it never echos. Im completely lost as to why this will not work. Any help would be greatly appreciated.
November 18th, 2010 12:12pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics