Jump to content

Insert parameter an reg


Recommended Posts

Hello,

pls someone can help with this script?

I need insert an parameter in exe and this parameter must be imputed on reg file

Example that i need:

i'll execute the exe file "setup.exe" with 2 parameter /parent and /group

c:\setup.exe /parent=brspoa107m /group=br_client

The result of this parameters must enter in reg entries

RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion', '"Parent"', 'REG_SZ', 'Result here')

RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion', '"ClientGroup"', 'REG_SZ', ''Result here' ')

Sorry for my bad english ;)^_^

Link to comment
Share on other sites

No one can help-me with this?

i try to use commandline but without sucess

RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion', '"Parent"', 'REG_SZ', 'Result here')

RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion', '"ClientGroup"', 'REG_SZ', ''Result here' ')

thanks

Link to comment
Share on other sites

Like this

$parent = 'brspoa107m'
$group = 'br_client'
run("c:\setup.exe /parent=" & $parent &" /group=" & $group)
RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion', '"Parent"', 'REG_SZ', $parent)
RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion', '"ClientGroup"', 'REG_SZ', $group)

or did I missunterstood the questions?

Link to comment
Share on other sites

Thanks Kafu

I need but i need this:

i'll execute the exe file "setup.exe" with 2 parameter /parent and /group, but i dont know to make this parameters and link this parameters with regwrite ^_^

note: Setup.exe is name to this script compiled.

c:\setup.exe /parent=xxxx /group=xxxx

The result of this parameters /parent and /group must enter in reg entries

RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion', '"Parent"', 'REG_SZ', 'Result here') <---- xxxx enters here

RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion', '"ClientGroup"', 'REG_SZ', ''Result here' ') <--- xxxx enters here

Edited by JulianoNewbie
Link to comment
Share on other sites

Raw, without any error-checking... add this to setup.exe, works only if exactly called as mention "c:\setup.exe /parent=xxxx /group=xxxx".

if $CmdLine[0] > 1 Then
    $parent = StringReplace($CmdLine[1],"/parent=","")
    $group = StringReplace($CmdLine[2],"/group=","")
    RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion', '"Parent"', 'REG_SZ', $parent)
    RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion', '"ClientGroup"', 'REG_SZ', $group)
endif
Link to comment
Share on other sites

Raw, without any error-checking... add this to setup.exe, works only if exactly called as mention "c:\setup.exe /parent=xxxx /group=xxxx".

if $CmdLine[0] > 1 Then
    $parent = StringReplace($CmdLine[1],"/parent=","")
    $group = StringReplace($CmdLine[2],"/group=","")
    RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion', '"Parent"', 'REG_SZ', $parent)
    RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion', '"ClientGroup"', 'REG_SZ', $group)
endif

thanks kafu, when i go to germany i'll pay an beer to you =DDDDDDDDDDD

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...