Files
NAFKA-crm-gui/scripts/start.vbs
2026-05-28 11:01:25 +02:00

17 lines
614 B
Plaintext

Set WshShell = CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
' 1. Get the exact path to the python_env folder
strEnvDir = FSO.GetParentFolderName(WScript.ScriptFullName) & "\python"
' 2. Set the working directory (crucial so pythonw.exe finds its DLLs)
WshShell.CurrentDirectory = strEnvDir
' 3. Get the ABSOLUTE path to the executable, not just the file name
pythonExe = strEnvDir & "\pythonw.exe"
' 4. Build the command using the absolute path
runCommand = Chr(34) & pythonExe & Chr(34) & " -m wce_crm.gui"
' 5. Run it completely hidden
WshShell.Run runCommand, 0, False