[Solved] Weird problem with files "not existing" in batch file when they actually do

Discussion in 'Scripting' started by parrotgeek1, Feb 21, 2017.

  1. parrotgeek1

    parrotgeek1 MDL Novice

    Feb 21, 2017
    4
    0
    0
    #1 parrotgeek1, Feb 21, 2017
    Last edited by a moderator: Feb 22, 2017
    Hello,

    I have successfully enabled Win32 apps on the leaked Windows Cloud!

    But, Cloud also disables the ability to change the default browser and has an annoying SmartScreen popup.
    I have made a patch to fix the limitations, which works if I do it manually using a hex editor in another OS.

    Now I am trying to automate it with a batch file.
    I am using RunAsTI to elevate the batch file.
    But it claims that the file I am trying to patch does not even exist, even though I know it does!

    Here is my code: https://github.com/parrotgeek1/Wind...DefaultProgramsPatcher/DefaultProgramsFix.bat

    Here is a picture of the error: http://i.imgur.com/vkn08kx.png

    Does anyone have any ideas? I don't know much about permissions in Windows.

    Thanks,
    Ethan
     
  2. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    4,107
    4,570
    150
    @parrotgeek1 Hi Welcome to MDL :welcome:well first what O.S. are you running? so after I can help you in some manner ok
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. wk-952

    wk-952 MDL Member

    Sep 2, 2012
    115
    285
    10
    #3 wk-952, Feb 21, 2017
    Last edited by a moderator: Apr 20, 2017
    The tool gsar.exe is complaining about the path, try passing the complete path to to.
    i.e
    Code:
    C:\Windows\System32\smartscreen.exe
    instead of:
    Code:
    \Windows\System32\smartscreen.exe
    you can also use the environment variable "%windir%", which expands to: "C:\Windows" automatically
    Code:
    %windir%\System32\smartscreen.exe
     
  4. parrotgeek1

    parrotgeek1 MDL Novice

    Feb 21, 2017
    4
    0
    0
    #4 parrotgeek1, Feb 21, 2017
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Didn't work. Thanks for trying.

    whoami.exe from a cmd in RunAsTI shows "nt authority\system" which is what I want.
     
  5. parrotgeek1

    parrotgeek1 MDL Novice

    Feb 21, 2017
    4
    0
    0
    Leaked version of Windows 10 Cloud.
    But a similar script does not work on Home, either, with the same error.
     
  6. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    4,107
    4,570
    150
    @parrotgeek1 sorry sorry dude my bad I don't sleep until now since yesterday now I have opened my eyes so I can make some search to help you :eek:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. parrotgeek1

    parrotgeek1 MDL Novice

    Feb 21, 2017
    4
    0
    0
    FIXED! it was file redirection(was redirecting system32 to syswow64)
     
  8. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    17,696
    15,683
    340
    @parrotgeek1

    Hi Ethan! Welcome to MDL!

    Your ParrotMod brings new life to our Nexus 7 (2012) devices.

    :hug2:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...