python-vlc
python-vlc copied to clipboard
Multiple windows opening up while given admin rights
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
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()