Wscript issue..


delicacy

Member
Local time
12:40 AM
Posts
82
OS
Win11 Pro, 24H2 26100.2152
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 My Computer

At a glance

Win11 Pro, 24H2 26100.2152
OS
Win11 Pro, 24H2 26100.2152
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 Computers My Computers

  • At a glance

    Windows 10 HomeIntel Core 2 Duo [email protected] GHz2 GB
    OS
    Windows 10 Home
    Computer type
    Laptop
    Manufacturer/Model
    HP Elitebook 2530p
    CPU
    Intel Core 2 Duo [email protected] GHz
    Memory
    2 GB
  • At a glance

    Windows 11 HomeIntel Core 2 Duo E75004 GB
    Operating System
    Windows 11 Home
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 330
    CPU
    Intel Core 2 Duo E7500
    Memory
    4 GB
Thank you so much Ben ))
 

My Computer My Computer

At a glance

Win11 Pro, 24H2 26100.2152
OS
Win11 Pro, 24H2 26100.2152
Computer type
Laptop
Manufacturer/Model
lenovo
Back
Top Bottom