18 lines
452 B
Python
18 lines
452 B
Python
import win32com.client
|
|
|
|
def create_rdp_session(rdp_file_path):
|
|
"""RDP 파일을 사용해 원격 세션 생성"""
|
|
try:
|
|
# RDP 파일 설정
|
|
rdp = win32com.client.Dispatch("WScript.Shell")
|
|
rdp.Run(f"mstsc {rdp_file_path}")
|
|
print("원격 세션 생성 완료")
|
|
except Exception as e:
|
|
print(f"오류 발생: {e}")
|
|
|
|
|
|
def main():
|
|
create_rdp_session('session.rdp')
|
|
if __name__ == "__main__":
|
|
main()
|