RChadwick Posted August 12, 2015 Share Posted August 12, 2015 I do PC repair for a living, and after a few too many cases of losing important information after reinstalling Windows, I'd like to find a solution. Nirsoft has a number of utilities that look useful. In particular, I'm trying to script the ProduKey utility, so all I have to do is run the script, and it saves the Windows key to a date-named file. The ProduKey program has command line options to do this, but I haven't been able to get them to work. So, I'm trying to script it in AutoIt. I've gotten as far as running the program, selecting the keys, and opening a save dialog. I have no idea how to get past this point. At least on my computer, it defaults to saving in 'My Documents', which may or may not be getting backed up. Since I may run this utility over the network, or a USB drive, I'd like it to just save it in the directory the program was run from. Can this be done?Thanks! Link to comment Share on other sites More sharing options...
Jfish Posted August 12, 2015 Share Posted August 12, 2015 There is a macro called @scriptdir in the help file. If you save to:@scriptdir&"\myfile.txt"It should save to the place from where you ran the script. You don't need a save dialog to do that. In fact, if you always want to save it in the same location why have a dialog? Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt Link to comment Share on other sites More sharing options...
TXTechie Posted August 12, 2015 Share Posted August 12, 2015 You might also just do the work of finding the Product Keys from within AutoIt itself - see this forum thread: Link to comment Share on other sites More sharing options...
RChadwick Posted August 13, 2015 Author Share Posted August 13, 2015 Thanks for the ideas! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now