Jump to content
JamesyG

Script to randomize extra data field values - Help required for the last little snag

Recommended Posts

All,

I worked out a script for randomisation of our windows update categories in extra data fields.  However I cannot get the last heading to work, they split nicely between "mon-wed" and "thu-fri" however they never assign anything to the Sat-Sun group and all the syntax and spelling seems correct.

I have attached the XML and a screengrab from the console, not quite sure where I went wrong so any pointers would be greatly appreciated.  I am sure it's a relatively rookie mistake as I don't do this often.

script.JPG.b1bccee88c9c53e046f01a2ee7b37a46.JPG

Assign WindowsUpdatePolicy at Random.xml

Share this post


Link to post
Share on other sites

Lets see if this helps you find out why ;)

 

C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
C:\Users\mendy.GLT>set /a "rand=%random% %2"
1
C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
C:\Users\mendy.GLT>set /a "rand=%random% %2"
1
C:\Users\mendy.GLT>set /a "rand=%random% %2"
1
C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
C:\Users\mendy.GLT>set /a "rand=%random% %2"
1
C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
C:\Users\mendy.GLT>set /a "rand=%random% %2"
1
C:\Users\mendy.GLT>set /a "rand=%random% %2"
1
C:\Users\mendy.GLT>set /a "rand=%random% %2"
0
<------------LOOK HERE -------------->
C:\Users\mendy.GLT>set /a "rand=%random% %3"
2
C:\Users\mendy.GLT>set /a "rand=%random% %3"
1
C:\Users\mendy.GLT>set /a "rand=%random% %3"
2
C:\Users\mendy.GLT>set /a "rand=%random% %3"
1
C:\Users\mendy.GLT>set /a "rand=%random% %3"
1
C:\Users\mendy.GLT>set /a "rand=%random% %3"
2
C:\Users\mendy.GLT>set /a "rand=%random% %3"
1
C:\Users\mendy.GLT>set /a "rand=%random% %3"
0
C:\Users\mendy.GLT>set /a "rand=%random% %3"
0
C:\Users\mendy.GLT>set /a "rand=%random% %3"
2
C:\Users\mendy.GLT>set /a "rand=%random% %3"
1
C:\Users\mendy.GLT>set /a "rand=%random% %3"
0
C:\Users\mendy.GLT>set /a "rand=%random% %3"
1
C:\Users\mendy.GLT>set /a "rand=%random% %3"
0
C:\Users\mendy.GLT>set /a "rand=%random% %3"
0

 

Share this post


Link to post
Share on other sites

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

×