Jump to content

Search the Community

Showing results for tags 'local gpo'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Edit: I extracted the functions I needed - Add and Delete - and made a much smaller file from the functions inside (attached here). But I'd still like to fix the command line issue someday, this is a great effort by zorphnog for those of us who have to admin local GPOs for deployed systems! Hi all (and zorphnog, if you're around, I will be trying to PM you on this topic). I'm trying to use this Registry Policy File Editor script on Windows 7 x64. The problem I'm having is that the commandline example which has spaces in the -v (value) and -d (data) doesn't work. It only writes the first word of the value or data into the policy file. I tracked the problem down starting at the function _ParseOptions. I compile and run the tool with command line: gre -a -f=computer -k=Software\Policies\Microsoft\MyTestKey -v="My Test Value" -t REG_SZ -d="Registry Policy File editing" It creates the array with extra entries for the items with spaces, like this: [0]|12 [1]|--add [2]|-f=computer [3]|-k=Software\Policies\Microsoft\MyTestKey [4]|-v=My [5]|Test [6]|Value [7]|-t [8]|REG_SZ [9]|-d=Registry [10]|Policy [11]|File [12]|editing And that works but then in the .pol file the key name (-v) is "My" and the data (-d) is "Registry. But when I try to change the way the array is created, the tool no longer parses the command line successfully (nothing gets written). E.g., I do this: Local $local_CmdLine = StringSplit($cmdlineraw, "-", 1) _arraydelete($local_CmdLine, 1) $local_CmdLine[0] = Ubound($local_CmdLine,1) - 1 For $i = 1 to $local_CmdLine[0] $local_CmdLine[$i] = "-" & $local_CmdLine[$i] Next For $j = 1 to $local_CmdLine[0] If StringInStr($local_CmdLine[$j], "-t") Then Local $s_typestring = StringSplit($local_CmdLine[$j]," ") _ArrayInsert($local_CmdLine, $j + 1, $s_typestring[2]) $local_CmdLine[$j] = "-t" ; ExitLoop EndIf Next Now the output is like this: [0]|6 [1]|-a [2]|-f=computer [3]|-k=Software\Policies\Microsoft\MyTestKey [4]|-v=My Test Value [5]|-t [6]|REG_SZ [7]|-d=Registry Policy File editing And then the function _OptParse_GetOpts from the include _OptParse.au3 doesn't seem to be able to parse my new array. And there I get lost - my array-fu is weak... I've spent a few hours on this and all I get is subscript errors and stuff. Anyone able to have a look? _____________________________________ Below is my modified file with the bare functions needed to add and delete local policy objects in the .pol files. LocalGPOPolEdit_Include.au3
×
×
  • Create New...