-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShortcut.psm1
More file actions
86 lines (70 loc) · 2.12 KB
/
Copy pathShortcut.psm1
File metadata and controls
86 lines (70 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
enum Ensure
{
Present
Absent
}
enum WindowStyle
{
Normal = 1
Maximized = 3
Minimized = 7
}
enum StockIconName
{
DocumentNotAssociated; DocumentAssociated; Application; Folder; FolderOpen; Drive525; Drive35; DriveRemove;
DriveFixed; DriveNetwork; DriveNetworkDisabled; DriveCD; DriveRam; World; Server; Printer; MyNetwork; Find; Help;
Share; Link; SlowFile; Recycler; RecyclerFull; MediaCDAudio; Lock; AutoList; PrinterNet; ServerShare; PrinterFax;
PrinterFaxNet; PrinterFile; Stack; MediaSvcd; StuffedFolder; DriveUnknown; DriveDvd; MediaDvd; MediaDvdRam;
MediaDvdRW; MediaDvdR; MediaDvdRom; MediaCDAudioPlus; MediaCDRW; MediaCDR; MediaCDBurn; MediaBlankCD; MediaCDRom;
AudioFiles; ImageFiles; VideoFiles; MixedFiles; FolderBack; FolderFront; Shield; Warning; Info; Error; Key;
Software; Rename; Delete; MediaAudioDvd; MediaMovieDvd; MediaEnhancedCD; MediaEnhancedDvd; MediaHDDvd;
MediaBluRay; MediaVcd; MediaDvdPlusR; MediaDvdPlusRW; DesktopPC; MobilePC; Users; MediaSmartMedia;
MediaCompactFlash; DeviceCellPhone; DeviceCamera; DeviceVideoCamera; DeviceAudioPlayer; NetworkConnect; Internet;
ZipFile; Settings; DriveHDDVD; DriveBluRay; MediaHDDVDROM; MediaHDDVDR; MediaHDDVDRAM; MediaBluRayROM;
MediaBluRayR; MediaBluRayRE; ClusteredDisk;
DoNotSet
}
[DscResource()]
class Shortcut
{
[DscProperty(Key)]
[string]
$Path
[DscProperty()]
[Ensure]
$Ensure
[DscProperty()]
[string]
$TargetPath
[DscProperty()]
[string]
$Arguments
[DscProperty()]
[string]
$WorkingDirectory
[DscProperty()]
[WindowStyle]
$WindowStyle=[WindowStyle]::Normal
[DscProperty()]
[string]
$Hotkey
[DscProperty()]
[StockIconName]
$StockIconName = [StockIconName]::DoNotSet
[DscProperty()]
[string]
$IconFilePath
[DscProperty()]
[int]
$IconResourceId
[DscProperty()]
[string]
$Description
[void] Set() {
$this | Invoke-ProcessShortcut Set
}
[bool] Test() {
return $this | Invoke-ProcessShortcut Test
}
[Shortcut] Get() { return $this }
}