python-vlc icon indicating copy to clipboard operation
python-vlc copied to clipboard

Multiple windows opening up while given admin rights

Open aaronFritz2302 opened this issue 4 years ago • 1 comments

When you use ctypes to give admin rights to the python script and package them using pyinstaller it opens multiple vlc windows and play the same video

aaronFritz2302 avatar May 14 '21 07:05 aaronFritz2302

import vlc,pafy,time,ctypes,sys ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, file, None, 0) player = vlc.Instance(['--video-on-top']).media_player_new(pafy.new("link to video").getbest().url) player.set_fullscreen(True) player.play() time.sleep(220) player.stop()

aaronFritz2302 avatar May 14 '21 08:05 aaronFritz2302