Jump to content
Ketarin forum

C#/Batch Scripting Query


Omniferum
 Share

Recommended Posts


TextWriter ins = new StreamWriter("instructions.txt");

// write a line of text to the file
ins.WriteLine(app.Install(null));

// close the stream
ins.Close();

 

Not a coder so if the above seems ridiculous my apologies. Above is what I attempted in C# but don't know anything about C#

 

I am attempting to essentially apply the following logic to all my programs.

 

There is no "install separately" feature in ketarin, only 'exclusive download'. I only require it as there are some things I use Ketarin for that have dependancies or AHK installs.

 

I am trying to attempt that if there is an update available then

 

if "{property:ExclusiveDownload}" EQU "True" echo "{property:SetupInstructions}">"{appname}".bat

 

Obvious problem being that "{property:SetupInstructions}" doesn't exist

 

Basically I get to download everything happily and then in the 'after all downloads complete' I would just put in

 

call all batch files in exclusive downloads folder

after they are all complete then delete the folder/batch files

 

Any tips?

Link to comment
Share on other sites

I swear Flo mentioned this at one point, but I can't find it addressed. SetupInstructions requires special handling to access, and that's what's throwing the wrench in your script. Even then, the way you're writing it, it wouldn't work since your output would randomly switch back and forth between C# and Batch.

 

Maybe put these items in a special category "zz Post-Update" and then sort them by category before running updates?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.