Sign in to follow this  
Followers 0
Swimming_Bird

Passing Macros from an INI filie

3 posts in this topic

For the code

$installs=IniRead ( "autorun.inf", "AutoRunParams", "installdir", @ScriptDir & "\$OEM$\Install\" )
$wpipath=IniRead ( "autorun.inf", "AutoRunParams", "wpidir", @ScriptDir & "\$OEM$\WPI\" )

And the ini file

[AutoRunParams]
installdir=@ScriptDir & "\install"
wpidir=@ScriptDir & "\WPI"

if it fails it returns the proper string, however if i put macros in the code it doesnt return what i want, is there any way to have it return a variable location?

Share this post


Link to post
Share on other sites



Opt("ExpandVarStrings", 1)


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

doesnt seem to work ;)

Opt("ExpandVarStrings", 1)
$cdrom=@ScriptDir & "\"
$installs=IniRead ( "autorun.inf", "AutoRunParams", "installdir", @ScriptDir & "\$OEM$\Install\" )
$wpipath=IniRead ( "autorun.inf", "AutoRunParams", "wpidir", @ScriptDir & "\$OEM$\WPI\" )

MsgBox(0,"",$wpipath&" "&$installs)

[AutoRunParams]
installdir=@ScriptDir & "\install"
wpidir=@ScriptDir\$OEM$

Posted Image

if this doesnt work is there any way to take a particular string like %cdrom% and have that replaced with the macro @ScriptDir (my script will always be run from the base directory of a cd/dvd

ahh, nm i just chaged it to this in the ini

installdir=@ScriptDir@\$$OEM$$\Install
wpidir=@ScriptDir@\$$OEM$$\WPI
Edited by Swimming_BIrd

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  
Followers 0