Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. __author__ = 'jack.williams'
  2. file = "C:\Users\jack.williams\Desktop\ADMX Files Alexandru\Egress Switch HKCU Settings.ADM"
  3. admfile = open(file,"a+")
  4. data = admfile.readlines()
  5. x = 0
  6.  
  7. final = False
  8. while final == False and x < 20:
  9. print x
  10. for x in range(1,10):
  11. print x
  12. if x == 1:
  13. policy = raw_input('Enter a policy name:')
  14. # while policy == policy.isalpha():
  15. admfile.write("\n\nPOLICY " +policy)
  16. print "Policy Name Saved to Doc"
  17. # else:
  18. # print "This is not a valid input please try again"
  19. # final = False
  20. # x = 0
  21. if x == 2:
  22. explain = raw_input('Enter an explain thread name')
  23. admfile.write('\nEXPLAIN !!' + explain)
  24. print "Explanation added to Doc"
  25. if x == 3:
  26. keyname = raw_input('Is this key 32 or 64 bit?')
  27. if keyname == "32":
  28. admfile.write('\nKEYNAME '+ '"Software\Egress\Switch"')
  29. print"32 bit path added to Doc"
  30. elif keyname == "64":
  31. admfile.write('\nKEYNAME ' + '"Software\wow6432Node\Egress\Switch"')
  32. print"64 bit path added to doc"
  33. if x == 4:
  34. version = raw_input('Please specify a version E.G. VERSIONTWO,VERSIONFOUR')
  35. admfile.write('\nSUPPORTED !!'+version)
  36. Part = raw_input('Please specify a part name')
  37. admfile.write("\nPART "+ Part)
  38. if x == 5:
  39. wordorstring = raw_input('Is this policy a String or DWORD?:')
  40. if wordorstring == "String":
  41. admfile.write("\nEDITTEXT")
  42. string = raw_input("Enter the string value:")
  43. admfile.write('\nVALUENAME '+string)
  44. admfile.write('\nEND PART')
  45. admfile.write('\nEND POLICY')
  46. if wordorstring =="DWORD":
  47. admfile.write("\nNUMERIC")
  48. dwordstring = raw_input("Enter the DWORD value:")
  49. admfile.write("\nVALUENAME "+dwordstring)
  50. maxmin = raw_input("Please Specify requirements in following format:MIN 0 MAX 9999999 DEFAULT 0 SPIN 1 :")
  51. admfile.write ("\n" + maxmin)
  52. admfile.write("\nEND PART")
  53. admfile.write("\nEND POLICY")
  54. if x == 6:
  55. description = raw_input("Please specify a description for policy:")
  56. admfile.write("\n"+description)
  57. if x ==7:
  58. stop = raw_input("ADM policy created, would you like to create another?")
  59. if stop == "N":
  60. final = True
  61. break
  62. elif stop == "Y":
  63. x = 0
  64. else:
  65. break
  66.  
  67. admfile.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement