Jump to content

script newbie - regwrite error


sdsm
 Share

Recommended Posts

Hello,

This error makes no sense to me and i'm sure I'm missing something simple. Here is the code in the example:

; Write a single REG_SZ value
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE", "TestKey", "REG_SZ", "Hello this is a test")

Here is my code:

; Write a single REG_SZ value
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\
Environment", "LSFORCEHOST", "REG_SZ", "14.221.5.26")

When I execute it comes up with this error:

Posted Image

What am I missing??

Thanks for your help.

Link to comment
Share on other sites

  • Developers

is your regwrite on one line ?

; Write a single REG_SZ value
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "LSFORCEHOST", "REG_SZ", "14.221.5.26")

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

is your regwrite on one line ?

; Write a single REG_SZ value
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "LSFORCEHOST", "REG_SZ", "14.221.5.26")

That was it! Thanks!

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...