' Check if settings.ini exists If objFSO.FileExists(strConfigPath) Then ' Feature Part A: Read and Update Existing Config WScript.Echo "Config found. Updating timestamp..." ' Read the file content Set objFile = objFSO.OpenTextFile(strConfigPath, 1) ' 1 = ForReading striniContent = objFile.ReadAll objFile.Close ' Simple update logic (In a real app, you would parse this properly) ' Here we just overwrite the LastRun entry for demonstration Set objTextFile = objFSO.OpenTextFile(strConfigPath, 2, True) ' 2 = ForWriting objTextFile.WriteLine "[" & strAppName & "]" objTextFile.WriteLine "Version=" & strVersion objTextFile.WriteLine "LastRun=" & Now objTextFile.WriteLine "Location=" & strScriptPath objTextFile.Close MsgBox "Update successful!" & vbCrLf & "Config located at: " & strConfigPath, 64, "Portable App" -full- Koleksi Bokep 3gp Artis Indonesia Sources For Papers
' --- Configuration --- strAppName = "MyPortableTool" strVersion = "1.0" Mallu Mariya Romantic Back To Back Scenes - Part 1 Target
' --- Feature Logic ---
Below is a feature script:
Else ' Feature Part B: Create New Config (First Run) WScript.Echo "No config found. Creating portable settings..." Set objTextFile = objFSO.CreateTextFile(strConfigPath) objTextFile.WriteLine "[" & strAppName & "]" objTextFile.WriteLine "Version=" & strVersion objTextFile.WriteLine "InstallDate=" & Now objTextFile.WriteLine "LastRun=" & Now objTextFile.WriteLine "Location=" & strScriptPath objTextFile.Close MsgBox "New Portable Profile Created!", 64, "First Run" End If
' Define the config file path (same folder as script) strConfigPath = strScriptPath & "\settings.ini"
' --- CORE PORTABLE LOGIC --- ' Get the path where the script is currently running strScriptPath = objFSO.GetParentFolderName(WScript.ScriptFullName)