Jump to content

Recommended Posts

Hello All,

I'm hoping someone can help.

I am having issue converting some of my DOS batch files to use this script, all of the software packages are installing okay but I cannot for example get it to import a registry file or copy files to the desktop.

Any advice will be most greatfully received.

Thanks in advance,

Tom.

Link to comment
Share on other sites

Run command: 

Run(@ComSpec & " /c " & 'commandName', "", @SW_HIDE)

 

EG (merge registry files):

Run(@ComSpec & " /c " & 'reg import RegFilePath.reg', "", @SW_HIDE)

 

Install files:

FileInstall( "file path to it include to exe", "output path", 1)

EG:

FileInstall("D:\Project\MySoware\MainProgram.exe", @ProgramsDir&  "\MySofware\MainProgram.exe", 1)
FileInstall("D:\Project\MySoware\ProgramConfig.ini", @ProgramsDir&  "\MySofware\ProgramConfig.ini", 1)

 

Registry Write: 

; Write a single REG_SZ value
RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey", "REG_SZ", "Hello this is a test")

; Write the REG_MULTI_SZ value of "line1" and "line2"
RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey1", "REG_MULTI_SZ", "line1" & @CRLF & "line2")

; Write the REG_MULTI_SZ value of "line1"
RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey2", "REG_MULTI_SZ", "line1")

; always add and extra null string
RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey3", "REG_MULTI_SZ", "line1" & @CRLF & "line2" & @CRLF)
RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey4", "REG_MULTI_SZ", "line1" & @CRLF & @CRLF & "line2" & @CRLF)

; empty REG_MULTI_SZ
RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey5", "REG_MULTI_SZ", "")

; create just the key
RegWrite("HKEY_CURRENT_USER\Software\Test1")

 

 

All you need is to read the help file (AutoIt.chm). 

Setup the AutoIt  and SciTE full version and start your project.
Type any key will appear quickly functions.
Place the cursor on any keyword and press F1 to search information you will find the answer.

 

sci_TE.jpg

Regards,
 

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

×
×
  • Create New...