Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WSH script to create a shortcut doesn't work on Vista
Message
De
13/04/2007 14:36:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
13/04/2007 14:35:26
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
01215705
Message ID:
01215706
Vues:
24
>I'm using the following script to create a shortcut and it works in all Windows except Vista.
>Someone could help me to know what's happening?
>
>
>Local loWSH As WScript.Shell, lcStartupDir, loLnk
>loWSH = Createobject("WScript.Shell")
>lcStartupDir = loWSH.SpecialFolders("AllUsersStartup")
>loLnk = loWSH.CreateShortcut(Addbs(lcStartupDir) + "Auto Backup - Folhamatic.lnk")
>loLnk.TargetPath = "Y:\folhawin\backup\autobkp\autobkp.exe"
>loLnk.WorkingDirectory = "Y:\folhawin\backup\autobkp"
>loLnk.Save()
>Store Null To loLnk, loWSH
>
>
>PS: The active user has adminstrator rights.

AFAIK, WSH can be disabled, and some people disable it for security concerns. Perhaps it is disabled by default on Vista?
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform