Jump to content
Sign in to follow this  
JulianoNewbie

Insert parameter an reg

Recommended Posts

JulianoNewbie

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 ;)^_^

Share this post


Link to post
Share on other sites
JulianoNewbie

eu try this but i could not make it work

I do not understand how to make

look at my nick... i'm newbie ^_^

Share this post


Link to post
Share on other sites
JulianoNewbie

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

Share this post


Link to post
Share on other sites
KaFu

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?

Share this post


Link to post
Share on other sites
JulianoNewbie

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

Share this post


Link to post
Share on other sites
KaFu

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

Share this post


Link to post
Share on other sites
JulianoNewbie

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

Share this post


Link to post
Share on other sites
KaFu

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.