Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9260135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:49:07+00:00 2026-06-18T12:49:07+00:00

SOLVED: have a look on the later posts TASK: rename a file called TabletFilter.sys

  • 0

SOLVED: have a look on the later posts

TASK: rename a file called TabletFilter.sys ( its my graphic tablet driver ) because windows 8 (my OS) apps needs an other driver then photoshop for the pin pressure. And I want to write a c++ program that just rename all driver files to .old

The code based on the rename example from cplusplus.com

#include <stdio.h>

int main ()
{
  int result;
  char oldname[] ="TabletFilter.sys";
  char newname[] ="TabletFilter.sys.old";
  result= rename( oldname , newname );
  if ( result == 0 )
    puts ( "File successfully renamed" );
  else{
    result= rename( newname , oldname );
    if( result == 0)
      puts ( "File successfully renamed" );
    else
      perror( "Error renaming file" );
  }
  return 0;
}

I tried “run as Admin” as well, but I still get

Error renaming file: No such file or directory

what can I do?


EDIT:

The file is definitly in the same folder … i copyed them both there… even at c:\windows\ i tryed it … and i use a manifest

Executable: TabletRenameDriver.exe 
Manifest: TabletRenameDriver.exe.manifest
Sample application manifest file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
  <assemblyIdentity version="1.0.0.0"
     processorArchitecture="X86"
     name="TabletRenameDriver"
     type="win32"/> 
  <description>Description of your application</description> 
  <!-- Identify the application security requirements. -->
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel
          level="requireAdministrator"
          uiAccess="false"/>
        </requestedPrivileges>
       </security>
  </trustInfo>
</assembly>

i tryed uiAccess true and false.

Yes I have a problem with the rights
The driver is loaded but iam still able to change his name … dont know why, but its possbile. I tryed it. I want to solve this problem with c++ so pls dont tell me that there are many script languages out there that can handle the problem very well 😉 I know this

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:49:09+00:00Added an answer on June 18, 2026 at 12:49 pm

    Thanks for all your help

    I finished my programm and it works perfectly now

    note: added "requireAdministrator" uiAccess="false" via VS2012 Settings

    #include <stdio.h>
    #include <stdlib.h>
    #include <Windows.h>
    
    void main ()
    {
        bool success = false;
        bool somethingWentWrong = false;
        PVOID OldValue = NULL;
        if( Wow64DisableWow64FsRedirection(&OldValue) ) 
        {
            success = MoveFile("C:\\Windows\\System32\\Drivers\\TabletFilter.sys", "C:\\Windows\\System32\\Drivers\\TabletFilter.sys.old");
            if(success){
              puts("from .sys to .sys.old");
              success = MoveFile("C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.sys", "C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.sys.old");
              if(!success){ puts("ERROR: C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.sys not found"); somethingWentWrong = true;}
              success = MoveFile("C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.inf", "C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.inf.old");
              if(!success){ puts("ERROR: C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.inf not found"); somethingWentWrong = true;}
              success = MoveFile("C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.cat", "C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.cat.old");
              if(!success){ puts("ERROR: C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.cat not found"); somethingWentWrong = true;}
            }else{
              puts("from .sys.old to .sys");
              success = MoveFile("C:\\Windows\\System32\\Drivers\\TabletFilter.sys.old", "C:\\Windows\\System32\\Drivers\\TabletFilter.sys");
              if(!success){ puts("ERROR: C:\\Windows\\System32\\Drivers\\TabletFilter.sys.old not found"); somethingWentWrong = true;}
              success = MoveFile("C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.sys.old", "C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.sys");
              if(!success){ puts("ERROR: C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.sys.old not found"); somethingWentWrong = true;}
              success = MoveFile("C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.inf.old", "C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.inf");
              if(!success){ puts("ERROR: C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.inf.old not found"); somethingWentWrong = true;}
              success = MoveFile("C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.cat.old", "C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.cat");
              if(!success){ puts("ERROR: C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.cat.old not found"); somethingWentWrong = true;}
            }
            if(somethingWentWrong){
              puts ( "ERROR: File were set to standart!" );
              success = MoveFile("C:\\Windows\\System32\\Drivers\\TabletFilter.sys.old", "C:\\Windows\\System32\\Drivers\\TabletFilter.sys");
              if(!success){ puts("ERROR: C:\\Windows\\System32\\Drivers\\TabletFilter.sys.old not found"); somethingWentWrong = true;}
              success = MoveFile("C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.sys.old", "C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.sys");
              if(!success){ puts("ERROR: C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.sys.old not found"); somethingWentWrong = true;}
              success = MoveFile("C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.inf.old", "C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.inf");
              if(!success){ puts("ERROR: C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.inf.old not found"); somethingWentWrong = true;}
              success = MoveFile("C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.cat.old", "C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.cat");
              if(!success){ puts("ERROR: C:\\Windows\\System32\\DriverStore\\FileRepository\\tabletfilter.inf_amd64_e7d03235d8288d3b\\TabletFilter.cat.old not found"); somethingWentWrong = true;}
            }else
              puts ( "File successfully renamed" );
            Wow64RevertWow64FsRedirection(OldValue);
        }
        for(unsigned long tick = GetTickCount() / 1000;  tick + 2 > GetTickCount() / 1000;){
        }
    }
    

    With only 48 lines of code … can a script be shorter?

    PS: Revisiting this post after some time, I think there are quite a few ways to approach this issue differently. However, the main point still stands: If you want to do something like this, you have to run with admin permissions … and maybe use loops, lists/vectors and some proper string manipulation 😛

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a look at this code, I believe it solved CA2000 but I want
I have a small problem which i can't seem to solve myself. Look at
I have solved some merge conflicts, committed then tried to Push my changes and
I have solved this problem, I just need to know what to do. I
NOTE: I have solved the majority of this problem but have run into a
I have read a bunch of forums on this but none have solved my
I'm curious how others have solved this problem, and what problems might lurk behind
I have to check memory performance of my application, I have solved Leaks now
In my home work of Ackermann function I have solved the problem as following
This is an Amazon interview Question.I have solved this problem in O(n) using dynamic

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.