Skip to content

Commit

Permalink
Update AutoRun.au3
Browse files Browse the repository at this point in the history
1. Made settings file's embedding logic happen only after determining the working folder
2. Added support for "-" and not just "/" for the command line parameter of simluate
  • Loading branch information
lwcorp committed Mar 23, 2024
1 parent 4dab7fb commit dfd118d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions AutoRun.au3
Expand Up @@ -9,7 +9,7 @@
#cs
[FileVersion]
#ce
#AutoIt3Wrapper_Res_Fileversion=1.5.5.2
#AutoIt3Wrapper_Res_Fileversion=1.5.5.3
#AutoIt3Wrapper_Res_LegalCopyright=Copyright (C) https://lior.weissbrod.com

#cs
Expand Down Expand Up @@ -75,8 +75,6 @@ Else
Local $thecmdline[1] = [0]
EndIf

FileInstall("Autorun.inf", $s_Config)

If $shareware Then
$keygen_url = StringReplace($keygen_url, "{product_id}", $product_id)
$keyfile = @ScriptDir & "\" & StringLeft(@ScriptName, StringLen(@ScriptName) - StringLen(".au3")) & ".key"
Expand Down Expand Up @@ -150,10 +148,11 @@ Func load($check_cmd = True, $skiptobutton = False)
EndIf
EndIf
EndIf
if _ArraySearch($thecmdline, "/simulate", 1) > -1 Then
if IsArray(_ArrayFindAll($thecmdline, "[-/]simulate", 1, default, default, 3)) Then
$sim_mode = true
EndIf
EndIf
FileInstall("Autorun.inf", $s_Config)
_ReadAssocFromIni_alt(@WorkingDir & "\" & $s_Config, False, '', '~')
if $sim_mode and not x('CUSTOM CD MENU.simulate') Then
x('CUSTOM CD MENU.simulate', true)
Expand Down

0 comments on commit dfd118d

Please sign in to comment.