Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Echo off
- TITLE RESET SIG FILES
- :: Batch file will copy files to appropriate locations, adjust file permissions, and re-register OCX files.
- ::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.
- ::When selecting Thin client, it will replace the INI files in the user's Windows folder, then give everyone full permissions to these files.
- GOTO CHOICE
- :CANCEL
- Echo Tool aborted. Please try again.
- GOTO END
- ::This is where the user selects what type of computer they are running the tool on
- :CHOICE
- SET CHOICE=NULL
- SET VERIFY1=NULL
- SET VERIFY2=NULL
- Echo The steps necessary depend on what type of computer the Signature Device is connected to.
- Echo.
- Echo 1.) This is a thin client computer
- Echo.
- Echo 2.) This is a thick client computer
- Echo.
- SET /P CHOICE=Please select the machine type (1/[2])
- Echo =============================================
- If /I "%CHOICE%" EQU "1" GOTO Verify1
- IF /I "%CHOICE%" EQU "2" GOTO Verify2
- CLS
- Echo Incorrect choice, Please select 1 or 2
- Echo =============================================
- PAUSE
- CLS
- GOTO CHOICE
- ::User selected thin client, so only the user's windows INI files were replaced and permissions changed
- :Verify1
- CLS
- SET /P VERIFY1=You selected thin client. Is this correct? (Y/[N])
- IF /I "%VERIFY1%" NEQ "Y" GOTO CANCEL
- CLS
- cd %~dp0
- XCOPY /Y SigPlus.ini %UserProfile%\Windows\
- XCOPY /Y SigPlus_lcd.ini %UserProfile%\Windows\
- XCOPY /Y SigPlus_clipgemserial.ini %UserProfile%\Windows\
- icacls "%UserProfile%\Windows\SigPlus.ini" /grant Everyone:F
- icacls "%UserProfile%\Windows\SigPlus_lcd.ini" /grant Everyone:F
- icacls "%UserProfile%\Windows\SigPlus_clipgemserial.ini" /grant Everyone:F
- GOTO SUCCESS
- ::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.
- :Verify2
- CLS
- SET /P VERIFY2=You selected thick client. Is this correct? (Y/[N])
- IF /I "%VERIFY2%" NEQ "Y" GOTO CANCEL
- CLS
- cd %~dp0
- XCOPY /Y SigPlus.ini %windir%
- XCOPY /Y SigPlus_lcd.ini %windir%
- XCOPY /Y SigPlus_clipgemserial.ini %windir%
- XCOPY /Y SigPlus.ini %UserProfile%\Windows\
- XCOPY /Y SigPlus_lcd.ini %UserProfile%\Windows\
- XCOPY /Y SigPlus_clipgemserial.ini %UserProfile%\Windows\
- icacls "%windir%\SigPlus.ini" /grant Everyone:F
- icacls "%windir%\SigPlus_lcd.ini" /grant Everyone:F
- icacls "%windir%\SigPlus_clipgemserial.ini" /grant Everyone:F
- icacls "%UserProfile%\Windows\SigPlus.ini" /grant Everyone:F
- icacls "%UserProfile%\Windows\SigPlus_lcd.ini" /grant Everyone:F
- icacls "%UserProfile%\Windows\SigPlus_clipgemserial.ini" /grant Everyone:F
- regsvr32 -u /s %windir%\SigPlus\SigPlus.ocx
- regsvr32 -u /s %windir%\SigPlus\SigSign.ocx
- XCOPY /Y SigSign.ocx %windir%\SigPlus
- XCOPY /Y SigPlus.ocx %windir%\SigPlus
- regsvr32 %windir%\SigPlus\SigPlus.ocx
- regsvr32 %windir%\SigPlus\SigSign.ocx
- GOTO SUCCESS
- :SUCCESS
- ECHO STATUS: COMPLETE
- PAUSE
- :END
- PAUSE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement