Page 1 of 1

Wscript.shell

Posted: Sat Nov 17, 2018 1:05 am
by byron.hopp
I am hoping to utilize this object to manipulate VM's on my server. I am starting simple:

Function TestCreateShortCut()
Local WshShell := CreateObject("Wscript.shell")
Local cSpecialFolder := WshShell:SpecialFolders("Desktop")
MsgInfo( cSpecialFolder,"Special Folder" )
Return nil

This Errors on the "Local cSpecialFolder" line.
I can not pass "Desktop" (pass nothing) and I get all the possible special folders that I can "for next" through.
All the examples show it as above.

Anybody have better luck with this, I am on "Windows 10 Enterprise".

Thanks,

Byron ...

Re: Wscript.shell

Posted: Sat Nov 17, 2018 4:51 pm
by nageswaragunupudi

Code: Select all | Expand

? WshShell:SpecialFolders:Item("Desktop")

Re: Wscript.shell

Posted: Sat Nov 17, 2018 5:32 pm
by byron.hopp
Thank you my friend...Works great.