MSFN Forum: Easy way to test for Desktop location? - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Easy way to test for Desktop location? Rate Topic: -----

#1 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 16 April 2005 - 09:30 AM

Benjamin (or others),

I just used your latest version 2.1.18 for my new installation and since moving the Desktop to another location works correctly now I tried it and told Wihu to move the shell folder "Windows Desktop" to D:\Alexander\Desktop.

Worked perfectly.

However, I now have a problem with some of my unattended installations. Some installers add a Desktop icon to the User Desktop. In my installation script for those apps I usually have a line like this:

Quote

del "%USERPROFILE%\Desktop\DScaler.lnk"
that gets rid of the Desktop icon. Obviously, if the desktop is not at the the default location, the script fails and Wihu then shows an error message:

Quote

DScaler Wurde mit Code 1 beendet. Kann auf einen Fehler hinweisen. Status Wait


Now, I know that there is a place in the registry where I can check for the location of the desktop. But the user Wihu uses to install the software is not logged on so a reg query will probably not get me the correct location of the desktop.

Is there an (easy) way to check where the Desktop for the user that is installing the software is if the location was changed in Wihu ?

Note that I am using cmd files to install the software and I am calling those cmd files from within Wihu ....

I hope someone can help !
Thanks,
Alex


#2 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 17 April 2005 - 09:55 AM

What about using %Desktop% variable?
This will return the desktop path of the user currently installing software in WIHU.

Benjamin Kalytta

#3 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 17 April 2005 - 11:37 AM

Hi Benjamin,

thanks, did not know about this variable ... but ... this variable is only available from within Wihu, right ?

That probably won´t help me much if I am simply calling an external cmd file from Wihu where all the software installation commands are.

Or do you know a way to "transfer" a variable from Wihu into a cmd file ?

Thanks,
Alex

#4 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 17 April 2005 - 12:27 PM

As long as this CMD file is started from within WIHU, you may use these variables. Otherwise it's difficult to get this shell folder paths. You have to load it's user profiles (ntusers.dat) and read it out from there.

Benjamin Kalytta

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy