installshield에서 설치 디렉토리를 공유하고 싶습니다. 좀 검색을했고, 비주얼 베이직 스크립트와 CMD 명령 발견InstallShield에서 INSTALLDIR windows 폴더 공유하기
이 Option Explicit
Const FILE_SHARE = 0
Const MAXIMUM_CONNECTIONS = 25
Dim objShare
'Connect to WMI
Dim objWMIService: Set objWMIService = _
GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
'Query share names for existing share
Dim colShares: Set colShares = objWMIService.ExecQuery _
("Select * from Win32_Share Where Name = 'MyShare'")
'Delete share if one exists with the same name already
For Each objShare in colShares
objShare.Delete
Next
'Create new share
Dim objNewShare: Set objNewShare = objWMIService.Get("Win32_Share")
Dim strFilePath: strFilePath = Session.Property("CustomActionData")
strFilePath = Left(strFilePath, Len(strFilePath) - 1)
objNewShare.Create strFilePath, "MyShare", _
FILE_SHARE, MAXIMUM_CONNECTIONS, "MyShare"
cmd를 명령 : 내가 VBScript를 실행하면
순 공유 공유 이름은 = [INSTALLDIR]
내가 오류가 표시되지 않습니다를 폴더를 공유 할 수는 없습니다. cmd 명령을 실행할 때 관리자 권한이 필요하기 때문에 명령을 공유 할 수 없습니다. 하지만 확실하지는 않습니다. 어떻게 관리자 권한을 부여 할 수 있습니까? 폴더를 공유 할 수 있습니까? 방법?
의미있는 질문을 쓰는 데 언젠가를 보내십시오. –
관리자 권한으로 cmd를 시작하고 명령을 실행 해 보셨습니까? –
cmd 명령에서 VbScript 및 CMD 명령 두 가지 솔루션을 찾았습니다. installshield를 사용하여 관리자 cmd로 실행할 수 없습니다. –