Red Gate forums :: View topic - Extract scripts from exe?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Packager 6
SQL Packager 6 forum

Extract scripts from exe?

Search in SQL Packager 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
Beedle



Joined: 16 Sep 2011
Posts: 2
Location: Minneapolis

PostPosted: Fri Sep 16, 2011 5:58 pm    Post subject: Extract scripts from exe? Reply with quote

Hi,
Is there a way to extract the scripts from an exe(and dll) package? My problem is this: I have a exe/dll set created from a database (and network environment) no longer in existence. I made the mistake of letting the SQL Packager include logins, so now when I attempt to run it, it fails right away trying to create a domain\login for an invalid domain. Short of actually creating the domain and user, can anyone think of a way I can extract the scripts from this package? I was thinking of maybe somehow tricking the exe into sending the commands to a shell, or some way to have it keep executing after errors.

Thanks,
Beedle
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1144
Location: My desk.

PostPosted: Mon Sep 19, 2011 12:33 pm    Post subject: Reply with quote

I can't think of a massively simple way of doing this. You could try our .NET Reflector product, as this will let you see the source code for the .exe. The scripts is stored as a bunch of string resources. However, if you ticked the box to compress these when you originally made the .exe, you won't be able to view them in any meaningful sense.
Back to top
View user's profile Send private message
Beedle



Joined: 16 Sep 2011
Posts: 2
Location: Minneapolis

PostPosted: Mon Sep 19, 2011 5:30 pm    Post subject: Reply with quote

Thanks for the idea James. When I try to open any of the dll's resources, I get an "Invalid resource file signature" error.
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1144
Location: My desk.

PostPosted: Mon Sep 19, 2011 5:34 pm    Post subject: Reply with quote

Unfortunately, that suggests the string resources are compressed.

I don't know of a way to decompress those I'm afraid, and I don't think there's any way to get the script to continue if it encounters an error as the rollback code is part of the script. So it looks like really you'd need some way to create those users first.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group