Advertisement
Guest User

SigReset

a guest
Jun 24th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.08 KB | None | 0 0
  1. @Echo off
  2.  
  3. TITLE RESET SIG FILES
  4. :: Batch file will copy files to appropriate locations, adjust file permissions, and re-register OCX files.
  5.  
  6. ::When selecting Thick client, it will replace INI files in the Windows and user's Windows folders, then replace and re-register OCX files. It also gives everyone full permission to these files.
  7.  
  8. ::When selecting Thin client, it will replace the INI files in the user's Windows folder, then give everyone full permissions to these files.
  9.  
  10.  
  11. GOTO CHOICE
  12.  
  13. :CANCEL
  14. Echo Tool aborted. Please try again.
  15.  
  16. GOTO END
  17.  
  18.  
  19. ::This is where the user selects what type of computer they are running the tool on
  20.  
  21. :CHOICE
  22.  
  23. SET CHOICE=NULL
  24. SET VERIFY1=NULL
  25. SET VERIFY2=NULL
  26.  
  27. Echo The steps necessary depend on what type of computer the Signature Device is connected to.
  28. Echo.
  29. Echo 1.) This is a thin client computer
  30. Echo.
  31. Echo 2.) This is a thick client computer
  32. Echo.
  33.  
  34. SET /P CHOICE=Please select the machine type (1/[2])
  35. Echo =============================================
  36. If /I "%CHOICE%" EQU "1" GOTO Verify1
  37. IF /I "%CHOICE%" EQU "2" GOTO Verify2
  38. CLS
  39. Echo Incorrect choice, Please select 1 or 2
  40. Echo =============================================
  41. PAUSE
  42. CLS
  43. GOTO CHOICE
  44.  
  45.  
  46. ::User selected thin client, so only the user's windows INI files were replaced and permissions changed
  47.  
  48. :Verify1
  49.  
  50. CLS
  51. SET /P VERIFY1=You selected thin client. Is this correct? (Y/[N])
  52. IF /I "%VERIFY1%" NEQ "Y" GOTO CANCEL
  53. CLS
  54. cd %~dp0
  55.  
  56. XCOPY /Y SigPlus.ini %UserProfile%\Windows\
  57. XCOPY /Y SigPlus_lcd.ini %UserProfile%\Windows\
  58. XCOPY /Y SigPlus_clipgemserial.ini %UserProfile%\Windows\
  59.  
  60. icacls "%UserProfile%\Windows\SigPlus.ini" /grant Everyone:F
  61. icacls "%UserProfile%\Windows\SigPlus_lcd.ini" /grant Everyone:F
  62. icacls "%UserProfile%\Windows\SigPlus_clipgemserial.ini" /grant Everyone:F
  63.  
  64. GOTO SUCCESS
  65.  
  66. ::User selected thick client, so the Windows folder and user's Windows folder INI files were replaced and full permissions given. It replaced the OCX files and re-registers them.
  67.  
  68. :Verify2
  69.  
  70. CLS
  71. SET /P VERIFY2=You selected thick client. Is this correct? (Y/[N])
  72. IF /I "%VERIFY2%" NEQ "Y" GOTO CANCEL
  73. CLS
  74. cd %~dp0
  75.  
  76. XCOPY /Y SigPlus.ini %windir%
  77. XCOPY /Y SigPlus_lcd.ini %windir%
  78. XCOPY /Y SigPlus_clipgemserial.ini %windir%
  79.  
  80. XCOPY /Y SigPlus.ini %UserProfile%\Windows\
  81. XCOPY /Y SigPlus_lcd.ini %UserProfile%\Windows\
  82. XCOPY /Y SigPlus_clipgemserial.ini %UserProfile%\Windows\
  83.  
  84. icacls "%windir%\SigPlus.ini" /grant Everyone:F
  85. icacls "%windir%\SigPlus_lcd.ini" /grant Everyone:F
  86. icacls "%windir%\SigPlus_clipgemserial.ini" /grant Everyone:F
  87.  
  88. icacls "%UserProfile%\Windows\SigPlus.ini" /grant Everyone:F
  89. icacls "%UserProfile%\Windows\SigPlus_lcd.ini" /grant Everyone:F
  90. icacls "%UserProfile%\Windows\SigPlus_clipgemserial.ini" /grant Everyone:F
  91.  
  92. regsvr32 -u /s %windir%\SigPlus\SigPlus.ocx
  93. regsvr32 -u /s %windir%\SigPlus\SigSign.ocx
  94.  
  95. XCOPY /Y SigSign.ocx %windir%\SigPlus
  96. XCOPY /Y SigPlus.ocx %windir%\SigPlus
  97.  
  98. regsvr32 %windir%\SigPlus\SigPlus.ocx
  99. regsvr32 %windir%\SigPlus\SigSign.ocx
  100.  
  101. GOTO SUCCESS
  102.  
  103. :SUCCESS
  104.  
  105. ECHO STATUS: COMPLETE
  106.  
  107. PAUSE
  108.  
  109. :END
  110.  
  111. PAUSE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement