Jump to content











Photo
- - - - -

[app script] SetResolution


  • Please log in to reply
126 replies to this topic

#1 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 15 August 2007 - 01:49 AM

File name: [app script] SetResolution
Description:I like to have a smaller resolution configured for virtual machines so that the virtual machine does not have to hog all the space on my monitor. SetResolution allows for setting different default resolutions of virtual machines and native (non-virtual) machines.

Hope it's useful for someone else!

Galapo.
Download file

Updated download link:
http://livexp.boot-l...solution.script

Edited by Nuno Brito, 17 September 2012 - 12:34 PM.
Updated link to working version


#2 TheHive

TheHive

    Platinum Member

  • .script developer
  • 3,746 posts

Posted 15 August 2007 - 03:33 AM

I like the concept. Two different resolution for two different situations. Very good.
I didnt know it could be done.
Set_Resolurtion.jpg

#3 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 15 August 2007 - 11:28 PM

I wrote this program initially for BartPE and have used it there for around a year but never got around to doing up a plugin for wider use beyond myself. With the configurable scripts of WB such an exercise is easy and so I've made it available.

Note that my AutoIt script 'SetResolution' makes use of vmdetect.exe available here: http://www.offensive...14/vmdetect.exe. I had been using RedPill from here: http://www.invisible...rs/redpill.html, but it is susceptible to mistakes in diagnosis under native machines (particuarly multi-processor) as pointed out in the tests reported in this document: http://www.offensive...net/dc14/vm.pdf. That hadn't worried me for my own use on my own machines, but since the use is now wider I changed to the slightly different detection.

Regards,
Galapo.

#4 TheHive

TheHive

    Platinum Member

  • .script developer
  • 3,746 posts

Posted 16 August 2007 - 03:53 AM

:loleverybody:

#5 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10,154 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 16 August 2007 - 08:41 AM

Handy script!! :loleverybody:

Only one request (if possible) - My laptop uses a non-standard display sized 1280x860 (if my memory is correct) , would it be possible to have an option from the script interface to automaticaly resize to the best possible resolution?

800x600 under emulator
Get highest resolution close to 1024 under hardware


Thanks!! :w00t:

#6 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 16 August 2007 - 10:16 AM

Gday Nuno,

I'll have a look at your question in a couple of days. This will not be possible with AutoIt, I think. But there should be an application that I could call to get the necessary data. There may be problems with the vgasave (is that the name?) device, however, with lcds. I'll see what I can do...

Regards,
Galapo.

#7 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10,154 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 16 August 2007 - 02:45 PM

Thanks!! :loleverybody:

#8 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 21 August 2007 - 05:17 AM

OK, new version done which now allows for optionally selecting that under native conditions resolution will default to the highest supported (at least from those supported by the application which my script calls as found here).

Hope its a bit more useful!

Regards,
Galapo.

#9 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7,758 posts

Posted 21 August 2007 - 10:03 AM

OK, new version done which now allows for optionally selecting that under native conditions resolution will default to the highest supported (at least from those supported by the application which my script calls as found here).

Hope its a bit more useful!

The given link on the 911 forum isn't working. No download possible.

:loleverybody:

#10 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 21 August 2007 - 12:07 PM

Hi MedEvil,

Doesn't really matter. I just gave the link for reference -- the bestres application is included now in my script.

Regards,
Galapo.

#11 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7,758 posts

Posted 21 August 2007 - 05:21 PM

Hi MedEvil,

Doesn't really matter. I just gave the link for reference -- the bestres application is included now in my script.

Regards,
Galapo.

And where can i find the new script?

:loleverybody:

#12 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 21 August 2007 - 09:47 PM

I had thought I updated the script file in the first post. Is that not working? Anyway, I'm working on a simply webpage from which this script and others can be downloaded from. Hopefully that will be up later today.

Regards,
Galapo.

#13 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10,154 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 22 September 2007 - 11:57 AM

Hi Galapo!

Been finally checking your app scripts but most of them still read fixed values that are only available on XP PE based boot disks - I've moved some of them to the Windows XP project categories, hope you don't mind..


About SetResolution - there is a typo - you need to modify the script level to 5 (it's currently set as 1), please either update the older scripts on the forum download page or edit them and use direct link to the ones that are updated on your web space. This way it's much easier to keep these files updated.


You're doing an amazing work, your page is really filled with nice app gems.

:loleverybody:

#14 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 03 October 2007 - 01:45 AM

Gday Nuno,

Glad to hear that some of what I've done has been useful!

Still learning and upgrading my scripts. Later today I'll upload new versions, all of which hopefully no longer have fixed variables etc. UltraISO and IZArc require a couple of registry entries to have fixed variable (even if 0x2 is used), but I've done something to get around that a bit.

Once done and uploaded, I'll edit the download links to point to the files on my page.

Regarding SetResolution, script level of 1 was not a typo as I have my script placed in LiveXP under Basic\Tweaks. Is that OK, or do you still think I should modify it to 5?

Thanks,
Galapo.

#15 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7,758 posts

Posted 03 October 2007 - 09:01 AM

UltraISO and IZArc require a couple of registry entries to have fixed variable (even if 0x2 is used)

That's most peculiar. What seems to be the problem?

:cheers:

#16 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 03 October 2007 - 10:02 AM

Hi MedEvil,

Take a look:

http://galapo.boot-l...on/IZArc.script
http://galapo.boot-l...UltraISO.script

For IzArc, if the variable x:\ isn't hardcoded, the program defaults to the "portable" IZArc2Go.

For UltraISO, I can't quite remember what happens, I think it might be the shell context menu doesn't work properly.

This behavious is quite unusual -- and frustrating!

Regards,
Galapo.

#17 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10,154 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 03 October 2007 - 10:37 AM

I've tested SetResolution on both emulated machines and real hardware - it behaved really great! :cheers:

Don't worry about script level - I had originally placed this script inside the apps folder and it will be moved to the tweaks section to follow your configuration.

Great work and congratulations on your new app scripts! :cheers:

#18 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 03 October 2007 - 10:49 AM

I've tested SetResolution on both emulated machines and real hardware - it behaved really great! :cheers:

Yes, that was the intention -- but you never can tell without wider testing! Glad to hear that its working for you.

Great work and congratulations on your new app scripts! :cheers:

Thanks! Hopfully there's something there for others. Really, I've just been doing up programs that I use or could use under PE.

Regards,
Galapo.

#19 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7,758 posts

Posted 03 October 2007 - 04:36 PM

Hi MedEvil,

Take a look:

http://galapo.boot-l...on/IZArc.script
http://galapo.boot-l...UltraISO.script

Galapo i like to help, but what am i to do with that information?
Search your scripts for a mysterious bug?

:cheers:

#20 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 03 October 2007 - 10:33 PM

Galapo i like to help, but what am i to do with that information?
Search your scripts for a mysterious bug?

:cheers:


I gave the links to the scripts in case you wanted to take a look at the unusual behaviour.

In any case, here's the relevant entries for IZArc:
Hive_Load,HKU

reg_add,0x2,"%reg%\Microsoft\Windows\CurrentVersion\App Paths\IZArc","","x:\%ProgDir%\%ProgramFolder%\IZArc.exe"

Hive_Unload,HKU

Hive_Load,HKCU

reg_add,0x2,"%reg%\Software\IZSoftware\IZArc","AppCurrentDir","x:\%ProgDir%\%ProgramFolder%"

reg_add,0x2,"%reg%\Software\IZSoftware\IZArc","AppTempFolder","x:\%ProgDir%\%ProgramFolder%"

Hive_Unload,HKCU

and UltraISO:
Hive_Load,HKLM

reg_add,0x2,"%reg%\ControlSet001\Services\ISODrive","ImagePath","\??\x:\%ProgDir%\%ProgramFolder%\drivers\ISODrive.sys"

Hive_Unload,HKLM

Hive_Load,HKU

reg_add,0x2,"%reg%\EasyBoot Systems\UltraISO\5.0","","x:\%ProgDir%\%ProgramFolder%"

reg_add,0x2,"%reg%\EasyBoot Systems\UltraISO\5.0","Shared","x:\%ProgDir%\%ProgramFolder%\Common"

Hive_Unload,HKU

Hive_Load,HKCU

reg_add,0x2,"%reg%\Software\EasyBoot Systems\UltraISO\5.0","","x:\%ProgDir%\%ProgramFolder%"

reg_add,0x2,"%reg%\Software\EasyBoot Systems\UltraISO\5.0","Shared","x:\%ProgDir%\%ProgramFolder%\Common"

Hive_Unload,HKCU

Regards,
Galapo

#21 pedrole15

pedrole15

    Silver Member

  • .script developer
  • 731 posts
  •  
    France

Posted 04 October 2007 - 12:52 AM

Hi Galapo
Simply change x:\%ProgDir% by %PE_Programs%

:cheers:
Pedro

#22 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 04 October 2007 - 01:25 AM

Hi Galapo
Simply change x:\%ProgDir% by %PE_Programs%

:cheers:
Pedro

Thanks! Can ditch the annoying IniRead,"%ProjectInfo%".

Thanks,
Galapo.

#23 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 04 October 2007 - 02:28 AM

Hi Galapo
Simply change x:\%ProgDir% by %PE_Programs%

:cheers:
Pedro

Doesn't work for LiveXP. %PE_Programs% is defined as %PE_Programs%=%SystemDrive%\Program Files, with %SystemDrive% not being expanded as the variable is not defined. Works for programs which don't require hardcoding of %SystemDrive% variable.

Regards,
Galapo.

#24 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3,841 posts
  •  
    Australia

Posted 04 October 2007 - 03:46 AM

Doesn't work for LiveXP. %PE_Programs% is defined as %PE_Programs%=%SystemDrive%\Program Files, with %SystemDrive% not being expanded as the variable is not defined. Works for programs which don't require hardcoding of %SystemDrive% variable.

This gets around my problem above:
StrFormat,path,%PE_Programs%,%Check_Var%

If,%Check_Var%,Equal,"%SystemDrive%\",SET,%SystemDrive%,X:
Any Add_Shortcut calls have to be run prior, though.

Regards,
Galapo.

#25 pedrole15

pedrole15

    Silver Member

  • .script developer
  • 731 posts
  •  
    France

Posted 04 October 2007 - 06:52 AM

Hi Galapo,
Try this, add quote
reg_add,0x2,"%reg%\EasyBoot Systems\UltraISO\5.0","","#$q%PE_Programs%\%ProgramFolder%#$q"

Or simply add a System,RefreshVar

Pedro




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users