Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __author__ = 'jack.williams'
- file = "C:\Users\jack.williams\Desktop\ADMX Files Alexandru\Egress Switch HKCU Settings.ADM"
- admfile = open(file,"a+")
- data = admfile.readlines()
- x = 0
- final = False
- while final == False and x < 20:
- print x
- for x in range(1,10):
- print x
- if x == 1:
- policy = raw_input('Enter a policy name:')
- # while policy == policy.isalpha():
- admfile.write("\n\nPOLICY " +policy)
- print "Policy Name Saved to Doc"
- # else:
- # print "This is not a valid input please try again"
- # final = False
- # x = 0
- if x == 2:
- explain = raw_input('Enter an explain thread name')
- admfile.write('\nEXPLAIN !!' + explain)
- print "Explanation added to Doc"
- if x == 3:
- keyname = raw_input('Is this key 32 or 64 bit?')
- if keyname == "32":
- admfile.write('\nKEYNAME '+ '"Software\Egress\Switch"')
- print"32 bit path added to Doc"
- elif keyname == "64":
- admfile.write('\nKEYNAME ' + '"Software\wow6432Node\Egress\Switch"')
- print"64 bit path added to doc"
- if x == 4:
- version = raw_input('Please specify a version E.G. VERSIONTWO,VERSIONFOUR')
- admfile.write('\nSUPPORTED !!'+version)
- Part = raw_input('Please specify a part name')
- admfile.write("\nPART "+ Part)
- if x == 5:
- wordorstring = raw_input('Is this policy a String or DWORD?:')
- if wordorstring == "String":
- admfile.write("\nEDITTEXT")
- string = raw_input("Enter the string value:")
- admfile.write('\nVALUENAME '+string)
- admfile.write('\nEND PART')
- admfile.write('\nEND POLICY')
- if wordorstring =="DWORD":
- admfile.write("\nNUMERIC")
- dwordstring = raw_input("Enter the DWORD value:")
- admfile.write("\nVALUENAME "+dwordstring)
- maxmin = raw_input("Please Specify requirements in following format:MIN 0 MAX 9999999 DEFAULT 0 SPIN 1 :")
- admfile.write ("\n" + maxmin)
- admfile.write("\nEND PART")
- admfile.write("\nEND POLICY")
- if x == 6:
- description = raw_input("Please specify a description for policy:")
- admfile.write("\n"+description)
- if x ==7:
- stop = raw_input("ADM policy created, would you like to create another?")
- if stop == "N":
- final = True
- break
- elif stop == "Y":
- x = 0
- else:
- break
- admfile.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement