Don´t get the logic in this: Code: :UninstallIR6 CLS schtasks /query | FINDSTR /I "IORRT" >NUL IF ERRORLEVEL 1 ( echo. ) ELSE ( GOTO RearmIR6FolderDelete ) REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation" /v NotificationDisabled /t REG_DWORD /d 0 /f >NUL SET file=%SystemDrive%\Rearm\Check.bat IF EXIST %file% attrib -h %file% rd /S /Q %file% SET file=%SystemDrive%\Rearm\Theme IF EXIST %file% attrib -h %file% rd /S /Q %file% :RearmIR6FolderDelete SET file=%SystemDrive%\Rearm IF EXIST %file% attrib -h %file% rd /S /Q %file% schtasks /delete /tn "IR6" /f >NUL 2>&1 schtasks /delete /tn "Hybrid2" /f >NUL 2>&1 IF %ERRORLEVEL%==0 ( echo IR6 has been successfully uninstalled... ) ELSE ( echo IR6 is already uninstalled... ) ping -n 5 127.0.0.1 >nul GOTO Start Code searches for IORRT task, when not found it deletes the files first (not sure whether it´s possible to use 'rd' [rem dir] to delete a file), then deletes the folder. In case task is present it jumps to delete the folder, what is contra-productive in my eyes. Shouldn´t it be vice versa...? When task is present only delete the IR6 related files, when not present directly delete the whole folder. Same applies for deleting IORRT as crosscheck. This would be my UninstallIR6: Code: :UninstallIR6 CLS schtasks /query | FINDSTR /I "IORRT" >NUL IF ERRORLEVEL 1 ( GOTO RearmIR6FolderDelete ) ELSE ( GOTO RearmIR6FileDelete ) :RearmIR6FileDelete REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation" /v NotificationDisabled /t REG_DWORD /d 0 /f >NUL SET file=%SystemDrive%\Rearm\Check.bat IF EXIST %file% attrib -h %file% del /S /Q %file% SET file=%SystemDrive%\Rearm\TranscodedWallpaper.jpg IF EXIST %file% attrib -h %file% del /S /Q %file% SET file=%SystemDrive%\Rearm\IR6Bkup.theme IF EXIST %file% attrib -h %file% del /S /Q %file% schtasks /delete /tn "IR6" /f >NUL 2>&1 schtasks /delete /tn "Hybrid2" /f >NUL 2>&1 IF %ERRORLEVEL%==0 ( echo IR6 has been successfully uninstalled... ) ELSE ( echo IR6 is already uninstalled... ) ping -n 5 127.0.0.1 >nul GOTO Start :RearmIR6FolderDelete REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation" /v NotificationDisabled /t REG_DWORD /d 0 /f >NUL SET file=%SystemDrive%\Rearm IF EXIST %file% attrib -h %file% rd /S /Q %file% schtasks /delete /tn "IR6" /f >NUL 2>&1 schtasks /delete /tn "Hybrid2" /f >NUL 2>&1 IF %ERRORLEVEL%==0 ( echo IR6 has been successfully uninstalled... ) ELSE ( echo IR6 is already uninstalled... ) ping -n 5 127.0.0.1 >nul GOTO Start While deleting the files or folders changing the attributes shouldn´t matter, so it can be shortened.
Yes that is what I said exactly ...lol Yes we want to get rid of IR6 folder as I suggested ...lol Code: :UninstallIR6 CLS schtasks /query | FINDSTR /I "IORRT" >NUL IF ERRORLEVEL 1 ( echo. ) ELSE ( GOTO RearmIR6FolderDelete ) REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation" /v NotificationDisabled /t REG_DWORD /d 0 /f >NUL SET file=%SystemDrive%\Rearm\Check.bat IF EXIST %file% attrib -h %file% rd /S /Q %file% SET file=%SystemDrive%\Rearm\Theme IF EXIST %file% attrib -h %file% rd /S /Q %file% :RearmIR6FolderDelete SET file=%SystemDrive%\Rearm IF EXIST %file% attrib -h %file% rd /S /Q %file% schtasks /delete /tn "IR6" /f >NUL 2>&1 schtasks /delete /tn "Hybrid2" /f >NUL 2>&1 IF %ERRORLEVEL%==0 ( echo IR6 has been successfully uninstalled... ) ELSE ( echo IR6 is already uninstalled... ) ping -n 5 127.0.0.1 >nul GOTO Start The logic although perhaps incorrectly written is to leave opposite Rearm concept if Rearm folder is present. If it's not present then delete it vice versa for opposite Rearm concept Opposite rearm concept for IR6 = IORRT Opposite rearm concept for IORRT = IR6 hence Duality = Opposite A. However folder/file gets deleted is fine B. Yes I meant to say that if opposite task is present then delete opposite folder and contents (You got what I am saying) C. You improved my uninstall correctly and nicely D. Remember to make Rearm folder hidden and place hidden code at very last part of IR6 install and check/IR6 install (IORRT has this way cause it wouldn't work otherwise) E. Let's put better content when check.bat flashes like "Rearm diagnostic commencing" or something ...lol...and make console as small as possible with one horizontal space and one vertical space hence there is some space between flashing check.bat content and console border F. Have you experimented with creating a check.cmd to see if you can change task user rights to get check to flash hidden. Thanks s1ave77
Didn´t touch the other parts so far. Only implemented the new lines in Write-Part and played with the uninstall part. So Rearm folder should be set to 'hidden' as imtended, it´s only not nessessary to handle the attributes while deleting the files/folders. >>>First tests went fine so far . Next will be to add the new Uninstall to Write-Part, then check the Uninstall of IORRT to leave the folder in case IR6 is still installed (same way as for IR6 Unistall). Design comes last.... Would guess no one needs a nice looking bug-fest. For the hidden Check.bat: that still won´t work, as no user interaction is possible, if the tasks runs as system-task. It will wait infinitely for the impossible input. Can´t afaik be done via batch. I myself like to see what´s going on there, so errors can be realized asap.
We need to test same hidden task paramater as was before check.bat with check being .cmd. This has not been tested. During the IR5/6 testing we went to .cmd cause some things did not work or gave error with just .bat With IORRT.bat we don't have problem running silent. I still believe we can get check to run silent and it will wrap up this last concept for rearm solution Let's test check.cmd with task like this Code: schtasks /create /tn "Hybrid2" /tr "%SystemDrive%\Rearm\IR6\Check.cmd" /sc onstart /ru "" >NUL I think it will work... Thanks
Task can only run as system in case no interaction is needed; this applies for IORRT.bat. BUT for Check.bat the user interaction is mandatory, no difference here between CMD or BAT. Was tested several times: assuming a systen in Notification, that has to be activated same day, on next LogOff/On the task will run and Check.bat will wait infinitely in background without showing any message or prompt (equal whether a CMD internal or via VBS-Popup). So for the actual user there is no option to interact with the task, what renders it completely useless. That might be done by using a service in background but unfortunately not via batch. The service would also kill the concept of running all from within one batch file. Nevertheless i would be interested in a service solution. Maybe PMR could compile a test version off his project files.
I am too interested and have noticed DB service folder having been updated many times lately. I am only concerned that IR6/IORRT are looked at and copied exactly since I did everything for a reason exactly the way things are now I would really want the GUI to look very nice perhaps with graphic background or very creative GUI
That updating to the Rearm service was me opening the project in VS2012 to look at it- acording to PMR, it updates the files when just opened as I didn't make any changes.
Well PMR is good, a little cocky but awesome at his occupation as a seasoned programmer He is also completely responsible for me using lol a lot ...lol I am totally down with a GUI but first I ask this? @s1ave77 What are you talking about regarding interaction? The reinstall message? If so ditch it and give console message to use Duallity 420/IR6 to reinstall that then closes via ping cmd Then get check.bat to run hidden
User won´t see anything and the system would suddenly restart/logoff, from his point of view. No warnings would show up. Not an elegant way i guess. To be clear: a script running as SYSTEM won´t be visible for the user in any way! That definitely makes no sense at all, as he should or better must know what will happen next.
To be specific what EXACTLY needs to be run as SYSTEM to work correctly? Is the whole reinstall IR6 stuff? It's not really an convenience if check.bat isn't hidden running If that's true lets ditch it and actually finalize with rearm folder implementation We can still give console message at end of free trial to reinstall IR6 via D420 normal install We also can still at that moment uninstall IR6 1. Theme Backup/Restore (With OS versions update) and Auto Rearm 2. Console message to reinstall IR6 at end of 180 days and uninstall IR6 3. Rearm folder to contain IR6/IORRT folders ...lol 4. Done
Correction: 1. Theme Backup/Restore (With OS versions update) and Auto Rearm 2. Console message to reinstall IR6 at end of 180 days and uninstall IR6 3. Rearm folder to contain IR6/IORRT folders ...lol 4. Finish IORRT Rearm file/folder detection/deletion stuff 5. Then done
Seems you´re still trying to get the Chack.bat running hidden. And again i must tell you, YOU WON`T SEE ANY MESSAGE, equal whether it´s in CMD window or VBS-Popup. You want the user to have a choice, right. Then Check.bat MUST run in User context (not SYSTEM)! Only slight changes, mostly in Write part, you can do via "Search and Replace". Not shure about the IORRT uninstall here...:redface:.
Hi, I only want user to automatically backup/restore theme/wallpaper and auto rearm if necessary Are you saying that because of the theme/autorearm code that check.bat won't run hidden or is it the reinstall part? What message do you mean? I only know that check.bat runs not hidden and what code can we ditch to have it run hidden? what code in check.bat makes it not run hidden like IORRT runs hidden? Theme part? Auto rearm part? Reinstall part? What do mean by choice? What part of check.bat gives choice? I thought check.bat does things automatically meaning it backup/restore and autorearm automatically! So does that explain where I am confused by what you mean regarding message and choice? I have no idea what your describing at this moment? I understand I can extend paths to Rearm/IR6 or Rearm/IORRT! I have already done the code to deal with is Rearm folder being present or not! It may not be perfect but code is close! Please go look at my last code posted for IORRT dealing with Rearm folder containing IR6/IORRT folders Please define for me why original task parameters like IR6 task and IORRT/Hybrid tasks can run code/bat files silent and with check.bat we cannot run silent? Exactly where in check.bat won't allow to be run silent by task? Thanks for your help and I hope you understand what I'm trying to know
Here are the two type of tasks we're dealing with Code: schtasks /create /tn "IR5" /tr "'%SystemDrive%\Windows\system32\cmd.exe' /c cscript.exe /b %SystemDrive%\Windows\System32\slmgr.vbs /rearm && net stop sppsvc && net start sppsvc" /sc daily /mo 30 /ru "" /f >NUL Code: schtasks /create /tn "Hybrid" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc onstart /ru "" >NUL Code: schtasks /create /tn "Hybrid2" /tr "%%SystemDrive%%\Rearm\Check.bat" /sc onlogon /rl highest /f ^>nul What part exactly in check.bat needs /rl highest vs. /ru ""
The '/ru ""' switch defines the user context, which would be System in that case. If no switch is defined as applies for the 3rd task, it will run in user-context and needs the elevated rights via '/rl highest'. Rearm and Reinstall won´t work without these. If a task runs with '/ru ""' in system-context, it runs hidden and without the possibility to interact. The Check.bat task needs user interaction, i.e. for Logoff to restore theme in Starter and Home Basic and for reinstalling IR6 after 180 days. If it runs in system-context it runs independend of the logged in user and won´t show a message but wait infinitely for the user input. And the latter is impossible, as tested several times Due to the fact we want the user interaction, there is no way to run it hidden via batch. Hope this is clearer now....
Ok let's assume we ditch the reinstalling IR6 after 180 days and message choice to reinstall/uninstall and have only the OS theme/wallpaper in various versions to restore! It is only when they log in does the theme restore automatically restore or backup so I am confused as to what interaction we are talking about since check.bat does backup/restore without any interaction or input? Everything is automatic correct? IORRT.bat runs hidden so what part exactly in check.bat can't run hidden? Can you put in green what part exactly in check.bat won't run hidden with /ru ""' task parameter? It is clear I want check.bat to run hidden like IORRT.bat does...lol I guess I don't understand what theme part or code in check.bat is preventing check.bat running hidden and not flashing at startup/logon etc...
OK...after my eyes had been bleeding several times while fighting the bitchy write code, my hearts starts doing it now. Would be better then going back to a state before Check.bat implementation and processing all manually...as i would be out of that game. BTW, restore of theme or wallpaper for Starter and Home Basic only works with LoOff/On, so a choice is needed likewise.
Personally, I want it to be visible. It reminds me that it is installed and working. If you make D420 hidden and too comfortable MS might get upset at one point.
IORRT.bat works and you don't need to see it. That just doesn't make any sense in programming to see a function to be confident that it's working Extensive solution testing eliminates needs for uncertainty or reminders To me it also makes no sense to think that MS who actually gave my program an extra rearm (30 days) w/ SP1 would now 4 years later decide to take action against the WPA key delete/reset rearm concept originally discovered by BOX! ...lol That bridge has crossed and if anything they are WAY more concerned with KMS/Loader exploits!!!!!!!!!!! Seriously no one would ever consciously choose to see a program working over it working silently I am thinking since most use W7 Ultimate to just support that or Pro or whatever version can be theme backed up/restored and Auto rearmed silently The Daz loader is perfect cause there is nothing to interact or reset but I wasn't trying to make this rearm program perfect just as perfect as it could be and to have a console flashing every boot/logon is just a big red flag through my perspective @s1ave77 If we don't support starter or HB can you please show what code in green exactly in check.bat needs to have check.bat flash at startup/logon? I think that question got missed in my last post? Honestly this late in the W7 game most use Pro or Ultimate especially when using solutions vs. purchasing activation key I guess in metaphor, although check.bat was completely my idea, sometimes when we go up, we actually go back and I can't just consider this program for me even though I use my own solutions I have to consider what many people who use D420 will want. I have always made the final decisions as I inherited the rearm concept and so far believe my decisions have produced a pretty good code with the help of my friends I wait to see the answer to my missed question and if we leave out some version support to set task to run silent to not have check.bat flash at startup/logon then that will be the path I take People who have been happy with IR5's semi-automatic rearming without theme backup/restore can just use Trilogy's IR5 Otherwise my next goal is to see a GUI developed where a service can do all we require or IR6 to be as seamless as possible if someone with those API skills want's to get involved and work with the current concepts and my direction as to how the GUI will look and function Later