Author Topic: Piraside "Visible=1" Reset to "Visible=0" When Closing in a MS-DOS Batch File  (Read 6301 times)

pirauser

  • Newbie
  • *
  • Posts: 6
When closing Piraside 1.3 in a dos batch file using nircmd with the "nircmd closeprocess piraside.exe" command, the Visible=1 parameter is reset to Visible=0 in piraside.ini.  This causes Piraside to be not visible when restarted. 

Editing with the edlin batch command fails with the message "The system cannot find the file specified".  This appears to be the result of the lengthy "C:\Documents and Settings\userid\Local Settings\Application Data\Piraside\piraside.ini" file name.

Is there way to allow an unattended dos restart of Piraside with a /Visible=1 parameter? 

Any help would be very much appreciated.

Jan

  • Hero Member
  • *****
  • Posts: 1138
Allow the piraside to exit standard way (ie. clicking on Exit button) so actual configuration ini file can be written. The same occurs if you enter the setup dialog and then close it. Then mark the ini file as read only so no other configuration changes will occur.

The closeprocess probably clears the application visible property prior to closing or terminates the application immediately so configuration can't be saved at all.

pirauser

  • Newbie
  • *
  • Posts: 6
Excellent! 

When I infrequently make changes to Piraside, I can uncheck the Read-only property of piraside.ini.  Then I can make the changes and manually close Piraside normally to save the changes. 

Then I can change the property back to Read-only.  I will then be able to run and terminate Piraside unattended with the nircmd closeprocess command from my Ms-Dos batch program.  Since the piraside.ini is read only, the Visible=1 parameter won't be changed.  Since I won't be making changes when running Piraside unattended, I won't have to worry about saving any other changes.

Now, why didn't I think of that?

Thank you for your very simple solution (and also your very elegant program).  Most appreciated!