Wscript issue..


delicacy

New member
Local time
12:25 PM
Posts
1
OS
win11pro
Hi Axel, i'm lost with an old windows script address that doesn't work, could you please help me with that address ?

When i use this address on "startup" and then "Run":
"C:\Program Files\Desktop Lock\TLDL.EXE" /LOCK

It works...

But when i use it on my vbs file, i get this strange error:

X.webp

THE VBS FILE CONTENT:

Sub RunApplication(ByVal sFile)

Dim WShell : Set WShell = CreateObject("WScript.Shell")
WShell.Run Chr(34) & sFile & Chr(34), 8, false

End Sub

RunApplication "C:\Program Files\Desktop Lock\TLDL.EXE" /LOCK
WScript.sleep(4000)
RunApplication "C:\Program Files\Toolz\shutdown.exe"" -s suspend -l 0"



Can someone please fix the runapplication section ? not knowing why it doesn't work..






I get this screenshot attached..
 

My Computer

System One

  • OS
    win11pro
    Computer type
    Laptop
    Manufacturer/Model
    lenovo
Sub RunApplication(ByVal sFile)

Dim WShell : Set WShell = CreateObject("WScript.Shell")
WShell.Run sFile, 8, false

End Sub

RunApplication """C:\Program Files\Desktop Lock\TLDL.EXE"" /LOCK"
WScript.sleep(4000)
RunApplication """C:\Program Files\Toolz\shutdown.exe"" -s suspend -l 0"
 

My Computer

System One

  • OS
    Windows 10 Home
    Computer type
    Laptop
    Manufacturer/Model
    HP Elitebook 2530p
    CPU
    Intel Core 2 Duo L9400@1.86 GHz
    Memory
    2 GB
Back
Top Bottom