Simpatie.ro - matrimoniale
Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Nou pe simpatie:
luiza69 pe Simpatie
Femeie
24 ani
Bucuresti
cauta Barbat
27 - 75 ani
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides /

[VBS] Assign Current User Desktop Path (not only desktop) to Variable

Pagini: 1 Moderat de TRaP, TonyTzu
#1
TRaP
Moderator
Postari: 960
strDesktop will be the desktop folder path of your current (logged in) user profile, eg:

C:\Users\TRaP\Desktop


set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")


Source:
https://stackoverflow.com/questions/200 ... he-desktop

* * * *

A different approach would be just to get the user profile then type the desired folder manually:


Set oShell = CreateObject("WScript.Shell")
strHomeFolder = oShell.ExpandEnvironmentStrings("%USERPROFILE%")
strHomeFolder = strHomeFolder & "\Desktop"


Source:
https://social.technet.microsoft.com/Fo ... forum=ITCG


 
   
Pagini: 1  
Mergi la