Windows 10: Permissions problems Solved

  1. Posts : 3
    Windows 10 Linux Mint 17.3
       28 Feb 2016 #1

    Permissions problems

    Hi all,
    I have been a long time linux user and now I am really confused by permissions in Windows 10.
    I created a python script in linux which works fine and am now trying to get it to work in Windows.
    In C:\ProgramData there is a subdirectory into which I can paste files I have copied from a flash drive using File Explorer.
    I am the only user on this machine and am administrator.
    If I run the python script it seems to work without errors but the file never gets pasted.
    Even if i run the script from Command Prompt (Admin) it fails with no error messages.
    How does this all work and can I get it to work?

    #!c:/Python27/pythonfrom Tkinter import *
    import tkFileDialog
    import tkMessageBox
    import os
    import time
    from ctypes import windll, byref, wintypes
    from ctypes.wintypes import SMALL_RECT
    root = Tk()
    STDOUT = -12
    todir = "c:/ProgramData/SoundBox/Videos"
    #Pick a video file and copy it.
    def select_video():
        if myname =="":
                (filepath, filename) = os.path.split(myname)
                myfin = filename
                print myfin
                doit="copy "  + myname + " " + todir
                print doit
    hdl = windll.kernel32.GetStdHandle(STDOUT)
    rect = wintypes.SMALL_RECT(0, 50, 50, 30) # (left, top, right, bottom)
    windll.kernel32.SetConsoleWindowInfo(hdl, True, byref(rect))
    I intend to end up with this as a gui program but am stuck at present
      My ComputerSystem Spec

  2. Posts : 3
    Windows 10 Linux Mint 17.3
    Thread Starter
       29 Feb 2016 #2

    Re: permissions problems

    Just an update.
    Here's what does work.
    from Tkinter import *
    import tkFileDialog
    import tkMessageBox
    import os
    root = Tk()
    D = StringVar()
    lab1 = Label(root, textvariable=D)
    def select_video():
        global to_file
        if inname =="":
               D.set("No File Chosen")
                D.set("Copying File, Please wait")
                (filepath, filename) = os.path.split(inname)
                inmessage = "inname is " + inname
                in_file = open(inname, 'rb')
                print inmessage
                indata =
                to_file +=filename
                print to_file
                out_file = open(to_file, 'wb')
    print "Alright, all done."
    Don't ask me why there should be a difference
      My ComputerSystem Spec


Related Threads
I've got a LAN in my home/office with 5 machines now running Win 10 and I've not been able to transfer files between them due to "permission problems". These were all running Win 7 and sharing files with no problems but now I'm blocked. I've made...
Permissions.. in Network and Sharing
Hello guys I have an HTPC that it acts as a server too, i'm downloading movies, tv shows, music etc on my HTPC and others at home access that shared Drive. Thing is that I kinda want to setup specific permissions, I don't want them for example...
Problem with UAC; Permissions in Software and Apps
Hello. I have big problem with permissions on my account with Admins permissions. I need help. So, I can't install programs and open programs that need Administrator permissions, because UAC window (like this:) 30195 Appear only for 0,5...
Solved 1.00.30 Permissions in General Support
Does anyone else have this, the permissions have gone when you select a file or folder (see image). 21270
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 16:56.
Find Us