Jump to content
Sign in to follow this  
TNguyen

My problem

Recommended Posts

TNguyen

Help me!

Program read key name in the .ini file invalid when logon window.

Autoit File:

#include <String.au3>
#NoTrayIcon

Dim $fileConfig = "conf.ini"
Dim $userLevel = "1"
Dim $passLevel = "1"
Dim $keyPass = "NHTU"
Dim $msgKey = "msg"

$username= _StringEncrypt(0, IniRead($fileConfig, "Setting", $msgKey, "NotFound"), $keyPass, $userLevel)

Opt("TrayMenuMode",1);Script Paused/Exit will not be shown.
MsgBox(0,"Welcome",$username)


;------- Run when logon ----------------------------------------------------------------------------
Dim $regPath = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run"
RegWrite($regPath, "Welcome", "REG_SZ", @ScriptFullPath)

Exit

conf.ini

[Setting]
msg=763DC0D8264524EABF7442A287BD23BC3C01E93A

Share this post


Link to post
Share on other sites
enaiman

Where is your config.ini file located?

$fileConfig should be a file location not a file name ($fileConfig = "C:\config.ini")


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites
TNguyen

Where is your config.ini file located?

$fileConfig should be a file location not a file name ($fileConfig = "C:\config.ini")

Dim $fileConfig = @ScriptDir&"\conf.ini" => this true

Thanks for your help! ;)

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.