Jump to content
Sign in to follow this  
dooky

Add Registry Value on to Remote Registry

Recommended Posts

dooky

Hi,

I´m just trying and trying to get it work but it wont :oops:

Can someone plase help me?

I need some Folders and a Key Created on some Remote Computer Registrys.

I like to have ane exe File where a Message Box appears to enter the Computer Name,

then it should made the change on the Remote PC.

This is what I have:

;Places the input box in the top left corner displaying the characters as they

;are typed.

Local $answer = InputBox("Info needed!!!", "Please enter Computer Name", "Compueter Name", "\\", _

- 1, -1, 0, 0)

; create just the key

RegWrite $answer("\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\HP LaserJet P2050 Series PCL6")

; create just the key

RegWrite $answer("\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\HP LaserJet P2050 Series PCL6\PrinterDriverData")

; Write a single REG_ value

RegWrite $answer("\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\HP LaserJet P2050 Series PCL6\PrinterDriverData", "SSNPNotifyEventSetting", "REG_DWORD", "0")

I have no Idea how it works with the Computername to be added to the later use for RegWrite,

and if it will work this way or not.

I´m also have no experience in Scripting, but I try to help our Support Staff in Helpdesk with this.

It will be sooo great if someone can help me with this small thing here!

Thanks

Clemens

Share this post


Link to post
Share on other sites
water

According to the help file you have to use "computernamekeyname" if you want to write to another users registry.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
dooky

hmm, yes, I have read it.

But it did not realy help me.

should it work like this?

I don´t get it work, and I have no Idea why.

RegWritetest.au3

Share this post


Link to post
Share on other sites
JLogan3o13

It should read something like this....

...RegWrite ("" & $answer & "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlPrintPrintersHP LaserJet P2050 Series PCL6PrinterDriverData", "SSNPNotifyEventSetting", "REG_DWORD", "0")

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
water

If you have problems with an AutoIt function make sure to check the return value and the macros @error and @extended. The docu explains which values to expect.

$iResult = RegWrite(...)
If $iResult = 0 then ConsoleWrite("@error: " & @error & @CRLF)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
dooky

this error I got:

C:\Documents and Settings\s00375a\Desktop\RegWritetest.au3 (6) : ==> Error in expression.:

$iResult = RegWrite(...)

$iResult = RegWrite(^ ERROR

>Exit code: 1 Time: 6.797

RegWritetest.au3

Share this post


Link to post
Share on other sites
water

"..." has to be replaced by your key, type and content as specified in post #4.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
dooky

thank you both Guys! :oops:

We made it working!

Big Big Thanks!!!

Share this post


Link to post
Share on other sites
water
:oops:

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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  

×