- 0
VBS - UserProfile Path and File
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Microsoft: IOMMU, VBS part of what's causing EPYC Windows Server VMware BSODs, boot fails
By hellowalkman,
- 0 replies
- 3 views
-
Source code for BlackLotus that bypassed Windows Secure Boot, Microsoft Defender, VBS, leaks
By hellowalkman,
- 4 replies
- 1 view
-
Microsoft releases HVCI/memory integrity compatibility check tool for Windows 11, Windows 10
By hellowalkman,
- microsoft
- hvci scan tool
- (and 13 more)
- 0 replies
- 1 view
-
Microsoft may have fixed LSA bug with kernel-mode hardware stack protection in Windows 11
By hellowalkman,
- microsoft
- microsoft defender
- (and 13 more)
- 3 replies
- 1 view
-
Microsoft Weekly: Free USB drives, Bing AI in Edge, and pirated Windows
By Usama Jawad96,
- microsoft
- microsoft weekly
- (and 22 more)
- 0 replies
- 2 views
-
Question
brink668
Set olApp = CreateObject("Outlook.Application")
Set olMsg = olApp.CreateItem(0)
Set objShell=CreateObject("Wscript.Shell")
With olMsg
'.To = "test@test.com"
'.CC = "cc@testing.com"
'.BCC = "bcc@testing.com"
.Subject = "While You Were Out: "
.HTMLBody = "<html><p></p>" & _
"<img src='cid:wywo_notification.jpg'>"
I am having trouble with this part. I cant get the file and the userprofile piece to work correctly.
.Attachments.Add strHomeFolder = oShell.ExpandEnvironmentStrings("%USERPROFILE%") & "\wywo_notification.jpg"
The below direct path works but not when adding the userprofile variable
'.Attachments.Add "C:\users\doej\wywo_notification.jpg"
.Display
End With
Link to comment
Share on other sites
1 answer to this question
Recommended Posts