Fails to run for some reason, is the syntax correct there?
EDIT: it doesn't like the %a
EDIT2: ok works fine if i run it manually but doesn't run from a script, this is frustrating.
EDIT3: when running it in a command prompt window manually it runs like this:
the first line is the line i execute, the next two are something it's doing on its own.Code:C:\>for /f %a in ('C:\GetADAttributes.exe givenName') do for /f %b in ('C:\GetADAttributes.exe sn') do mkdir "C:\%b, %a" C:\>for /F %b in ('C:\GetADAttributes.exe sn') do mkdir "C:\%b, FIRSTNAME" C:\>mkdir "C:\LASTNAME, FIRSTNAME"
Last edited by mrbios; 8th October 2012 at 02:47 PM.
OK it doesnt work for me in a batch file either.... let me look at it.
OK stupid problem, in a batch file you have to escape the variables like this:
Code:for /f %%a in ('GetADAttributes.exe givenName') do for /f %%b in ('GetADAttributes.exe sn') do mkdir "C:\%%b, %%a"
Thanks for all your help Chris, you've been fantastic, next on my agenda i need to make some sort of system for moving all files from location 1 to location 2 and renaming them all to include XXXX_ at the beginning of each file name ............ but that's a job for tomorrow lol
EDIT: oh..i'd forgotten about the fun part that is the login scripts, even though we have something working when run from the desktop, i now need to get it working when run on logon, which currently it doesn't appear to EDIT AGAIN: didn't appear to because i was being stupid, works fine now
Last edited by mrbios; 8th October 2012 at 03:43 PM.
FWIW, you can run programs at logon without using a script by GPO: user config > policies > admin templates > system > logon > run these programs at user logon. Has the advantage of launching the program once the desktop is shown, so doesn't slow logon times down; I actually use it to run a VBS, still, but one that takes ten seconds and hangs logon at "preparing your desktop" if it's run as a logon script.
themightymrp (8th October 2012)
There are currently 1 users browsing this thread. (0 members and 1 guests)